diff --git a/Common/KeyMap.cpp b/Common/KeyMap.cpp index 2a05e4e43420..b50bbfce72c3 100644 --- a/Common/KeyMap.cpp +++ b/Common/KeyMap.cpp @@ -668,6 +668,8 @@ const KeyMap_IntStrPair psp_button_names[] = { {VIRTKEY_AXIS_SWAP, "AxisSwap"}, {VIRTKEY_DEVMENU, "DevMenu"}, + {VIRTKEY_TEXTURE_DUMP, "Texture Dumping"}, + {VIRTKEY_TEXTURE_REPLACE, "Texture Replacement"}, {CTRL_HOME, "Home"}, {CTRL_HOLD, "Hold"}, diff --git a/Common/KeyMap.h b/Common/KeyMap.h index a6020fc076a5..46e4395d69de 100644 --- a/Common/KeyMap.h +++ b/Common/KeyMap.h @@ -54,6 +54,8 @@ enum { VIRTKEY_RECORD = 0x40000016, VIRTKEY_SPEED_CUSTOM1 = 0x40000017, VIRTKEY_SPEED_CUSTOM2 = 0x40000018, + VIRTKEY_TEXTURE_DUMP = 0x40000019, + VIRTKEY_TEXTURE_REPLACE = 0x4000001A, VIRTKEY_LAST, VIRTKEY_COUNT = VIRTKEY_LAST - VIRTKEY_FIRST }; diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index a67624f7f85b..75ce2fa089b0 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -606,6 +606,24 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) { case VIRTKEY_TOGGLE_FULLSCREEN: System_SendMessage("toggle_fullscreen", ""); break; + + case VIRTKEY_TEXTURE_DUMP: + g_Config.bSaveNewTextures = !g_Config.bSaveNewTextures; + if (g_Config.bSaveNewTextures) { + osm.Show(sc->T("saveNewTextures_true", "Textures will now be saved to your storage"), 2.0); + NativeMessageReceived("gpu_clearCache", ""); + } else { + osm.Show(sc->T("saveNewTextures_false", "Texture saving was disabled"), 2.0); + } + break; + case VIRTKEY_TEXTURE_REPLACE: + g_Config.bReplaceTextures = !g_Config.bReplaceTextures; + if (g_Config.bReplaceTextures) + osm.Show(sc->T("replaceTextures_true", "Texture replacement enabled"), 2.0); + else + osm.Show(sc->T("replaceTextures_false", "Textures no longer are being replaced"), 2.0); + NativeMessageReceived("gpu_clearCache", ""); + break; } }