diff --git a/src/gui/wxgui/input/HotkeySettings.cpp b/src/gui/wxgui/input/HotkeySettings.cpp index cadf3e9d..c7da2f06 100644 --- a/src/gui/wxgui/input/HotkeySettings.cpp +++ b/src/gui/wxgui/input/HotkeySettings.cpp @@ -161,6 +161,7 @@ HotkeySettings::HotkeySettings(wxWindow* parent) #ifdef CEMU_DEBUG_ASSERT CreateHotkeyRow(_tr("End emulation"), s_cfgHotkeys.endEmulation); #endif + CreateHotkeyRow(_tr("Exit application"), s_cfgHotkeys.exitApplication); m_controllerTimer = new wxTimer(this); Bind(wxEVT_TIMER, &HotkeySettings::OnControllerTimer, this); @@ -196,6 +197,9 @@ void HotkeySettings::Init(MainWindow* mainWindowFrame) {&s_cfgHotkeys.toggleFastForward, [](void) { ActiveSettings::SetTimerShiftFactor((ActiveSettings::GetTimerShiftFactor() < 3) ? 3 : 1); }}, + {&s_cfgHotkeys.exitApplication, [](void) { + s_mainWindow->Close(true); + }}, #ifdef CEMU_DEBUG_ASSERT {&s_cfgHotkeys.endEmulation, [](void) { wxTheApp->CallAfter([]() { diff --git a/src/gui/wxgui/wxCemuConfig.cpp b/src/gui/wxgui/wxCemuConfig.cpp index 3c5080d2..3795c3cf 100644 --- a/src/gui/wxgui/wxCemuConfig.cpp +++ b/src/gui/wxgui/wxCemuConfig.cpp @@ -115,6 +115,7 @@ void wxCemuConfig::Load(XMLConfigParser& parser) hotkeys.toggleFullscreenAlt = xml_hotkeys.get("ToggleFullscreenAlt", sHotkeyCfg{uKeyboardHotkey{WXK_CONTROL_M, true}}); // ALT+ENTER hotkeys.takeScreenshot = xml_hotkeys.get("TakeScreenshot", sHotkeyCfg{uKeyboardHotkey{WXK_F12}}); hotkeys.toggleFastForward = xml_hotkeys.get("ToggleFastForward", sHotkeyCfg{}); + hotkeys.exitApplication = xml_hotkeys.get("ExitApplication", sHotkeyCfg{}); #ifdef CEMU_DEBUG_ASSERT hotkeys.endEmulation = xml_hotkeys.get("EndEmulation", sHotkeyCfg{uKeyboardHotkey{WXK_F5}}); #endif @@ -185,4 +186,5 @@ void wxCemuConfig::Save(XMLConfigParser& config) xml_hotkeys.set("ToggleFullscreenAlt", hotkeys.toggleFullscreenAlt); xml_hotkeys.set("TakeScreenshot", hotkeys.takeScreenshot); xml_hotkeys.set("ToggleFastForward", hotkeys.toggleFastForward); + xml_hotkeys.set("ExitApplication", hotkeys.exitApplication); } diff --git a/src/gui/wxgui/wxCemuConfig.h b/src/gui/wxgui/wxCemuConfig.h index a2f758dd..38802ab4 100644 --- a/src/gui/wxgui/wxCemuConfig.h +++ b/src/gui/wxgui/wxCemuConfig.h @@ -127,6 +127,7 @@ struct wxCemuConfig sHotkeyCfg exitFullscreen; sHotkeyCfg takeScreenshot; sHotkeyCfg toggleFastForward; + sHotkeyCfg exitApplication; #ifdef CEMU_DEBUG_ASSERT sHotkeyCfg endEmulation; #endif @@ -151,4 +152,4 @@ inline XMLWxCemuConfig_t& GetWxGuiConfigHandle() inline wxCemuConfig& GetWxGUIConfig() { return GetWxGuiConfigHandle().Data(); -} \ No newline at end of file +}