Merge pull request #838 from Steelskin/fix-ret-value-filter-event
Use constant aliases in MainFrame::FilterEvent()
This commit is contained in:
commit
157277e028
|
@ -869,14 +869,14 @@ int MainFrame::FilterEvent(wxEvent& event)
|
||||||
int keyMod = ke.GetModifiers();
|
int keyMod = ke.GetModifiers();
|
||||||
wxAcceleratorEntry_v accels = wxGetApp().GetAccels();
|
wxAcceleratorEntry_v accels = wxGetApp().GetAccels();
|
||||||
for (size_t i = 0; i < accels.size(); ++i)
|
for (size_t i = 0; i < accels.size(); ++i)
|
||||||
if (keyCode == accels[i].GetKeyCode() && keyMod == accels[i].GetFlags()
|
if (keyCode == accels[i].GetKeyCode() && keyMod == accels[i].GetFlags()
|
||||||
&& accels[i].GetCommand() != XRCID("NOOP"))
|
&& accels[i].GetCommand() != XRCID("NOOP"))
|
||||||
{
|
{
|
||||||
wxCommandEvent evh(wxEVT_COMMAND_MENU_SELECTED, accels[i].GetCommand());
|
wxCommandEvent evh(wxEVT_COMMAND_MENU_SELECTED, accels[i].GetCommand());
|
||||||
evh.SetEventObject(this);
|
evh.SetEventObject(this);
|
||||||
GetEventHandler()->ProcessEvent(evh);
|
GetEventHandler()->ProcessEvent(evh);
|
||||||
return true;
|
return wxEventFilter::Event_Processed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (event.GetEventType() == wxEVT_SDLJOY && !menus_opened && !dialog_opened)
|
else if (event.GetEventType() == wxEVT_SDLJOY && !menus_opened && !dialog_opened)
|
||||||
{
|
{
|
||||||
|
@ -894,11 +894,11 @@ int MainFrame::FilterEvent(wxEvent& event)
|
||||||
wxCommandEvent evh(wxEVT_COMMAND_MENU_SELECTED, accels[i].GetCommand());
|
wxCommandEvent evh(wxEVT_COMMAND_MENU_SELECTED, accels[i].GetCommand());
|
||||||
evh.SetEventObject(this);
|
evh.SetEventObject(this);
|
||||||
GetEventHandler()->ProcessEvent(evh);
|
GetEventHandler()->ProcessEvent(evh);
|
||||||
return true;
|
return wxEventFilter::Event_Processed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -1;
|
return wxEventFilter::Event_Skip;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString MainFrame::GetGamePath(wxString path)
|
wxString MainFrame::GetGamePath(wxString path)
|
||||||
|
|
Loading…
Reference in New Issue