Fix Rendering Resolution mode bug where the shortcut(currently CTRL + 1) wouldn't be synchronized with its DesktopUI(win32 menu bar) counterpart. First discussed in https://github.com/hrydgard/ppsspp/pull/3834.

This commit is contained in:
The Dax 2013-09-19 14:32:56 -04:00
parent 156f9dd8f1
commit 30da5d1ba2

View file

@ -231,8 +231,15 @@ namespace MainWindow
ResizeDisplay();
}
void SetInternalResolution(int res) {
g_Config.iInternalResolution = res;
void SetInternalResolution(int res = -1) {
const int MAX_ZOOM = 10;
if (res >= 0 && res <= MAX_ZOOM)
g_Config.iInternalResolution = res;
else {
if (++g_Config.iInternalResolution > MAX_ZOOM)
g_Config.iInternalResolution = 0;
}
}
void CorrectCursor() {
@ -1140,9 +1147,7 @@ namespace MainWindow
case ID_OPTIONS_RESOLUTIONDUMMY:
{
static int resolutionMultiplier = 0;
resolutionMultiplier = g_Config.iInternalResolution <= 10 ? ++resolutionMultiplier : 0;
SetInternalResolution(resolutionMultiplier);
SetInternalResolution();
ResizeDisplay(true);
break;
}