diff options
Diffstat (limited to 'StarsEx/GameWinDX9.cpp')
-rw-r--r-- | StarsEx/GameWinDX9.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/StarsEx/GameWinDX9.cpp b/StarsEx/GameWinDX9.cpp index 6e779c7..4b5b2d8 100644 --- a/StarsEx/GameWinDX9.cpp +++ b/StarsEx/GameWinDX9.cpp @@ -568,25 +568,20 @@ GameWinDX9::LoadPalette(PALETTEENTRY* pal, BYTE* inv) } -int -GameWinDX9::Run() +void +GameWinDX9::PumpEvents() { MSG msg; - status = RUN; - Clock::GetInstance()->Set(); - while (status < EXIT && !Panic::Panicked()) { - if (PeekMessage(&msg, hwnd, 0, 0, PM_REMOVE)) { - if (msg.message == WM_QUIT) + while (PeekMessage(&msg, hwnd, 0, 0, PM_REMOVE)) { + if (msg.message == WM_QUIT) { + if (!exit_code) + exit_code = msg.wParam; + Exit(); break; - - TranslateMessage(&msg); - DispatchMessage(&msg); - } - else { - GameLoop(); } + TranslateMessage(&msg); + DispatchMessage(&msg); } - return exit_code ? exit_code : msg.wParam; } |