mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
On windows, ignore WM_QUERYENDSESSION and close upon WM_ENDSESSION.
The messages can come through CFrame::MSWWindowProc and the wxApp implementation, so make sure to catch both. Fixes issue 6546.
This commit is contained in:
@ -71,6 +71,8 @@ IMPLEMENT_APP(DolphinApp)
|
||||
|
||||
BEGIN_EVENT_TABLE(DolphinApp, wxApp)
|
||||
EVT_TIMER(wxID_ANY, DolphinApp::AfterInit)
|
||||
EVT_QUERY_END_SESSION(DolphinApp::OnEndSession)
|
||||
EVT_END_SESSION(DolphinApp::OnEndSession)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
#include <wx/stdpaths.h>
|
||||
@ -433,6 +435,15 @@ void DolphinApp::InitLanguageSupport()
|
||||
}
|
||||
}
|
||||
|
||||
void DolphinApp::OnEndSession(wxCloseEvent& event)
|
||||
{
|
||||
// Close if we've recieved wxEVT_END_SESSION (ignore wxEVT_QUERY_END_SESSION)
|
||||
if (!event.CanVeto())
|
||||
{
|
||||
main_frame->Close(true);
|
||||
}
|
||||
}
|
||||
|
||||
int DolphinApp::OnExit()
|
||||
{
|
||||
WiimoteReal::Shutdown();
|
||||
|
Reference in New Issue
Block a user