mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-13 15:59:23 +01:00
Frame: Rename GetCmdForHotkey to GetMenuIDFromHotkey
This more accurately describes what it's actually doing. This can also be a local function, since it's not needed anywhere else.
This commit is contained in:
parent
f871b2177e
commit
42e1dafd6d
@ -866,7 +866,7 @@ static bool IsHotkey(int id, bool held = false)
|
|||||||
return HotkeyManagerEmu::IsPressed(id, held);
|
return HotkeyManagerEmu::IsPressed(id, held);
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetCmdForHotkey(unsigned int key)
|
static int GetMenuIDFromHotkey(unsigned int key)
|
||||||
{
|
{
|
||||||
switch (key)
|
switch (key)
|
||||||
{
|
{
|
||||||
@ -1288,11 +1288,11 @@ void CFrame::ParseHotkeys()
|
|||||||
|
|
||||||
if (IsHotkey(i))
|
if (IsHotkey(i))
|
||||||
{
|
{
|
||||||
int cmd = GetCmdForHotkey(i);
|
const int id = GetMenuIDFromHotkey(i);
|
||||||
if (cmd >= 0)
|
if (id >= 0)
|
||||||
{
|
{
|
||||||
wxCommandEvent evt(wxEVT_MENU, cmd);
|
wxCommandEvent evt(wxEVT_MENU, id);
|
||||||
wxMenuItem* item = GetMenuBar()->FindItem(cmd);
|
wxMenuItem* item = GetMenuBar()->FindItem(id);
|
||||||
if (item && item->IsCheckable())
|
if (item && item->IsCheckable())
|
||||||
{
|
{
|
||||||
item->wxMenuItemBase::Toggle();
|
item->wxMenuItemBase::Toggle();
|
||||||
|
@ -342,8 +342,6 @@ private:
|
|||||||
DECLARE_EVENT_TABLE();
|
DECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
int GetCmdForHotkey(unsigned int key);
|
|
||||||
|
|
||||||
void OnAfterLoadCallback();
|
void OnAfterLoadCallback();
|
||||||
void OnStoppedCallback();
|
void OnStoppedCallback();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user