Frame time fix
This commit is contained in:
@@ -94,11 +94,15 @@ namespace lime {
|
|||||||
|
|
||||||
if (currentUpdate - lastUpdate < 16) {
|
if (currentUpdate - lastUpdate < 16) {
|
||||||
|
|
||||||
|
lastUpdate = currentUpdate;
|
||||||
|
|
||||||
timerActive = true;
|
timerActive = true;
|
||||||
timerID = SDL_AddTimer (lastUpdate + 16 - currentUpdate, OnTimer, 0);
|
timerID = SDL_AddTimer (lastUpdate + 16 - currentUpdate, OnTimer, 0);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
lastUpdate = currentUpdate;
|
||||||
|
|
||||||
OnTimer (0, 0);
|
OnTimer (0, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ namespace lime {
|
|||||||
|
|
||||||
if (context) {
|
if (context) {
|
||||||
|
|
||||||
|
SDL_GL_SetSwapInterval (0);
|
||||||
SDL_GL_MakeCurrent (sdlWindow, context);
|
SDL_GL_MakeCurrent (sdlWindow, context);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user