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,9 +235,6 @@ void InitCustomKeys (SCustomKeys *keys)
i++; i++;
}; };
keys->ToggleFrameCounter.handleKeyDown = HK_ToggleFrame; keys->ToggleFrameCounter.handleKeyDown = HK_ToggleFrame;
keys->ToggleFrameCounter.code = "ToggleFrameDisplay"; keys->ToggleFrameCounter.code = "ToggleFrameDisplay";
keys->ToggleFrameCounter.name = L"Toggle Frame Display"; keys->ToggleFrameCounter.name = L"Toggle Frame Display";
@ -260,6 +259,13 @@ void InitCustomKeys (SCustomKeys *keys)
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;