From a2183b97438724dcd25c0a0253a107166f6ecdb4 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 12 Feb 2023 22:56:35 +0100 Subject: [PATCH] (macOS) Fixed an issue with fullscreen padding. --- es-core/src/renderers/Renderer.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/es-core/src/renderers/Renderer.cpp b/es-core/src/renderers/Renderer.cpp index 761fa281a..5e9a960fe 100644 --- a/es-core/src/renderers/Renderer.cpp +++ b/es-core/src/renderers/Renderer.cpp @@ -135,8 +135,8 @@ bool Renderer::createWindow() mWindowHeight = displayMode.h; mPaddingWidth = displayMode.w - sScreenWidth; mPaddingHeight = displayMode.h - sScreenHeight; - mScreenOffsetX -= mPaddingWidth / 2.0; - mScreenOffsetY -= mPaddingHeight / 2.0; + mScreenOffsetX -= mPaddingWidth / 2; + mScreenOffsetY -= mPaddingHeight / 2; fullscreenPadding = true; } @@ -259,6 +259,11 @@ bool Renderer::createWindow() mWindowHeight *= scaleFactor; sScreenWidth *= scaleFactor; sScreenHeight *= scaleFactor; + mPaddingWidth *= scaleFactor; + mPaddingHeight *= scaleFactor; + mScreenOffsetX *= scaleFactor; + mScreenOffsetY *= scaleFactor; + #else LOG(LogInfo) << "Display resolution: " << std::to_string(displayMode.w) << "x" << std::to_string(displayMode.h);