Win32 - Added Reset hotkey. Changed Printscreen to Save Screen Shot As to match the equivlant menu item. Changed screenshot default key to F12 which is the more standard screenshot hotkey

This commit is contained in:
adelikat 2009-04-12 20:42:50 +00:00
parent 6e3963d1ca
commit 2474633f79
4 changed files with 27 additions and 15 deletions

View File

@ -157,6 +157,8 @@ void HK_AutoHoldClearKeyDown(int) {
} }
} }
void HK_Reset(int) {ResetGame();}
void HK_ToggleFrame(int) {frameCounterDisplay ^= true;} void HK_ToggleFrame(int) {frameCounterDisplay ^= true;}
void HK_ToggleFPS(int) {FpsDisplay ^= true;} void HK_ToggleFPS(int) {FpsDisplay ^= true;}
void HK_ToggleInput(int) {ShowInputDisplay ^= true;} void HK_ToggleInput(int) {ShowInputDisplay ^= true;}
@ -233,33 +235,37 @@ void InitCustomKeys (SCustomKeys *keys)
i++; i++;
}; };
keys->ToggleFrameCounter.handleKeyDown = HK_ToggleFrame; keys->ToggleFrameCounter.handleKeyDown = HK_ToggleFrame;
keys->ToggleFrameCounter.code = "Toggle Frame Display"; keys->ToggleFrameCounter.code = "ToggleFrameDisplay";
keys->ToggleFrameCounter.name = L"Toggle Frame Display"; keys->ToggleFrameCounter.name = L"Toggle Frame Display";
keys->ToggleFrameCounter.page = HOTKEY_PAGE_MAIN; keys->ToggleFrameCounter.page = HOTKEY_PAGE_MAIN;
keys->ToggleFrameCounter.key = VK_OEM_PERIOD; keys->ToggleFrameCounter.key = VK_OEM_PERIOD;
keys->ToggleFPS.handleKeyDown = HK_ToggleFPS; keys->ToggleFPS.handleKeyDown = HK_ToggleFPS;
keys->ToggleFPS.code = "Toggle FPS Display"; keys->ToggleFPS.code = "ToggleFPSDisplay";
keys->ToggleFPS.name = L"Toggle FPS Display"; keys->ToggleFPS.name = L"Toggle FPS Display";
keys->ToggleFPS.page = HOTKEY_PAGE_MAIN; keys->ToggleFPS.page = HOTKEY_PAGE_MAIN;
keys->ToggleFPS.key = NULL; keys->ToggleFPS.key = NULL;
keys->ToggleInput.handleKeyDown = HK_ToggleInput; keys->ToggleInput.handleKeyDown = HK_ToggleInput;
keys->ToggleInput.code = "Toggle Input Display"; keys->ToggleInput.code = "ToggleInputDisplay";
keys->ToggleInput.name = L"Toggle Input Display"; keys->ToggleInput.name = L"Toggle Input Display";
keys->ToggleInput.page = HOTKEY_PAGE_MAIN; keys->ToggleInput.page = HOTKEY_PAGE_MAIN;
keys->ToggleInput.key = VK_OEM_COMMA; keys->ToggleInput.key = VK_OEM_COMMA;
keys->ToggleLag.handleKeyDown = HK_ToggleLag; keys->ToggleLag.handleKeyDown = HK_ToggleLag;
keys->ToggleLag.code = "Toggle Lag Display"; keys->ToggleLag.code = "ToggleLagDisplay";
keys->ToggleLag.name = L"Toggle Lag Display"; keys->ToggleLag.name = L"Toggle Lag Display";
keys->ToggleLag.page = HOTKEY_PAGE_MAIN; keys->ToggleLag.page = HOTKEY_PAGE_MAIN;
keys->ToggleLag.key = NULL; keys->ToggleLag.key = NULL;
keys->Reset.handleKeyDown = HK_Reset;
keys->Reset.code = "Reset";
keys->Reset.name = L"Reset";
keys->Reset.page = HOTKEY_PAGE_MAIN;
keys->Reset.key = 'R';
keys->Reset.modifiers = CUSTKEY_CTRL_MASK;
keys->Pause.handleKeyDown = HK_Pause; keys->Pause.handleKeyDown = HK_Pause;
keys->Pause.code = "Pause"; keys->Pause.code = "Pause";
keys->Pause.name = L"Pause"; keys->Pause.name = L"Pause";
@ -387,10 +393,10 @@ void InitCustomKeys (SCustomKeys *keys)
keys->ToggleRasterizer.key = VK_SUBTRACT; keys->ToggleRasterizer.key = VK_SUBTRACT;
keys->PrintScreen.handleKeyDown = HK_PrintScreen; keys->PrintScreen.handleKeyDown = HK_PrintScreen;
keys->PrintScreen.code = "PrintScreen"; keys->PrintScreen.code = "SaveScreenshotas";
keys->PrintScreen.name = L"Print Screen"; keys->PrintScreen.name = L"Save Screenshot as";
keys->PrintScreen.page = HOTKEY_PAGE_MAIN; keys->PrintScreen.page = HOTKEY_PAGE_MAIN;
keys->PrintScreen.key = VK_PAUSE; keys->PrintScreen.key = VK_F12;
keys->Microphone.handleKeyDown = HK_MicrophoneKeyDown; keys->Microphone.handleKeyDown = HK_MicrophoneKeyDown;
keys->Microphone.handleKeyUp = HK_MicrophoneKeyUp; keys->Microphone.handleKeyUp = HK_MicrophoneKeyUp;

View File

@ -65,7 +65,7 @@ struct SCustomKeys
SCustomKey Slot[10]; SCustomKey Slot[10];
SCustomKey QuickSave, QuickLoad; SCustomKey QuickSave, QuickLoad;
SCustomKey Pause, FrameAdvance, FastForward, FastForwardToggle, IncreaseSpeed, DecreaseSpeed, Microphone; SCustomKey Reset, Pause, FrameAdvance, FastForward, FastForwardToggle, IncreaseSpeed, DecreaseSpeed, Microphone;
SCustomKey TurboRight, TurboLeft, TurboDown, TurboUp, TurboSelect, TurboStart, TurboB, TurboA, TurboY, TurboX; SCustomKey TurboRight, TurboLeft, TurboDown, TurboUp, TurboSelect, TurboStart, TurboB, TurboA, TurboY, TurboX;

View File

@ -2998,9 +2998,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
return 0; return 0;
case IDM_RESET: case IDM_RESET:
CheatsSearchReset(); ResetGame();
NDS_Reset();
frameCounter=0;
return 0; return 0;
case IDM_3DCONFIG: case IDM_3DCONFIG:
@ -3721,3 +3719,10 @@ LRESULT CALLBACK SoundSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARA
return FALSE; return FALSE;
} }
void ResetGame()
{
CheatsSearchReset();
NDS_Reset();
frameCounter=0;
}

View File

@ -12,8 +12,9 @@ void SaveStateMessages(int slotnum, int whichMessage);
void Display(); void Display();
void Pause(); void Pause();
void FrameAdvance(); void FrameAdvance();
extern bool ShowInputDisplay; void ResetGame(); //Resets game (for the menu item & hotkey
extern bool ShowInputDisplay;
extern bool frameCounterDisplay; extern bool frameCounterDisplay;
extern bool FpsDisplay; extern bool FpsDisplay;
extern bool ShowInputDisplay; extern bool ShowInputDisplay;