mirror of https://github.com/snes9xgit/snes9x.git
win32: Add Toggle Backdrop hotkey.
This commit is contained in:
parent
79e150886a
commit
2a6b040f3e
|
@ -518,6 +518,7 @@ int GetNumHotKeysAssignedTo (WORD Key, int modifiers)
|
||||||
if(MATCHES_KEY(SaveFileSelect)) count++;
|
if(MATCHES_KEY(SaveFileSelect)) count++;
|
||||||
if(MATCHES_KEY(LoadFileSelect)) count++;
|
if(MATCHES_KEY(LoadFileSelect)) count++;
|
||||||
if(MATCHES_KEY(Mute)) count++;
|
if(MATCHES_KEY(Mute)) count++;
|
||||||
|
if(MATCHES_KEY(ToggleBackdrop)) count++;
|
||||||
|
|
||||||
#undef MATCHES_KEY
|
#undef MATCHES_KEY
|
||||||
}
|
}
|
||||||
|
|
|
@ -938,6 +938,7 @@ void WinRegisterConfigItems()
|
||||||
ADD(QuitS9X);ADD(Rewind);
|
ADD(QuitS9X);ADD(Rewind);
|
||||||
ADD(SaveFileSelect); ADD(LoadFileSelect);
|
ADD(SaveFileSelect); ADD(LoadFileSelect);
|
||||||
ADD(Mute);
|
ADD(Mute);
|
||||||
|
ADD(ToggleBackdrop);
|
||||||
#undef ADD
|
#undef ADD
|
||||||
#undef ADDN
|
#undef ADDN
|
||||||
#undef CATEGORY
|
#undef CATEGORY
|
||||||
|
|
|
@ -134,8 +134,7 @@ Nintendo is a trademark.")
|
||||||
#define HOTKEYS_LABEL_4_10 TEXT("Select Slot 9:")
|
#define HOTKEYS_LABEL_4_10 TEXT("Select Slot 9:")
|
||||||
#define HOTKEYS_LABEL_4_11 TEXT("Save to file:")
|
#define HOTKEYS_LABEL_4_11 TEXT("Save to file:")
|
||||||
#define HOTKEYS_LABEL_4_12 TEXT("Load from file:")
|
#define HOTKEYS_LABEL_4_12 TEXT("Load from file:")
|
||||||
|
#define HOTKEYS_LABEL_4_13 TEXT("Toggle backdrop:")
|
||||||
|
|
||||||
|
|
||||||
// gaming buttons and axes
|
// gaming buttons and axes
|
||||||
#define GAMEDEVICE_JOYNUMPREFIX "(J%x)" // don't change this
|
#define GAMEDEVICE_JOYNUMPREFIX "(J%x)" // don't change this
|
||||||
|
|
|
@ -378,6 +378,7 @@ struct SCustomKeys CustomKeys = {
|
||||||
{0,0}, // background layer 3
|
{0,0}, // background layer 3
|
||||||
{0,0}, // background layer 4
|
{0,0}, // background layer 4
|
||||||
{0,0}, // sprite layer
|
{0,0}, // sprite layer
|
||||||
|
{0,0}, // Toggle backdrop
|
||||||
{0,0}, // Clipping Windows
|
{0,0}, // Clipping Windows
|
||||||
{0,0}, // Transparency
|
{0,0}, // Transparency
|
||||||
{'6',0}, // Joypad Swap
|
{'6',0}, // Joypad Swap
|
||||||
|
@ -1216,6 +1217,13 @@ int HandleKeyMessage(WPARAM wParam, LPARAM lParam)
|
||||||
GUI.Mute = !GUI.Mute;
|
GUI.Mute = !GUI.Mute;
|
||||||
hitHotKey = true;
|
hitHotKey = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wParam == CustomKeys.ToggleBackdrop.key && modifiers == CustomKeys.ToggleBackdrop.modifiers)
|
||||||
|
{
|
||||||
|
auto cmd = S9xGetCommandT("ToggleBackdrop");
|
||||||
|
S9xApplyCommand(cmd, 1, 0);
|
||||||
|
}
|
||||||
|
|
||||||
//if(wParam == CustomKeys.BGLHack.key
|
//if(wParam == CustomKeys.BGLHack.key
|
||||||
//&& modifiers == CustomKeys.BGLHack.modifiers)
|
//&& 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.SelectSave[9], HOTKEYS_LABEL_4_10 },
|
||||||
{ &CustomKeys.SaveFileSelect, HOTKEYS_LABEL_4_11 },
|
{ &CustomKeys.SaveFileSelect, HOTKEYS_LABEL_4_11 },
|
||||||
{ &CustomKeys.LoadFileSelect, HOTKEYS_LABEL_4_12 },
|
{ &CustomKeys.LoadFileSelect, HOTKEYS_LABEL_4_12 },
|
||||||
{ NULL, _T("") },
|
{ &CustomKeys.ToggleBackdrop, HOTKEYS_LABEL_4_13 },
|
||||||
{ NULL, _T("") },
|
{ NULL, _T("") },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -335,6 +335,7 @@ struct SCustomKeys {
|
||||||
SCustomKey BGL3;
|
SCustomKey BGL3;
|
||||||
SCustomKey BGL4;
|
SCustomKey BGL4;
|
||||||
SCustomKey BGL5;
|
SCustomKey BGL5;
|
||||||
|
SCustomKey ToggleBackdrop;
|
||||||
SCustomKey ClippingWindows;
|
SCustomKey ClippingWindows;
|
||||||
SCustomKey Transparency;
|
SCustomKey Transparency;
|
||||||
SCustomKey JoypadSwap;
|
SCustomKey JoypadSwap;
|
||||||
|
|
Loading…
Reference in New Issue