win32: fast forward now has separate active and toggle hotkeys

This commit is contained in:
p989 2009-04-04 21:23:01 +00:00
parent 51c37da018
commit 1f1507b9ef
3 changed files with 14 additions and 3 deletions

View File

@ -131,7 +131,9 @@ void HK_StateQuickLoadSlot(int)
}
void HK_Pause(int) { Pause(); }
void HK_FastForward(int) { FastForward ^=1; }
void HK_FastForwardToggle(int) { FastForward ^=1; }
void HK_FastForwardKeyDown(int) { FastForward = 1; }
void HK_FastForwardKeyUp(int) { FastForward = 0; }
void HK_IncreaseSpeed(int) { IncreaseSpeed(); }
void HK_DecreaseSpeed(int) { DecreaseSpeed(); }
void HK_FrameAdvance(int) { FrameAdvance(); }
@ -172,12 +174,19 @@ void InitCustomKeys (SCustomKeys *keys)
keys->Pause.page = HOTKEY_PAGE_MAIN;
keys->Pause.key = VK_SPACE;
keys->FastForward.handleKeyDown = HK_FastForward;
keys->FastForward.handleKeyDown = HK_FastForwardKeyDown;
keys->FastForward.handleKeyUp = HK_FastForwardKeyUp;
keys->FastForward.code = "FastForward";
keys->FastForward.name = L"Fast Forward";
keys->FastForward.page = HOTKEY_PAGE_MAIN;
keys->FastForward.key = VK_TAB;
keys->FastForwardToggle.handleKeyDown = HK_FastForwardToggle;
keys->FastForwardToggle.code = "FastForwardToggle";
keys->FastForwardToggle.name = L"Fast Forward Toggle";
keys->FastForwardToggle.page = HOTKEY_PAGE_MAIN;
keys->FastForwardToggle.key = NULL;
keys->IncreaseSpeed.handleKeyDown = HK_IncreaseSpeed;
keys->IncreaseSpeed.code = "IncreaseSpeed";
keys->IncreaseSpeed.name = L"Increase Speed";

View File

@ -63,7 +63,7 @@ struct SCustomKeys
SCustomKey Slot[10];
SCustomKey QuickSave, QuickLoad;
SCustomKey Pause, FrameAdvance, FastForward, IncreaseSpeed, DecreaseSpeed;
SCustomKey Pause, FrameAdvance, FastForward, FastForwardToggle, IncreaseSpeed, DecreaseSpeed;
SCustomKey ToggleRasterizer;

View File

@ -2277,6 +2277,8 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
return 0;
break;
}
case WM_KEYUP:
case WM_SYSKEYUP:
case WM_CUSTKEYUP:
{
int modifiers = GetModifiers(wParam);