Implemented fullscreen <-> windowed transition on Windows 8
parent
7e8b25534d
commit
9c2fb684af
|
@ -1732,7 +1732,6 @@ static HRESULT
|
||||||
D3D11_UpdateForWindowSizeChange(SDL_Renderer * renderer)
|
D3D11_UpdateForWindowSizeChange(SDL_Renderer * renderer)
|
||||||
{
|
{
|
||||||
D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata;
|
D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata;
|
||||||
/* FIXME: Do we need to release render targets like we do in D3D9? */
|
|
||||||
return D3D11_CreateWindowSizeDependentResources(renderer);
|
return D3D11_CreateWindowSizeDependentResources(renderer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3006,6 +3005,9 @@ D3D11_RenderPresent(SDL_Renderer * renderer)
|
||||||
*/
|
*/
|
||||||
if ( result == DXGI_ERROR_DEVICE_REMOVED ) {
|
if ( result == DXGI_ERROR_DEVICE_REMOVED ) {
|
||||||
D3D11_HandleDeviceLost(renderer);
|
D3D11_HandleDeviceLost(renderer);
|
||||||
|
} else if (result == DXGI_ERROR_INVALID_CALL) {
|
||||||
|
/* We probably went through a fullscreen <-> windowed transition */
|
||||||
|
D3D11_CreateWindowSizeDependentResources(renderer);
|
||||||
} else {
|
} else {
|
||||||
WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGISwapChain::Present", result);
|
WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGISwapChain::Present", result);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue