Windows: Consistently shutdown the main thread after exiting the message loop.

This commit is contained in:
Henrik Rydgård 2018-02-10 09:06:43 +01:00
parent 8ad5b499a9
commit 081e15d1c8
2 changed files with 4 additions and 5 deletions

View file

@ -866,7 +866,6 @@ namespace MainWindow
case WM_CLOSE:
InputDevice::StopPolling();
MainThread_Stop();
WindowsRawInput::Shutdown();
return DefWindowProc(hWnd,message,wParam,lParam);

View file

@ -571,10 +571,8 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
break;
}
if (!TranslateAccelerator(wnd, accel, &msg))
{
if (!DialogManager::IsDialogMessage(&msg))
{
if (!TranslateAccelerator(wnd, accel, &msg)) {
if (!DialogManager::IsDialogMessage(&msg)) {
//and finally translate and dispatch
TranslateMessage(&msg);
DispatchMessage(&msg);
@ -582,6 +580,8 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
}
}
MainThread_Stop();
VFSShutdown();
InputDevice::StopPolling();