mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
SDL: Start with window hidden.
This fixes start in fullscreen on Mac. Otherwise, it animates to fullscreen and back for every GL init attempt.
This commit is contained in:
parent
34cef82ea3
commit
9be20323ef
1 changed files with 6 additions and 1 deletions
|
@ -158,7 +158,9 @@ int SDLGLGraphicsContext::Init(SDL_Window *&window, int x, int y, int mode, std:
|
|||
#endif
|
||||
};
|
||||
|
||||
mode |= SDL_WINDOW_OPENGL;
|
||||
// We start hidden because we have to try several windows.
|
||||
// On Mac, full screen animates so each attempt is slow.
|
||||
mode |= SDL_WINDOW_OPENGL | SDL_WINDOW_HIDDEN;
|
||||
|
||||
SDL_GLContext glContext = nullptr;
|
||||
for (size_t i = 0; i < ARRAY_SIZE(attemptVersions); ++i) {
|
||||
|
@ -217,6 +219,9 @@ int SDLGLGraphicsContext::Init(SDL_Window *&window, int x, int y, int mode, std:
|
|||
}
|
||||
}
|
||||
|
||||
// At this point, we have a window that we can show finally.
|
||||
SDL_ShowWindow(window);
|
||||
|
||||
#ifdef USING_EGL
|
||||
EGL_Init();
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue