mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
first ticks for win32
This commit is contained in:
@@ -76,12 +76,12 @@ void Engine::run()
|
||||
lastFrameTicks = ticks;
|
||||
|
||||
// render only when visible
|
||||
if(Platform::isWindowVisible()) {
|
||||
//if(Platform::isWindowVisible()) {
|
||||
render();
|
||||
|
||||
// swap buffers
|
||||
Platform::swapBuffers();
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
lastFrameTicks = 0;
|
||||
|
@@ -62,6 +62,9 @@ void Platform::init(const char *appName)
|
||||
|
||||
if(!RegisterClassA(&wc))
|
||||
fatal("Failed to register the window class.");
|
||||
|
||||
// force first tick
|
||||
Platform::getTicks();
|
||||
}
|
||||
|
||||
void Platform::terminate()
|
||||
|
Reference in New Issue
Block a user