Skip to content

Commit

Permalink
SDL2Window: Work around SDL2 fullscreen mode change bug
Browse files Browse the repository at this point in the history
Fixes: bug #797
  • Loading branch information
dscharrer committed Feb 14, 2016
1 parent 2ad1f16 commit 08f05b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/window/SDL2Window.cpp
Expand Up @@ -301,6 +301,10 @@ void SDL2Window::changeMode(DisplayMode mode, bool makeFullscreen) {
m_renderer->beforeResize(false);

if(makeFullscreen) {
if(wasFullscreen) {
// SDL will not update the window size with the new mode if already fullscreen
SDL_SetWindowFullscreen(m_window, 0);
}
if(mode.resolution != Vec2i_ZERO) {
SDL_DisplayMode sdlmode;
SDL_DisplayMode requested;
Expand Down

0 comments on commit 08f05b7

Please sign in to comment.