From 83a168c25e377983b7abd6d014ac384624ea2fd1 Mon Sep 17 00:00:00 2001 From: The Dax Date: Thu, 26 Sep 2013 17:46:11 -0400 Subject: [PATCH 1/4] Win32: Only show the resolution information when selecting resolution sizes or window sizes from the Settings menu. --- Windows/WndMainWindow.cpp | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index 2990f6e2d3..cdeba4f4d5 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -187,7 +187,7 @@ namespace MainWindow rcOuter.top = g_Config.iWindowY; } - void ResizeDisplay(bool noWindowMovement = false) { + void ResizeDisplay(bool displayOSM = true, bool noWindowMovement = false) { RECT rc; GetClientRect(hwndMain, &rc); if (!noWindowMovement) { @@ -209,14 +209,15 @@ namespace MainWindow PSP_CoreParameter().renderHeight = 272 * zoom; PSP_CoreParameter().outputWidth = 480 * zoom; PSP_CoreParameter().outputHeight = 272 * zoom; - - I18NCategory *g = GetI18NCategory("Graphics"); - - char message[256]; - sprintf(message, "%s: %ix%i %s: %ix%i", - g->T("Internal Resolution"), PSP_CoreParameter().renderWidth, PSP_CoreParameter().renderHeight, - g->T("Window Size"), PSP_CoreParameter().pixelWidth, PSP_CoreParameter().pixelHeight); - osm.Show(g->T(message), 2.0f); + + if (displayOSM) { + I18NCategory *g = GetI18NCategory("Graphics"); + char message[256]; + sprintf(message, "%s: %ix%i %s: %ix%i", + g->T("Internal Resolution"), PSP_CoreParameter().renderWidth, PSP_CoreParameter().renderHeight, + g->T("Window Size"), PSP_CoreParameter().pixelWidth, PSP_CoreParameter().pixelHeight); + osm.Show(g->T(message), 2.0f); + } if (gpu) gpu->Resized(); @@ -226,7 +227,7 @@ namespace MainWindow RECT rc, rcOuter; GetWindowRectAtResolution(480 * (int)zoom, 272 * (int)zoom, rc, rcOuter); MoveWindow(hwndMain, rcOuter.left, rcOuter.top, rcOuter.right - rcOuter.left, rcOuter.bottom - rcOuter.top, TRUE); - ResizeDisplay(); + ResizeDisplay(true, true); } void SetInternalResolution(int res = -1) { @@ -237,7 +238,7 @@ namespace MainWindow g_Config.iInternalResolution = 0; } - ResizeDisplay(true); + ResizeDisplay(true, true); } void CorrectCursor() { @@ -275,7 +276,7 @@ namespace MainWindow // Reset full screen indicator. g_Config.bFullScreen = false; CorrectCursor(); - ResizeDisplay(); + ResizeDisplay(true); ShowOwnedPopups(hwndMain, TRUE); W32Util::MakeTopMost(hwndMain, g_Config.bTopMost); } @@ -303,7 +304,7 @@ namespace MainWindow // Set full screen indicator. g_Config.bFullScreen = true; CorrectCursor(); - ResizeDisplay(); + ResizeDisplay(true); ShowOwnedPopups(hwndMain, FALSE); UpdateScreenScale(); } @@ -994,12 +995,12 @@ namespace MainWindow case WM_MOVE: SavePosition(); - ResizeDisplay(); + ResizeDisplay(false); break; case WM_SIZE: SavePosition(); - ResizeDisplay(); + ResizeDisplay(false); break; case WM_TIMER: @@ -1532,7 +1533,7 @@ namespace MainWindow break; case WM_USER_UPDATE_SCREEN: - ResizeDisplay(true); + ResizeDisplay(true, true); break; case WM_USER_WINDOW_TITLE_CHANGED: From 24d587c991738ba809222daa59bf7c9f8efe59a1 Mon Sep 17 00:00:00 2001 From: The Dax Date: Thu, 26 Sep 2013 17:49:37 -0400 Subject: [PATCH 2/4] Adjust a few calls. Display fullscreen/normal resolution mode info only one time. --- Windows/WndMainWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index cdeba4f4d5..a5d62b5bcb 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -276,7 +276,7 @@ namespace MainWindow // Reset full screen indicator. g_Config.bFullScreen = false; CorrectCursor(); - ResizeDisplay(true); + ResizeDisplay(true, true); ShowOwnedPopups(hwndMain, TRUE); W32Util::MakeTopMost(hwndMain, g_Config.bTopMost); } @@ -304,7 +304,7 @@ namespace MainWindow // Set full screen indicator. g_Config.bFullScreen = true; CorrectCursor(); - ResizeDisplay(true); + ResizeDisplay(true, true); ShowOwnedPopups(hwndMain, FALSE); UpdateScreenScale(); } From 7fde11af5ff7c11c41471c268a799d05187cbb3b Mon Sep 17 00:00:00 2001 From: The Dax Date: Thu, 26 Sep 2013 19:38:15 -0400 Subject: [PATCH 3/4] Don't show resolution info when entering/exiting fullscreen. It's not really necessary. --- Windows/WndMainWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index a5d62b5bcb..a21d8a5a63 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -276,7 +276,7 @@ namespace MainWindow // Reset full screen indicator. g_Config.bFullScreen = false; CorrectCursor(); - ResizeDisplay(true, true); + ResizeDisplay(); ShowOwnedPopups(hwndMain, TRUE); W32Util::MakeTopMost(hwndMain, g_Config.bTopMost); } @@ -304,7 +304,7 @@ namespace MainWindow // Set full screen indicator. g_Config.bFullScreen = true; CorrectCursor(); - ResizeDisplay(true, true); + ResizeDisplay(); ShowOwnedPopups(hwndMain, FALSE); UpdateScreenScale(); } From 1427aefccb20c94d19c1286db7bff8013960afb4 Mon Sep 17 00:00:00 2001 From: The Dax Date: Fri, 27 Sep 2013 15:34:13 -0400 Subject: [PATCH 4/4] Make fullscreen info conditional. Don't show it if the Resolution Mode isn't Auto. --- Windows/WndMainWindow.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index a21d8a5a63..2d6c56a70b 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -276,7 +276,9 @@ namespace MainWindow // Reset full screen indicator. g_Config.bFullScreen = false; CorrectCursor(); - ResizeDisplay(); + + bool showOSM = (g_Config.iInternalResolution == RESOLUTION_AUTO); + ResizeDisplay(showOSM, true); ShowOwnedPopups(hwndMain, TRUE); W32Util::MakeTopMost(hwndMain, g_Config.bTopMost); } @@ -304,7 +306,10 @@ namespace MainWindow // Set full screen indicator. g_Config.bFullScreen = true; CorrectCursor(); - ResizeDisplay(); + + bool showOSM = (g_Config.iInternalResolution == RESOLUTION_AUTO); + ResizeDisplay(showOSM, true); + ShowOwnedPopups(hwndMain, FALSE); UpdateScreenScale(); }