summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-06-14 09:12:16 -0400
committerLioncash <mathew1800@gmail.com>2018-06-14 09:12:19 -0400
commitaae06f1cf7033a50174285edc919ea2167bfdb1f (patch)
tree54cddfafa8d0c84d755a3e85b1e8b719ccd1d441 /Source/Core
parentd459470feef32756f2e6aed9d1670d6cf2d38341 (diff)
HotkeyManager: Move HotkeyGroupInfo struct into the cpp file
This is only ever used internally. Also change the std::string name over to a const char*, so that we don't need to potentially allocate anything on the heap at immediate runtime.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/HotkeyManager.cpp9
-rw-r--r--Source/Core/Core/HotkeyManager.h7
2 files changed, 8 insertions, 8 deletions
diff --git a/Source/Core/Core/HotkeyManager.cpp b/Source/Core/Core/HotkeyManager.cpp
index 7b3f04a5e6..8c897a32b3 100644
--- a/Source/Core/Core/HotkeyManager.cpp
+++ b/Source/Core/Core/HotkeyManager.cpp
@@ -239,7 +239,14 @@ void Shutdown()
}
}
-const std::array<HotkeyGroupInfo, NUM_HOTKEY_GROUPS> groups_info = {
+struct HotkeyGroupInfo
+{
+ const char* name;
+ Hotkey first;
+ Hotkey last;
+};
+
+constexpr std::array<HotkeyGroupInfo, NUM_HOTKEY_GROUPS> groups_info = {
{{_trans("General"), HK_OPEN, HK_EXIT},
{_trans("Volume"), HK_VOLUME_DOWN, HK_VOLUME_TOGGLE_MUTE},
{_trans("Emulation Speed"), HK_DECREASE_EMULATION_SPEED, HK_TOGGLE_THROTTLE},
diff --git a/Source/Core/Core/HotkeyManager.h b/Source/Core/Core/HotkeyManager.h
index f8cc2bdc66..29ece35861 100644
--- a/Source/Core/Core/HotkeyManager.h
+++ b/Source/Core/Core/HotkeyManager.h
@@ -180,13 +180,6 @@ enum HotkeyGroup : int
NUM_HOTKEY_GROUPS,
};
-struct HotkeyGroupInfo
-{
- std::string name;
- Hotkey first;
- Hotkey last;
-};
-
struct HotkeyStatus
{
u32 button[NUM_HOTKEY_GROUPS];