Skip to content

Commit

Permalink
Implemented fullscreen <-> windowed transition on Windows 8
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Mar 10, 2014
1 parent 7e8b255 commit 9c2fb68
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/render/direct3d11/SDL_render_d3d11.c
Expand Up @@ -1732,7 +1732,6 @@ static HRESULT
D3D11_UpdateForWindowSizeChange(SDL_Renderer * renderer)
{
D3D11_RenderData *data = (D3D11_RenderData *)renderer->driverdata;
/* FIXME: Do we need to release render targets like we do in D3D9? */
return D3D11_CreateWindowSizeDependentResources(renderer);
}

Expand Down Expand Up @@ -3004,8 +3003,11 @@ D3D11_RenderPresent(SDL_Renderer * renderer)
*
* TODO, WinRT: consider throwing an exception if D3D11_RenderPresent fails, especially if there is a way to salvage debug info from users' machines
*/
if (result == DXGI_ERROR_DEVICE_REMOVED) {
if ( result == DXGI_ERROR_DEVICE_REMOVED ) {
D3D11_HandleDeviceLost(renderer);
} else if (result == DXGI_ERROR_INVALID_CALL) {
/* We probably went through a fullscreen <-> windowed transition */
D3D11_CreateWindowSizeDependentResources(renderer);
} else {
WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGISwapChain::Present", result);
}
Expand Down

0 comments on commit 9c2fb68

Please sign in to comment.