fix dumbfounding issue on win32 that caused HUGE lags

This commit is contained in:
Eduardo Bart 2012-04-04 13:21:02 -03:00
parent 034fce9147
commit 2c38dfb397
2 changed files with 3 additions and 1 deletions

View File

@ -406,7 +406,7 @@ void WIN32Window::poll()
fireKeysPress(); fireKeysPress();
MSG msg; MSG msg;
if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
TranslateMessage(&msg); TranslateMessage(&msg);
DispatchMessage(&msg); DispatchMessage(&msg);
} }

View File

@ -40,6 +40,8 @@ typedef int32_t int32;
typedef int16_t int16; typedef int16_t int16;
typedef int8_t int8; typedef int8_t int8;
// note that on 32 bit platforms the max ticks will overflow for valeus above 2,147,483,647
// thus this means that the app may crash after running 24 days without restarting
typedef long ticks_t; typedef long ticks_t;
typedef std::function<void()> SimpleCallback; typedef std::function<void()> SimpleCallback;