mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 23:07:18 +00:00
[client] app: add keybind to toggle frame timing information display
This commit is contained in:
parent
73357988e6
commit
df2f623599
@ -642,6 +642,9 @@ bool rbCalcMetrics(int index, float * value, float * udata)
|
|||||||
|
|
||||||
bool app_renderImGui(void)
|
bool app_renderImGui(void)
|
||||||
{
|
{
|
||||||
|
if (!g_state.showTiming)
|
||||||
|
return false;
|
||||||
|
|
||||||
igNewFrame();
|
igNewFrame();
|
||||||
|
|
||||||
ImGuiStyle * style = igGetStyle();
|
ImGuiStyle * style = igGetStyle();
|
||||||
|
@ -54,6 +54,11 @@ static void bind_showFPS(int sc, void * opaque)
|
|||||||
app_showFPS(g_state.showFPS);
|
app_showFPS(g_state.showFPS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void bind_showTiming(int sc, void * opaque)
|
||||||
|
{
|
||||||
|
g_state.showTiming = !g_state.showTiming;
|
||||||
|
}
|
||||||
|
|
||||||
static void bind_rotate(int sc, void * opaque)
|
static void bind_rotate(int sc, void * opaque)
|
||||||
{
|
{
|
||||||
if (g_params.winRotate == LG_ROTATE_MAX-1)
|
if (g_params.winRotate == LG_ROTATE_MAX-1)
|
||||||
@ -134,6 +139,7 @@ void keybind_register(void)
|
|||||||
app_registerKeybind(KEY_F, bind_fullscreen, NULL, "Full screen toggle");
|
app_registerKeybind(KEY_F, bind_fullscreen, NULL, "Full screen toggle");
|
||||||
app_registerKeybind(KEY_V, bind_video , NULL, "Video stream toggle");
|
app_registerKeybind(KEY_V, bind_video , NULL, "Video stream toggle");
|
||||||
app_registerKeybind(KEY_D, bind_showFPS , NULL, "FPS display toggle");
|
app_registerKeybind(KEY_D, bind_showFPS , NULL, "FPS display toggle");
|
||||||
|
app_registerKeybind(KEY_T, bind_showTiming, NULL, "Show frame timing information");
|
||||||
app_registerKeybind(KEY_R, bind_rotate , NULL, "Rotate the output clockwise by 90° increments");
|
app_registerKeybind(KEY_R, bind_rotate , NULL, "Rotate the output clockwise by 90° increments");
|
||||||
app_registerKeybind(KEY_Q, bind_quit , NULL, "Quit");
|
app_registerKeybind(KEY_Q, bind_quit , NULL, "Quit");
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ struct AppState
|
|||||||
bool stopVideo;
|
bool stopVideo;
|
||||||
bool ignoreInput;
|
bool ignoreInput;
|
||||||
bool showFPS;
|
bool showFPS;
|
||||||
|
bool showTiming;
|
||||||
bool escapeActive;
|
bool escapeActive;
|
||||||
uint64_t escapeTime;
|
uint64_t escapeTime;
|
||||||
int escapeAction;
|
int escapeAction;
|
||||||
|
Loading…
Reference in New Issue
Block a user