diff --git a/desmume/src/windows/hotkey.cpp b/desmume/src/windows/hotkey.cpp index 778bb9bae..1d9655679 100644 --- a/desmume/src/windows/hotkey.cpp +++ b/desmume/src/windows/hotkey.cpp @@ -21,6 +21,7 @@ #include "hotkey.h" #include "main.h" +#include "CheatsWin.h" #include "NDSSystem.h" #include "saves.h" #include "inputdx.h" @@ -91,6 +92,11 @@ void HK_ReloadROM(int, bool justPressed) void OpenRecentROM(int listNum); OpenRecentROM(0); } +void HK_SearchCheats(int, bool justPressed) +{ + if (romloaded) + CheatsSearchDialog(MainWindow->getHWnd()); +} void HK_QuickScreenShot(int param, bool justPressed) { char buffer[MAX_PATH]; @@ -703,6 +709,13 @@ void InitCustomKeys (SCustomKeys *keys) keys->LCDsSwap.page = HOTKEY_PAGE_MOVIE; keys->LCDsSwap.key = VK_NEXT; + keys->SearchCheats.handleKeyDown = HK_SearchCheats; + keys->SearchCheats.code = "SearchCheats"; + keys->SearchCheats.name = STRW(ID_LABEL_HK54); + keys->SearchCheats.page = HOTKEY_PAGE_MOVIE; + keys->SearchCheats.key = 'S'; + keys->SearchCheats.modifiers = CUSTKEY_CTRL_MASK; + keys->IncreaseVolume.handleKeyDown = HK_IncreaseVolume; keys->IncreaseVolume.code = "IncreaseVolume"; keys->IncreaseVolume.name = STRW(ID_LABEL_HK32); diff --git a/desmume/src/windows/hotkey.h b/desmume/src/windows/hotkey.h index b26efc95b..d041c52ab 100644 --- a/desmume/src/windows/hotkey.h +++ b/desmume/src/windows/hotkey.h @@ -94,6 +94,7 @@ struct SCustomKeys SCustomKey StylusAutoHold; SCustomKey LCDsMode; SCustomKey LCDsSwap; + SCustomKey SearchCheats; SCustomKey IncreaseVolume; SCustomKey DecreaseVolume; SCustomKey LastItem; // dummy, must be last diff --git a/desmume/src/windows/resource.h b/desmume/src/windows/resource.h index dd8faa5b1..b64ad3f23 100644 --- a/desmume/src/windows/resource.h +++ b/desmume/src/windows/resource.h @@ -770,6 +770,7 @@ #define ID_LABEL_HK51 4515 #define ID_LABEL_HK52 4516 #define ID_LABEL_HK53 4517 +#define ID_LABEL_HK54 4519 #define ID_LABEL_HK13b 4518 #define IDD_MICROPHONE 5000 #define IDM_MICROPHONESETTINGS 5001 diff --git a/desmume/src/windows/resources.rc b/desmume/src/windows/resources.rc index 8e3f90260..10993303e 100644 Binary files a/desmume/src/windows/resources.rc and b/desmume/src/windows/resources.rc differ