Add Hotkeys for Skylanders Portal and Infinity Base Menus

Adds two new hotkeys to open the menus for emulated USB devices- Skylanders Portal of Power and the Infinity Base. (Hotkeys only active when game is running).

Portal menu: Default is <Ctrl+P>.
Infinity base: Default is <Ctrl+I>
This commit is contained in:
jnaidu360
2023-05-25 15:27:00 -07:00
parent 0f4dbdb0d4
commit 5eb1669573
10 changed files with 98 additions and 1 deletions

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"}));
}