[Scummvm-git-logs] scummvm master -> fca3abd9efe36b5f331b35fac8e3ca00d37382d1
rsn8887
rsn8887 at users.noreply.github.com
Tue Apr 13 21:17:58 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
fca3abd9ef SWITCH: Fix wrong zoom on SDL to GL transition again
Commit: fca3abd9efe36b5f331b35fac8e3ca00d37382d1
https://github.com/scummvm/scummvm/commit/fca3abd9efe36b5f331b35fac8e3ca00d37382d1
Author: rsn8887 (rsn8887 at users.noreply.github.com)
Date: 2021-04-13T16:17:22-05:00
Commit Message:
SWITCH: Fix wrong zoom on SDL to GL transition again
Changed paths:
backends/graphics/openglsdl/openglsdl-graphics.cpp
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 496b4a6335..fcb643f228 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -140,11 +140,6 @@ OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager(SdlEventSource *eventSource,
// Retrieve a list of working fullscreen modes
#if SDL_VERSION_ATLEAST(2, 0, 0)
-#ifdef NINTENDO_SWITCH
- // Switch quirk: hardware has built-in 720p screen, but SDL reports 1080p
- // TODO: Implement dynamic switching to 1080p on handheld->docked transition
- _fullscreenVideoModes.push_back(VideoMode(1280, 720));
-#else
const int numModes = SDL_GetNumDisplayModes(0);
for (int i = 0; i < numModes; ++i) {
SDL_DisplayMode mode;
@@ -154,7 +149,6 @@ OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager(SdlEventSource *eventSource,
_fullscreenVideoModes.push_back(VideoMode(mode.w, mode.h));
}
-#endif
#else
const SDL_Rect *const *availableModes = SDL_ListModes(NULL, SDL_OPENGL | SDL_FULLSCREEN);
// TODO: NULL means that there are no fullscreen modes supported. We
@@ -451,6 +445,11 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, _glContextMajor);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, _glContextMinor);
+#ifdef NINTENDO_SWITCH
+ // Switch quirk: Switch seems to need this flag, otherwise the screen
+ // is zoomed when switching from Normal graphics mode to OpenGL
+ flags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
+#endif
if (!createOrUpdateWindow(width, height, flags)) {
return false;
}
More information about the Scummvm-git-logs
mailing list