Merge pull request #11845 from jnaidu360/skylanders-portal-hotkey

Add hotkey to open Skylanders and Infinity Menus
This commit is contained in:
Admiral H. Curtiss authored and GitHub committed 2023-05-28 23:27:41 +02:00
commit 4dc4b28db4
10 files changed
+98 -1

No files matched your search

+8 -1
View File
@@ -194,6 +194,9 @@ constexpr std::array<const char*, NUM_HOTKEYS> s_hotkey_labels{{
_trans("2x"),
_trans("3x"),
_trans("4x"),
_trans("Show Skylanders Portal"),
_trans("Show Infinity Base")
}};
// clang-format on
static_assert(NUM_HOTKEYS == s_hotkey_labels.size(), "Wrong count of hotkey_labels");
@@ -354,7 +357,8 @@ constexpr std::array<HotkeyGroupInfo, NUM_HOTKEY_GROUPS> s_groups_info = {
{_trans("Other State Hotkeys"), HK_SAVE_FIRST_STATE, HK_DECREMENT_SELECTED_STATE_SLOT},
{_trans("GBA Core"), HK_GBA_LOAD, HK_GBA_RESET, true},
{_trans("GBA Volume"), HK_GBA_VOLUME_DOWN, HK_GBA_TOGGLE_MUTE, true},
{_trans("GBA Window Size"), HK_GBA_1X, HK_GBA_4X, true}}};
{_trans("GBA Window Size"), HK_GBA_1X, HK_GBA_4X, true},
{_trans("USB Emulation Devices"), HK_SKYLANDERS_PORTAL, HK_INFINITY_BASE}}};
HotkeyManager::HotkeyManager()
{
@@ -490,4 +494,7 @@ void HotkeyManager::LoadDefaults(const ControllerInterface& ciface)
set_key_expression(HK_GBA_3X, "`KP_3`");
set_key_expression(HK_GBA_4X, "`KP_4`");
#endif
set_key_expression(HK_SKYLANDERS_PORTAL, hotkey_string({"Ctrl", "P"}));
set_key_expression(HK_INFINITY_BASE, hotkey_string({"Ctrl", "I"}));
}
+4
View File
@@ -180,6 +180,9 @@ enum Hotkey
HK_GBA_3X,
HK_GBA_4X,
HK_SKYLANDERS_PORTAL,
HK_INFINITY_BASE,
NUM_HOTKEYS,
};
@@ -211,6 +214,7 @@ enum HotkeyGroup : int
HKGP_GBA_CORE,
HKGP_GBA_VOLUME,
HKGP_GBA_SIZE,
HKGP_USB_EMU,
NUM_HOTKEY_GROUPS,
};