diff --git a/desmume/src/windows/hotkey.cpp b/desmume/src/windows/hotkey.cpp index 7db098a28..12f57111e 100644 --- a/desmume/src/windows/hotkey.cpp +++ b/desmume/src/windows/hotkey.cpp @@ -157,6 +157,8 @@ void HK_AutoHoldClearKeyDown(int) { } } +void HK_ToggleLag(int) {ShowLagFrameCounter ^= true;} + void HK_AutoHoldKeyDown(int) {AutoHoldPressed = true;} void HK_AutoHoldKeyUp(int) {AutoHoldPressed = false;} @@ -228,6 +230,12 @@ void InitCustomKeys (SCustomKeys *keys) i++; }; + keys->ToggleLag.handleKeyDown = HK_ToggleLag; + keys->ToggleLag.code = "Toggle Lag Display"; + keys->ToggleLag.name = L"Toggle Lag Display"; + keys->ToggleLag.page = HOTKEY_PAGE_MAIN; + keys->ToggleLag.key = NULL; + keys->Pause.handleKeyDown = HK_Pause; keys->Pause.code = "Pause"; keys->Pause.name = L"Pause"; diff --git a/desmume/src/windows/hotkey.h b/desmume/src/windows/hotkey.h index e01521f19..7ebc969f8 100644 --- a/desmume/src/windows/hotkey.h +++ b/desmume/src/windows/hotkey.h @@ -74,6 +74,7 @@ struct SCustomKeys SCustomKey ToggleRasterizer; SCustomKey PrintScreen; + SCustomKey ToggleLag; SCustomKey LastItem; // dummy, must be last //--methods-- diff --git a/desmume/src/windows/main.h b/desmume/src/windows/main.h index 2901e77b1..df973d5f9 100644 --- a/desmume/src/windows/main.h +++ b/desmume/src/windows/main.h @@ -13,6 +13,7 @@ void Display(); void Pause(); void FrameAdvance(); extern bool ShowInputDisplay; +extern bool ShowLagFrameCounter; #define GPU3D_NULL 0 #define GPU3D_OPENGL 1