diff --git a/desmume/src/windows/DeSmuME_2005.vcproj b/desmume/src/windows/DeSmuME_2005.vcproj index 03b1c7cf1..a0677e80b 100644 --- a/desmume/src/windows/DeSmuME_2005.vcproj +++ b/desmume/src/windows/DeSmuME_2005.vcproj @@ -116,206 +116,6 @@ Name="VCPostBuildEventTool" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - @@ -1010,6 +990,16 @@ Outputs=".libs\7z.tag" /> + + + @@ -1020,6 +1010,16 @@ Outputs=".libs\7z.tag" /> + + + @@ -1044,26 +1044,6 @@ Outputs=".libs\directx.tag" /> - - - - - - @@ -1074,6 +1054,16 @@ Outputs=".libs\directx.tag" /> + + + @@ -1084,6 +1074,16 @@ Outputs=".libs\directx.tag" /> + + + @@ -1108,26 +1108,6 @@ Outputs=".libs\glib-vc8.tag" /> - - - - - - @@ -1138,6 +1118,16 @@ Outputs=".libs\glib-vc8.tag" /> + + + @@ -1148,6 +1138,16 @@ Outputs=".libs\glib-vc8.tag" /> + + + @@ -1172,26 +1172,6 @@ Outputs=".libs\lua.tag" /> - - - - - - @@ -1202,6 +1182,16 @@ Outputs=".libs\lua.tag" /> + + + @@ -1212,6 +1202,16 @@ Outputs=".libs\lua.tag" /> + + + @@ -1236,26 +1236,6 @@ Outputs=".libs\wx.tag" /> - - - - - - @@ -1266,6 +1246,16 @@ Outputs=".libs\wx.tag" /> + + + @@ -1276,6 +1266,16 @@ Outputs=".libs\wx.tag" /> + + + @@ -1359,24 +1359,6 @@ XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" /> - - - - - - @@ -1386,6 +1368,15 @@ XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" /> + + + @@ -1395,6 +1386,15 @@ XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" /> + + + @@ -1683,7 +1683,7 @@ /> + + + + + + + + + + + + + + + + diff --git a/desmume/src/windows/hotkey.cpp b/desmume/src/windows/hotkey.cpp index 027033980..1f0898877 100644 --- a/desmume/src/windows/hotkey.cpp +++ b/desmume/src/windows/hotkey.cpp @@ -85,7 +85,12 @@ void CopyCustomKeys (SCustomKeys *dst, const SCustomKeys *src) //====================================================================================== //=====================================HANDLERS========================================= //====================================================================================== -void HK_OpenROM(int, bool justPressed) {OpenFile();} +void HK_OpenROM(int, bool justPressed) { OpenFile(); } +void HK_ReloadROM(int, bool justPressed) +{ + void OpenRecentROM(int listNum); + OpenRecentROM(0); +} void HK_PrintScreen(int param, bool justPressed) { char outFilename[MAX_PATH]; @@ -409,11 +414,17 @@ void InitCustomKeys (SCustomKeys *keys) keys->OpenROM.handleKeyDown = HK_OpenROM; keys->OpenROM.code = "OpenROM"; keys->OpenROM.name = STRW(ID_LABEL_HK1); - //keys->OpenROM.name = STRW(ID_LOCALIZED_STRING); keys->OpenROM.page = HOTKEY_PAGE_MAIN; keys->OpenROM.key = 'O'; keys->OpenROM.modifiers = CUSTKEY_CTRL_MASK; + keys->ReloadROM.handleKeyDown = HK_ReloadROM; + keys->ReloadROM.code = "ReloadROM"; + keys->ReloadROM.name = STRW(ID_LABEL_HK53); + keys->ReloadROM.page = HOTKEY_PAGE_MAIN; + keys->ReloadROM.key = 'R'; + keys->ReloadROM.modifiers = CUSTKEY_CTRL_MASK | CUSTKEY_SHIFT_MASK; + keys->Reset.handleKeyDown = HK_Reset; keys->Reset.code = "Reset"; keys->Reset.name = STRW(ID_LABEL_HK2); @@ -497,36 +508,6 @@ void InitCustomKeys (SCustomKeys *keys) keys->PrintScreen.page = HOTKEY_PAGE_MAIN; keys->PrintScreen.key = VK_F12; - keys->ToggleFrameCounter.handleKeyDown = HK_ToggleFrame; - keys->ToggleFrameCounter.code = "ToggleFrameDisplay"; - keys->ToggleFrameCounter.name = STRW(ID_LABEL_HK16); - keys->ToggleFrameCounter.page = HOTKEY_PAGE_MAIN; - keys->ToggleFrameCounter.key = VK_OEM_PERIOD; - - keys->ToggleFPS.handleKeyDown = HK_ToggleFPS; - keys->ToggleFPS.code = "ToggleFPSDisplay"; - keys->ToggleFPS.name = STRW(ID_LABEL_HK17); - keys->ToggleFPS.page = HOTKEY_PAGE_MAIN; - keys->ToggleFPS.key = NULL; - - keys->ToggleInput.handleKeyDown = HK_ToggleInput; - keys->ToggleInput.code = "ToggleInputDisplay"; - keys->ToggleInput.name = STRW(ID_LABEL_HK18); - keys->ToggleInput.page = HOTKEY_PAGE_MAIN; - keys->ToggleInput.key = VK_OEM_COMMA; - - keys->ToggleLag.handleKeyDown = HK_ToggleLag; - keys->ToggleLag.code = "ToggleLagDisplay"; - keys->ToggleLag.name = STRW(ID_LABEL_HK19); - keys->ToggleLag.page = HOTKEY_PAGE_MAIN; - keys->ToggleLag.key = NULL; - - keys->ResetLagCounter.handleKeyDown = HK_ResetLagCounter; - keys->ResetLagCounter.code = "ResetLagCounter"; - keys->ResetLagCounter.name = STRW(ID_LABEL_HK20); - keys->ResetLagCounter.page = HOTKEY_PAGE_MAIN; - keys->ResetLagCounter.key = NULL; - keys->ToggleReadOnly.handleKeyDown = HK_ToggleReadOnly; keys->ToggleReadOnly.code = "ToggleReadOnly"; keys->ToggleReadOnly.name = STRW(ID_LABEL_HK24); @@ -698,6 +679,36 @@ void InitCustomKeys (SCustomKeys *keys) keys->DecreaseVolume.page = HOTKEY_PAGE_MOVIE; keys->DecreaseVolume.key = NULL; + keys->ToggleFrameCounter.handleKeyDown = HK_ToggleFrame; + keys->ToggleFrameCounter.code = "ToggleFrameDisplay"; + keys->ToggleFrameCounter.name = STRW(ID_LABEL_HK16); + keys->ToggleFrameCounter.page = HOTKEY_PAGE_MOVIE; + keys->ToggleFrameCounter.key = VK_OEM_PERIOD; + + keys->ToggleFPS.handleKeyDown = HK_ToggleFPS; + keys->ToggleFPS.code = "ToggleFPSDisplay"; + keys->ToggleFPS.name = STRW(ID_LABEL_HK17); + keys->ToggleFPS.page = HOTKEY_PAGE_MOVIE; + keys->ToggleFPS.key = NULL; + + keys->ToggleInput.handleKeyDown = HK_ToggleInput; + keys->ToggleInput.code = "ToggleInputDisplay"; + keys->ToggleInput.name = STRW(ID_LABEL_HK18); + keys->ToggleInput.page = HOTKEY_PAGE_MOVIE; + keys->ToggleInput.key = VK_OEM_COMMA; + + keys->ToggleLag.handleKeyDown = HK_ToggleLag; + keys->ToggleLag.code = "ToggleLagDisplay"; + keys->ToggleLag.name = STRW(ID_LABEL_HK19); + keys->ToggleLag.page = HOTKEY_PAGE_MOVIE; + keys->ToggleLag.key = NULL; + + keys->ResetLagCounter.handleKeyDown = HK_ResetLagCounter; + keys->ResetLagCounter.code = "ResetLagCounter"; + keys->ResetLagCounter.name = STRW(ID_LABEL_HK20); + keys->ResetLagCounter.page = HOTKEY_PAGE_MOVIE; + keys->ResetLagCounter.key = NULL; + //StateSlots Page -------------------------------------------------- keys->NextSaveSlot.handleKeyDown = HK_NextSaveSlot; keys->NextSaveSlot.code = "NextSaveSlot"; diff --git a/desmume/src/windows/hotkey.h b/desmume/src/windows/hotkey.h index e353e3d9c..66063fef6 100644 --- a/desmume/src/windows/hotkey.h +++ b/desmume/src/windows/hotkey.h @@ -68,7 +68,7 @@ struct SCustomKeys SCustomKey Slot[10]; SCustomKey QuickSave, QuickLoad, NextSaveSlot, PreviousSaveSlot; - SCustomKey OpenROM, Reset, Pause, FrameAdvance, FastForward, FastForwardToggle, IncreaseSpeed, DecreaseSpeed, Microphone; + SCustomKey OpenROM, ReloadROM, Reset, Pause, FrameAdvance, FastForward, FastForwardToggle, IncreaseSpeed, DecreaseSpeed, Microphone; SCustomKey PlayMovie, RecordMovie, StopMovie, ToggleReadOnly; diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index 7f7ea7af8..5b536c6a8 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -1942,6 +1942,7 @@ static BOOL LoadROM(const char * filename, const char * logicalName) void OpenRecentROM(int listNum) { if (listNum > MAX_RECENT_ROMS) return; //Just in case + if (listNum >= RecentRoms.size()) return; char filename[MAX_PATH]; strcpy(filename, RecentRoms[listNum].c_str()); //LOG("Attempting to load %s\n",filename); diff --git a/desmume/src/windows/resource.h b/desmume/src/windows/resource.h index 1c0ddace6..3a271daf7 100644 --- a/desmume/src/windows/resource.h +++ b/desmume/src/windows/resource.h @@ -747,6 +747,7 @@ #define ID_LABEL_HK50 4514 #define ID_LABEL_HK51 4515 #define ID_LABEL_HK52 4516 +#define ID_LABEL_HK53 4517 #define IDD_MICROPHONE 5000 #define IDM_MICROPHONESETTINGS 5001 #define IDC_MICSAMPLEBROWSE 5003 diff --git a/desmume/src/windows/resources.rc b/desmume/src/windows/resources.rc index 0d303f34d..6a2a3a710 100644 Binary files a/desmume/src/windows/resources.rc and b/desmume/src/windows/resources.rc differ