mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 22:31:46 +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 */
|
/* only update the time if we woke up early */
|
||||||
clock_gettime(CLOCK_MONOTONIC, &time);
|
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;
|
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();
|
keybind_register();
|
||||||
|
|
||||||
// setup the startup condition
|
// setup the startup condition
|
||||||
|
|
|
@ -109,7 +109,8 @@ struct AppState
|
||||||
LGEvent * frameEvent;
|
LGEvent * frameEvent;
|
||||||
atomic_bool invalidateWindow;
|
atomic_bool invalidateWindow;
|
||||||
bool formatValid;
|
bool formatValid;
|
||||||
atomic_uint_least64_t frameTime;
|
uint64_t frameTime;
|
||||||
|
uint64_t overlayFrameTime;
|
||||||
uint64_t lastFrameTime;
|
uint64_t lastFrameTime;
|
||||||
bool lastFrameTimeValid;
|
bool lastFrameTimeValid;
|
||||||
uint64_t lastRenderTime;
|
uint64_t lastRenderTime;
|
||||||
|
|
Loading…
Reference in a new issue