diff --git a/win32/InputCustom.cpp b/win32/InputCustom.cpp index de74534f..7269ac65 100644 --- a/win32/InputCustom.cpp +++ b/win32/InputCustom.cpp @@ -518,6 +518,7 @@ int GetNumHotKeysAssignedTo (WORD Key, int modifiers) if(MATCHES_KEY(SaveFileSelect)) count++; if(MATCHES_KEY(LoadFileSelect)) count++; if(MATCHES_KEY(Mute)) count++; + if(MATCHES_KEY(ToggleBackdrop)) count++; #undef MATCHES_KEY } diff --git a/win32/wconfig.cpp b/win32/wconfig.cpp index 9e3640e2..70a09c47 100644 --- a/win32/wconfig.cpp +++ b/win32/wconfig.cpp @@ -938,6 +938,7 @@ void WinRegisterConfigItems() ADD(QuitS9X);ADD(Rewind); ADD(SaveFileSelect); ADD(LoadFileSelect); ADD(Mute); + ADD(ToggleBackdrop); #undef ADD #undef ADDN #undef CATEGORY diff --git a/win32/wlanguage.h b/win32/wlanguage.h index 47edd318..8bea748e 100644 --- a/win32/wlanguage.h +++ b/win32/wlanguage.h @@ -134,8 +134,7 @@ Nintendo is a trademark.") #define HOTKEYS_LABEL_4_10 TEXT("Select Slot 9:") #define HOTKEYS_LABEL_4_11 TEXT("Save to file:") #define HOTKEYS_LABEL_4_12 TEXT("Load from file:") - - +#define HOTKEYS_LABEL_4_13 TEXT("Toggle backdrop:") // gaming buttons and axes #define GAMEDEVICE_JOYNUMPREFIX "(J%x)" // don't change this diff --git a/win32/wsnes9x.cpp b/win32/wsnes9x.cpp index 5743e77c..f468b6ff 100644 --- a/win32/wsnes9x.cpp +++ b/win32/wsnes9x.cpp @@ -378,6 +378,7 @@ struct SCustomKeys CustomKeys = { {0,0}, // background layer 3 {0,0}, // background layer 4 {0,0}, // sprite layer + {0,0}, // Toggle backdrop {0,0}, // Clipping Windows {0,0}, // Transparency {'6',0}, // Joypad Swap @@ -1216,6 +1217,13 @@ int HandleKeyMessage(WPARAM wParam, LPARAM lParam) GUI.Mute = !GUI.Mute; hitHotKey = true; } + + if (wParam == CustomKeys.ToggleBackdrop.key && modifiers == CustomKeys.ToggleBackdrop.modifiers) + { + auto cmd = S9xGetCommandT("ToggleBackdrop"); + S9xApplyCommand(cmd, 1, 0); + } + //if(wParam == CustomKeys.BGLHack.key //&& modifiers == CustomKeys.BGLHack.modifiers) //{ @@ -8340,7 +8348,7 @@ static hotkey_dialog_item hotkey_dialog_items[4][MAX_SWITCHABLE_HOTKEY_DIALOG_IT { &CustomKeys.SelectSave[9], HOTKEYS_LABEL_4_10 }, { &CustomKeys.SaveFileSelect, HOTKEYS_LABEL_4_11 }, { &CustomKeys.LoadFileSelect, HOTKEYS_LABEL_4_12 }, - { NULL, _T("") }, + { &CustomKeys.ToggleBackdrop, HOTKEYS_LABEL_4_13 }, { NULL, _T("") }, }, }; diff --git a/win32/wsnes9x.h b/win32/wsnes9x.h index 4b9ca1d9..f3fa7b0c 100644 --- a/win32/wsnes9x.h +++ b/win32/wsnes9x.h @@ -335,6 +335,7 @@ struct SCustomKeys { SCustomKey BGL3; SCustomKey BGL4; SCustomKey BGL5; + SCustomKey ToggleBackdrop; SCustomKey ClippingWindows; SCustomKey Transparency; SCustomKey JoypadSwap;