From 30f46e4cfbb631058ea58036916944b7ee5e0949 Mon Sep 17 00:00:00 2001 From: zeromus Date: Wed, 14 Apr 2010 03:47:38 +0000 Subject: [PATCH] merge that new stuff into release branch. and, as usual, unnecessarily touch 1000 files. --- 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 928488 -> 928390 bytes 5 files changed, 46 insertions(+), 33 deletions(-) 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 a0cc56e49b2d09ae200424d9ec62b140b667c4ad..9610bea8b81944a14bd3a67d055c4970df8b1ee7 100644 GIT binary patch delta 1330 zcmb7@Ur19?9LLYj?%9sl-L)Pp8#OH=Yz!HaYsj!sYvnYvWx3ceOPAAfi3%2!L{XYq zjc)jZh}dKQ83mpqk`cWHI*KGDVs8mS4SI=)(Ybe94WX=u`|$gHe}6vb-0xX<>%8#R znRuvO=0k^2KmVdAj0RB{G%{TUw=R+1a}I$y1kJTM7OxPtYT(8iY=UH)-U+cvLC5TC zg@BXA%J9US#WNV6(Wx8Q>nEE^403vM9o*fhZH0weT`Oz1 zY7bMnDPGOK*JyoMej!zlj?`+|NUh+Xg{T*|uqHxIY=iZKxCT-V+6oyT5y09&3{YNA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