mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-26 14:27:14 +00:00
OPENGLSDL: Fix increasing/decreasing the window size on macOS
This commit is contained in:
parent
c1a2d5ba1b
commit
2a410768ad
@ -636,6 +636,13 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
|
||||
// window. Then we apply the direction change.
|
||||
int windowWidth = 0, windowHeight = 0;
|
||||
getWindowSizeFromSdl(&windowWidth, &windowHeight);
|
||||
// FIXME HACK. I don't like this at all, but macOS requires window size in LoDPI
|
||||
#ifdef __APPLE__
|
||||
uint scale;
|
||||
getDpiScalingFactor(&scale);
|
||||
windowWidth /= scale;
|
||||
windowHeight /= scale;
|
||||
#endif
|
||||
_graphicsScale = MAX<int>(windowWidth / _lastRequestedWidth, windowHeight / _lastRequestedHeight);
|
||||
_graphicsScale = MAX<int>(_graphicsScale + direction, 1);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user