mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -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:
@ -539,9 +539,24 @@ void CFrame::OnResize(wxSizeEvent& event)
|
||||
WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||
{
|
||||
if (WM_SYSCOMMAND == nMsg && (SC_SCREENSAVE == wParam || SC_MONITORPOWER == wParam))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (nMsg == WM_QUERYENDSESSION)
|
||||
{
|
||||
// Indicate that the application will be able to close
|
||||
return 1;
|
||||
}
|
||||
else if (nMsg == WM_ENDSESSION)
|
||||
{
|
||||
// Actually trigger the close now
|
||||
Close(true);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return wxFrame::MSWWindowProc(nMsg, wParam, lParam);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user