SDL: Use fullscreen for mobile/GLES.

Also, allow resize for Vulkan outside mobile.

Thanks go to hissingshark.
This commit is contained in:
Unknown W. Brackets committed 2018-06-05 20:40:58 -07:00
1 parent f2a75719d8
commit 78a41980df
2 files changed
+9 -5

No files matched your search

+2 -5
View File
@@ -23,11 +23,8 @@ int SDLGLGraphicsContext::Init(SDL_Window *&window, int x, int y, int mode, std:
#endif
};
#ifdef USING_GLES2
mode |= SDL_WINDOW_OPENGL | SDL_WINDOW_FULLSCREEN;
#else
mode |= SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE;
#endif
mode |= SDL_WINDOW_OPENGL;
SDL_GLContext glContext = nullptr;
for (size_t i = 0; i < ARRAY_SIZE(attemptVersions); ++i) {
const auto &ver = attemptVersions[i];
+7
View File
@@ -555,6 +555,13 @@ int main(int argc, char *argv[]) {
mode |= SDL_WINDOW_FULLSCREEN_DESKTOP;
}
// If we're on mobile, don't try for windowed either.
#if defined(USING_GLES2) || defined(MOBILE_DEVICE)
mode |= SDL_WINDOW_FULLSCREEN;
#else
mode |= SDL_WINDOW_RESIZABLE;
#endif
if (mode & SDL_WINDOW_FULLSCREEN_DESKTOP) {
pixel_xres = g_DesktopWidth;
pixel_yres = g_DesktopHeight;