Adjusted sync2() to sync to FPS - 1, like sync() does. Now runs much smoother in Super Elvis.
This commit is contained in:
parent
810d495a83
commit
23791a0230
|
@ -290,7 +290,7 @@ public final class Display {
|
|||
*/
|
||||
private static long timeLate;
|
||||
public static void sync2(int fps) {
|
||||
long gapTo = Sys.getTimerResolution() / fps + timeThen;
|
||||
long gapTo = Sys.getTimerResolution() / (fps > 1 ? fps - 1 : 1) + timeThen;
|
||||
timeNow = Sys.getTime();
|
||||
|
||||
while (gapTo > timeNow + timeLate) {
|
||||
|
|
Loading…
Reference in New Issue