From 4810a5d8d35c5caa79f9a3a1e93d882de32b2d87 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Tue, 5 Nov 2019 06:09:04 +0100 Subject: 3DS: Fix centering of the game screen --- backends/platform/3ds/osystem-graphics.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp index 1e340f84d9..5c65cac648 100644 --- a/backends/platform/3ds/osystem-graphics.cpp +++ b/backends/platform/3ds/osystem-graphics.cpp @@ -180,23 +180,23 @@ void OSystem_3DS::updateSize() { float r = 400.f / _gameWidth; _gameTopTexture.setScale(r, r); _gameTopX = 0; - _gameTopY = (240.f - r * _gameHeight) / 2.f; + _gameTopY = (240.f / r - _gameHeight) / 2.f; } else { float r = 240.f / _gameHeight; _gameTopTexture.setScale(r, r); _gameTopY = 0; - _gameTopX = (400.f - r * _gameWidth) / 2.f; + _gameTopX = (400.f / r - _gameWidth) / 2.f; } if (ratio > 320.f / 240.f) { float r = 320.f / _gameWidth; _gameBottomTexture.setScale(r, r); _gameBottomX = 0; - _gameBottomY = (240.f - r * _gameHeight) / 2.f; + _gameBottomY = (240.f / r - _gameHeight) / 2.f; } else { float r = 240.f / _gameHeight; _gameBottomTexture.setScale(r, r); _gameBottomY = 0; - _gameBottomX = (320.f - r * _gameWidth) / 2.f; + _gameBottomX = (320.f / r - _gameWidth) / 2.f; } } _gameTopTexture.setPosition(_gameTopX, _gameTopY); -- cgit v1.2.3