diff --git a/VERSION b/VERSION index 41d70439..9ec0904e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -B2-rc1-4-gdedab38b99+1 \ No newline at end of file +B2-rc1-5-g9b6174793a+1 \ No newline at end of file diff --git a/client/src/config.c b/client/src/config.c index 8b1bba8a..7e2c8f9c 100644 --- a/client/src/config.c +++ b/client/src/config.c @@ -175,7 +175,7 @@ static struct Option options[] = }, { .module = "win", - .name = "fpsMinimum", + .name = "fpsMin", .description = "Frame rate minimum (0 = disable - not recommended, -1 = auto detect)", .shortopt = 'K', .type = OPTION_TYPE_INT, diff --git a/client/src/main.c b/client/src/main.c index 25875e4e..c09a5b3b 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -191,17 +191,20 @@ static int renderThread(void * unused) state.resizeDone = true; } - clock_gettime(CLOCK_REALTIME, &time); - uint64_t nsec = time.tv_nsec + state.frameTime; - if(nsec > 1e9) + if (state.frameTime > 0) { - time.tv_nsec = nsec - 1e9; - ++time.tv_sec; - } - else - time.tv_nsec = nsec; + clock_gettime(CLOCK_REALTIME, &time); + uint64_t nsec = time.tv_nsec + state.frameTime; + if(nsec > 1e9) + { + time.tv_nsec = nsec - 1e9; + ++time.tv_sec; + } + else + time.tv_nsec = nsec; - lgWaitEventAbs(e_frame, &time); + lgWaitEventAbs(e_frame, &time); + } } state.running = false;