From c034385553f8091ebbb4fbac24e6fb4cd84079f4 Mon Sep 17 00:00:00 2001 From: zeromus Date: Wed, 14 Apr 2010 03:31:43 +0000 Subject: [PATCH] merge 3520-3522 from release branch, add reload rom hotkey, and change label in control config dialog to no longer mention grayed out keys since theyre now all supported. and, as usual, unnecessarily touch 1000 files. --- desmume/src/windows/DeSmuME_2005.vcproj | 672 +++++++++++++----------- desmume/src/windows/hotkey.cpp | 75 +-- desmume/src/windows/hotkey.h | 2 +- desmume/src/windows/main.cpp | 1 + desmume/src/windows/resource.h | 1 + desmume/src/windows/resources.rc | Bin 930732 -> 930682 bytes 6 files changed, 398 insertions(+), 353 deletions(-) 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 0d303f34d4580c89e7880b259a0e057815872d04..6a2a3a7108e0d3c8623c40c39bed0eed5d53c6d7 100644 GIT binary patch delta 5334 zcmds5dvH|c760ztdw1{d-MefcAtBEjisT{9OOlW(k(d}!!)EgUi9yJN%@PdBnkP_( zXF8$-BoNDq6d^)o=%^Tq^;)%UQZ2Nd5hI;JBq<4qN~cZ;!cc1+({t|46H))@Uv@IP zd%yFY?|kR+JCB=}KArdFC-XXwnWj9%N|_Ho)y%`{m0Iz7h`o7XyO0l7o?lg*jy-$F>Nu;!-wax%%yO;iE~2r894!}KNTcxSFA~r zOsVXyw)q|N;cSxWmtrDIV99h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