diff options
author | Axel Davy <[email protected]> | 2015-11-11 10:13:58 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-02-04 22:12:17 +0100 |
commit | cbbd3c65cc6f9a9850b945bc3d56c1860836e26c (patch) | |
tree | 8460c1fdae0e172174cb34e0f57b5f3cf7af846e | |
parent | 996f76bd8a6444970e57d646ad5af94f200bec00 (diff) |
st/nine: Fix crash NineDevice9_CreateAdditionalSwapChain
When no window is specified, we should revert to the focus window.
This deserves more tests however (what if the device swapchain is
already using the focus window ?)
Fixes crash for FFXIV
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Patrick Rudolph <[email protected]>
-rw-r--r-- | src/gallium/state_trackers/nine/device9.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index e4ac61a5a43..3752c63f444 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -711,6 +711,10 @@ NineDevice9_CreateAdditionalSwapChain( struct NineDevice9 *This, user_assert(pPresentationParameters, D3DERR_INVALIDCALL); + /* TODO: this deserves more tests */ + if (!pPresentationParameters->hDeviceWindow) + pPresentationParameters->hDeviceWindow = This->params.hFocusWindow; + hr = ID3DPresentGroup_CreateAdditionalPresent(This->present, pPresentationParameters, &present); if (FAILED(hr)) |