mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-15 20:08:17 +00:00
[client] renderer: add ability to toggle the FPS display
Before, if you want to see the FPS, you need to close the client and restart it with the -k switch to see the FPS. This is annoying. This PR introduces a new keybind, ScrollLock+D, which, when pressed, toggles the display of the FPS. This is implemented for both EGL and OpenGL backends.
This commit is contained in:
@@ -47,6 +47,12 @@ static void bind_video(int sc, void * opaque)
|
||||
core_startFrameThread();
|
||||
}
|
||||
|
||||
static void bind_showFPS(int sc, void * opaque)
|
||||
{
|
||||
g_state.showFPS = !g_state.showFPS;
|
||||
app_showFPS(g_state.showFPS);
|
||||
}
|
||||
|
||||
static void bind_rotate(int sc, void * opaque)
|
||||
{
|
||||
if (g_params.winRotate == LG_ROTATE_MAX-1)
|
||||
@@ -126,6 +132,7 @@ void keybind_register(void)
|
||||
{
|
||||
app_registerKeybind(KEY_F, bind_fullscreen, NULL, "Full screen toggle");
|
||||
app_registerKeybind(KEY_V, bind_video , NULL, "Video stream toggle");
|
||||
app_registerKeybind(KEY_D, bind_showFPS , NULL, "FPS display toggle");
|
||||
app_registerKeybind(KEY_R, bind_rotate , NULL, "Rotate the output clockwise by 90° increments");
|
||||
app_registerKeybind(KEY_Q, bind_quit , NULL, "Quit");
|
||||
|
||||
|
Reference in New Issue
Block a user