diff options
| author | shuffle2 <godisgovernment@gmail.com> | 2016-10-15 21:47:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-15 21:47:07 -0700 |
| commit | ce5c8c28b299cb95e140d73e6cce8d83fd6c1f8b (patch) | |
| tree | 8686abc2fec2b3270f8be1a70caafaa9f78df96c /Source/Core/DolphinWX/MainNoGUI.cpp | |
| parent | d2d4edf964924bbf1badf23cc09ead45c0cf947a (diff) | |
| parent | a0a246bf3e33eac9fd4d234590c721d972979bc7 (diff) | |
Merge pull request #4302 from leoetlino/graceful-fixes
Minor fixes to graceful shutdown
Diffstat (limited to 'Source/Core/DolphinWX/MainNoGUI.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/MainNoGUI.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/DolphinWX/MainNoGUI.cpp b/Source/Core/DolphinWX/MainNoGUI.cpp index 8e8512c07d..216eb5a707 100644 --- a/Source/Core/DolphinWX/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/MainNoGUI.cpp @@ -23,6 +23,8 @@ #include "Core/Core.h" #include "Core/HW/Wiimote.h" #include "Core/Host.h" +#include "Core/IPC_HLE/WII_IPC_HLE.h" +#include "Core/IPC_HLE/WII_IPC_HLE_Device_stm.h" #include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_bt_emu.h" #include "Core/IPC_HLE/WII_IPC_HLE_WiiMote.h" #include "Core/State.h" @@ -232,7 +234,9 @@ class PlatformX11 : public Platform { if (s_shutdown_requested.TestAndClear()) { - if (!s_tried_graceful_shutdown.IsSet() && SConfig::GetInstance().bWii) + const auto& stm = WII_IPC_HLE_Interface::GetDeviceByName("/dev/stm/eventhook"); + if (!s_tried_graceful_shutdown.IsSet() && stm && + std::static_pointer_cast<CWII_IPC_HLE_Device_stm_eventhook>(stm)->HasHookInstalled()) { ProcessorInterface::PowerButton_Tap(); s_tried_graceful_shutdown.Set(); |
