Shut down Wii software gracefully

This adds support for triggering the power event (in the STM), so that
stopping emulation first triggers a shutdown event, which notably gives
emulated software time to save game data (issue 8979) and clean up
SYSCONF (to disconnect Wiimotes and update their state in the SYSCONF).

On the first press, the stop button/hotkey/whatever will trigger a STM
power event. On a second try, we will forcefully stop emulation, just
like how it was working before.
This commit is contained in:
Léo Lam
2016-09-19 00:49:15 +02:00
parent ae723f5251
commit 9b72b5f144
6 changed files with 69 additions and 5 deletions

View File

@ -158,6 +158,7 @@ private:
bool m_bGameLoading = false;
bool m_bClosing = false;
bool m_confirmStop = false;
bool m_tried_graceful_shutdown = false;
int m_saveSlot = 1;
std::vector<std::string> drives;