From 85baa925043050aed4d97b1f81e0527fa89387fd Mon Sep 17 00:00:00 2001 From: wuspring Date: Wed, 11 Sep 2013 10:20:14 +0800 Subject: [PATCH] Make new keys in "Window Size" translatable and fix Ctrl+1, thanks to @thedax --- Windows/WndMainWindow.cpp | 26 ++++++++++++++------------ Windows/ppsspp.rc | 4 ++-- Windows/resource.h | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index 2c81dcb03..972aab5d9 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -518,19 +518,18 @@ namespace MainWindow TranslateMenuItem(ID_OPTIONS_FULLSCREEN, desktopUI, true, false, L"\tAlt+Return, F11"); TranslateMenuItem(ID_OPTIONS_TOPMOST, desktopUI); TranslateMenuItem(ID_OPTIONS_STRETCHDISPLAY, desktopUI); - TranslateMenuItem(ID_OPTIONS_SCREEN1X, desktopUI, true, false); - TranslateMenuItem(ID_OPTIONS_SCREEN2X, desktopUI, true, true); - TranslateMenuItem(ID_OPTIONS_SCREEN3X, desktopUI, true, false); - TranslateMenuItem(ID_OPTIONS_SCREEN4X, desktopUI, true, false); + TranslateMenuItem(ID_OPTIONS_SCREENAUTO, desktopUI); + // Skip rendering resolution 2x-5x.. + // Skip window size 1x-4x.. TranslateMenuItem(ID_OPTIONS_NONBUFFEREDRENDERING, desktopUI, true, false); TranslateMenuItem(ID_OPTIONS_BUFFEREDRENDERING, desktopUI, true, true); TranslateMenuItem(ID_OPTIONS_READFBOTOMEMORYCPU, desktopUI, true, false); TranslateMenuItem(ID_OPTIONS_READFBOTOMEMORYGPU, desktopUI, true, false); TranslateMenuItem(ID_OPTIONS_FRAMESKIP_0, desktopUI); TranslateMenuItem(ID_OPTIONS_FRAMESKIP_AUTO, desktopUI); + // Skip frameskipping 1-8.. TranslateMenuItem(ID_OPTIONS_MORE_SETTINGS, desktopUI); TranslateMenuItem(ID_OPTIONS_CONTROLS, desktopUI); - // Skip frameskipping 2-8.. TranslateMenuItem(ID_OPTIONS_TEXTUREFILTERING_AUTO, desktopUI); TranslateMenuItem(ID_OPTIONS_NEARESTFILTERING, desktopUI); TranslateMenuItem(ID_OPTIONS_LINEARFILTERING, desktopUI); @@ -566,6 +565,7 @@ namespace MainWindow TranslateSubMenuHeader(menu, desktopUI, "Savestate Slot", MENU_FILE, SUBMENU_FILE_SAVESTATE_SLOT, L"\tF3"); TranslateSubMenuHeader(menu, desktopUI, "Rendering Resolution", MENU_OPTIONS, SUBMENU_RENDERING_RESOLUTION, L"\tCtrl+1"); + TranslateSubMenuHeader(menu, desktopUI, "Window Size", MENU_OPTIONS, SUBMENU_WINDOW_SIZE); TranslateSubMenuHeader(menu, desktopUI, "Rendering Mode", MENU_OPTIONS, SUBMENU_RENDERING_MODE, L"\tF5"); TranslateSubMenuHeader(menu, desktopUI, "Frame Skipping", MENU_OPTIONS, SUBMENU_FRAME_SKIPPING, L"\tF7"); TranslateSubMenuHeader(menu, desktopUI, "Texture Filtering", MENU_OPTIONS, SUBMENU_TEXTURE_FILTERING); @@ -1169,13 +1169,15 @@ namespace MainWindow case ID_OPTIONS_WINDOW2X: SetWindowSize(2); break; case ID_OPTIONS_WINDOW3X: SetWindowSize(3); break; case ID_OPTIONS_WINDOW4X: SetWindowSize(4); break; - - - //case ID_OPTIONS_SCREENDUMMY: - // g_Config.iWindowZoom = ++g_Config.iWindowZoom > ZOOM_MAX ? ZOOM_NATIVE : g_Config.iWindowZoom; - // - //SetWindowSize(g_Config.iWindowZoom); - //break; + + case ID_OPTIONS_RESOLUTIONDUMMY: + { + static int resolutionMultiplier = 0; + resolutionMultiplier = g_Config.iInternalResolution <= 5 ? ++resolutionMultiplier : 0; + SetInternalResolution(resolutionMultiplier); + ResizeDisplay(true); + break; + } case ID_OPTIONS_MIPMAP: g_Config.bMipMap = !g_Config.bMipMap; diff --git a/Windows/ppsspp.rc b/Windows/ppsspp.rc index 0b539f813..e8c8e81f5 100644 --- a/Windows/ppsspp.rc +++ b/Windows/ppsspp.rc @@ -77,7 +77,7 @@ BEGIN VK_F3, ID_FILE_SAVESTATE_NEXT_SLOT, VIRTKEY, NOINVERT VK_F2, ID_FILE_QUICKSAVESTATE, VIRTKEY, NOINVERT VK_F4, ID_FILE_QUICKLOADSTATE, VIRTKEY, NOINVERT - "1", ID_OPTIONS_SCREENDUMMY, VIRTKEY, CONTROL, NOINVERT + "1", ID_OPTIONS_RESOLUTIONDUMMY, VIRTKEY, CONTROL, NOINVERT VK_F5, ID_OPTIONS_BUFFEREDRENDERINGDUMMY, VIRTKEY, NOINVERT VK_F7, ID_OPTIONS_FRAMESKIPDUMMY, VIRTKEY, NOINVERT VK_F6, ID_OPTIONS_HARDWARETRANSFORM, VIRTKEY, NOINVERT @@ -356,7 +356,7 @@ BEGIN MENUITEM "VSync", ID_OPTIONS_VSYNC POPUP "Rendering Resolution" BEGIN - MENUITEM "&Auto", ID_OPTIONS_SCREENAUTO + MENUITEM "Auto", ID_OPTIONS_SCREENAUTO MENUITEM "&1x", ID_OPTIONS_SCREEN1X MENUITEM "&2x", ID_OPTIONS_SCREEN2X MENUITEM "&3x", ID_OPTIONS_SCREEN3X diff --git a/Windows/resource.h b/Windows/resource.h index 20219900b..5059e9d7b 100644 --- a/Windows/resource.h +++ b/Windows/resource.h @@ -238,7 +238,7 @@ #define ID_OPTIONS_FRAMESKIP_8 40085 #define ID_OPTIONS_FRAMESKIP_AUTO 40087 #define ID_OPTIONS_FRAMESKIPDUMMY 40088 -#define ID_OPTIONS_SCREENDUMMY 40089 +#define ID_OPTIONS_RESOLUTIONDUMMY 40089 #define ID_DISASM_ASSEMBLE 40090 #define ID_DISASM_ADDNEWBREAKPOINT 40091 #define ID_DISASM_EDITBREAKPOINT 40092