Frame time fix

This commit is contained in:
Joshua Granick
2014-07-06 20:51:20 -07:00
parent 5fae3b4ff6
commit 4f1a0c449e
2 changed files with 5 additions and 0 deletions

View File

@@ -94,11 +94,15 @@ namespace lime {
if (currentUpdate - lastUpdate < 16) {
lastUpdate = currentUpdate;
timerActive = true;
timerID = SDL_AddTimer (lastUpdate + 16 - currentUpdate, OnTimer, 0);
} else {
lastUpdate = currentUpdate;
OnTimer (0, 0);
}

View File

@@ -17,6 +17,7 @@ namespace lime {
if (context) {
SDL_GL_SetSwapInterval (0);
SDL_GL_MakeCurrent (sdlWindow, context);
}