aboutsummaryrefslogtreecommitdiffstats
path: root/Samples/CommonSrc/Platform
diff options
context:
space:
mode:
Diffstat (limited to 'Samples/CommonSrc/Platform')
-rw-r--r--Samples/CommonSrc/Platform/Win32_Platform.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Samples/CommonSrc/Platform/Win32_Platform.h b/Samples/CommonSrc/Platform/Win32_Platform.h
index 23f0b70..a450cb4 100644
--- a/Samples/CommonSrc/Platform/Win32_Platform.h
+++ b/Samples/CommonSrc/Platform/Win32_Platform.h
@@ -61,7 +61,12 @@ public:
bool SetupWindow(int w, int h);
void DestroyWindow();
void ShowWindow(bool visible);
- void Exit(int exitcode) { Quit = 1; ExitCode = exitcode; }
+ void Exit(int exitcode)
+ {
+ for (MSG msg; PeekMessage(&msg, NULL, 0, 0, PM_REMOVE); )
+ ;
+ Quit = 1; ExitCode = exitcode;
+ }
RenderDevice* SetupGraphics(const SetupGraphicsDeviceSet& setupGraphicsDesc,
const char* type,