mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 14:21:57 +00:00
[client] main: bump the minimum fps to 60fps when showing the overlay
This commit is contained in:
parent
3143dc1e84
commit
971e91238a
2 changed files with 8 additions and 2 deletions
|
@ -174,7 +174,8 @@ static int renderThread(void * unused)
|
|||
{
|
||||
/* only update the time if we woke up early */
|
||||
clock_gettime(CLOCK_MONOTONIC, &time);
|
||||
tsAdd(&time, g_state.frameTime);
|
||||
tsAdd(&time, g_state.overlayInput ?
|
||||
g_state.overlayFrameTime : g_state.frameTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -945,6 +946,10 @@ static int lg_run(void)
|
|||
g_state.frameTime = 1000000000ULL / (unsigned long long)g_params.fpsMin;
|
||||
}
|
||||
|
||||
// when the overlay is shown we should run at a minimum of 60 fps for
|
||||
// interactivity.
|
||||
g_state.overlayFrameTime = min(g_state.frameTime, 1000000000ULL / 60ULL);
|
||||
|
||||
keybind_register();
|
||||
|
||||
// setup the startup condition
|
||||
|
|
|
@ -109,7 +109,8 @@ struct AppState
|
|||
LGEvent * frameEvent;
|
||||
atomic_bool invalidateWindow;
|
||||
bool formatValid;
|
||||
atomic_uint_least64_t frameTime;
|
||||
uint64_t frameTime;
|
||||
uint64_t overlayFrameTime;
|
||||
uint64_t lastFrameTime;
|
||||
bool lastFrameTimeValid;
|
||||
uint64_t lastRenderTime;
|
||||
|
|
Loading…
Reference in a new issue