From afc36d557ed6e1bd67ecfd87d7ad10a664c0fb58 Mon Sep 17 00:00:00 2001 From: DanyalZia Date: Mon, 27 Jan 2014 11:46:09 +0500 Subject: [PATCH] Properly show OSD information of resolution --- GPU/GLES/Framebuffer.cpp | 14 +++++++------- Windows/WndMainWindow.cpp | 11 +++++------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index cdfa9bae1e..cf2bb6c770 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -1521,13 +1521,13 @@ void FramebufferManager::EndFrame() { DestroyAllFBOs(); glstate.viewport.set(0, 0, PSP_CoreParameter().pixelWidth, PSP_CoreParameter().pixelHeight); int zoom = g_Config.iInternalResolution; - if (zoom != 0) - { - PSP_CoreParameter().renderWidth = 480 * zoom; - PSP_CoreParameter().renderHeight = 272 * zoom; - PSP_CoreParameter().outputWidth = 480 * zoom; - PSP_CoreParameter().outputHeight = 272 * zoom; - } + if (zoom == 0) // auto mode + zoom = (PSP_CoreParameter().pixelWidth + 479) / 480; + + PSP_CoreParameter().renderWidth = 480 * zoom; + PSP_CoreParameter().renderHeight = 272 * zoom; + PSP_CoreParameter().outputWidth = 480 * zoom; + PSP_CoreParameter().outputHeight = 272 * zoom; resized_ = false; } diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index fff41c0f17..1245179ceb 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -225,13 +225,12 @@ namespace MainWindow // Round up to a zoom factor for the render size. int zoom = g_Config.iInternalResolution; if (zoom == 0) // auto mode - { zoom = (rc.right - rc.left + 479) / 480; - PSP_CoreParameter().renderWidth = 480 * zoom; - PSP_CoreParameter().renderHeight = 272 * zoom; - PSP_CoreParameter().outputWidth = 480 * zoom; - PSP_CoreParameter().outputHeight = 272 * zoom; - } + + PSP_CoreParameter().renderWidth = 480 * zoom; + PSP_CoreParameter().renderHeight = 272 * zoom; + PSP_CoreParameter().outputWidth = 480 * zoom; + PSP_CoreParameter().outputHeight = 272 * zoom; if (displayOSM) { I18NCategory *g = GetI18NCategory("Graphics");