mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-14 11:28:11 +00:00
[client] main: improve frame rate sync lock with the guest
If the guest is not sending frames at a constant rate, the minimum FPS timeout may expire drawing an additional frame. This change calculates the average ups frame time over the past 100ms and adds this to the timeout value allowing this value to be dynamic.
This commit is contained in:
@@ -104,7 +104,7 @@ struct AppState
|
||||
RingBuffer renderTimings;
|
||||
RingBuffer frameTimings;
|
||||
|
||||
atomic_uint_least64_t renderCount, frameCount;
|
||||
atomic_uint_least64_t renderCount, frameCount, upsTime;
|
||||
_Atomic(float) fps, ups;
|
||||
|
||||
uint64_t resizeTimeout;
|
||||
|
Reference in New Issue
Block a user