Changeset 8d96e95 in opengl-game for game-gui-sdl.cpp


Ignore:
Timestamp:
Feb 14, 2021, 6:37:24 PM (4 years ago)
Author:
Dmitry Portnoy <dportnoy@…>
Branches:
feature/imgui-sdl
Children:
6053b24
Parents:
81869ef
Message:

Avoid recreating the swap chain when the window is minimized

File:
1 edited

Legend:

Unmodified
Added
Removed
  • game-gui-sdl.cpp

    r81869ef r8d96e95  
    157157   // TODO: Make sure this works on a mac (the analogous glfw function had issues on Mac retina displays)
    158158   SDL_GetWindowSize(window, &windowWidth, &windowHeight);
     159
     160   if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED) {
     161      windowWidth = 0;
     162      windowHeight = 0;
     163   }
    159164}
    160165
Note: See TracChangeset for help on using the changeset viewer.