mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[client] app: allow selective full invalidation
Overlays only need to trigger a new frame if they have changed and not full window invalidation, this change allows for this.
This commit is contained in:
@@ -495,9 +495,10 @@ void app_handleResizeEvent(int w, int h, double scale, const struct Border borde
|
||||
}
|
||||
}
|
||||
|
||||
void app_invalidateWindow(void)
|
||||
void app_invalidateWindow(bool full)
|
||||
{
|
||||
atomic_store(&g_state.invalidateWindow, true);
|
||||
if (full)
|
||||
atomic_store(&g_state.invalidateWindow, true);
|
||||
lgSignalEvent(g_state.frameEvent);
|
||||
}
|
||||
|
||||
@@ -537,7 +538,7 @@ void app_handleRenderEvent(const uint64_t timeUs)
|
||||
}
|
||||
|
||||
if (invalidate)
|
||||
app_invalidateWindow();
|
||||
app_invalidateWindow(false);
|
||||
}
|
||||
|
||||
void app_setFullscreen(bool fs)
|
||||
@@ -616,7 +617,7 @@ void app_alert(LG_MsgAlert type, const char * fmt, ...)
|
||||
g_state.alertTimeout = microtime() + ALERT_TIMEOUT;
|
||||
g_state.alertType = type;
|
||||
g_state.alertShow = true;
|
||||
app_invalidateWindow();
|
||||
app_invalidateWindow(false);
|
||||
}
|
||||
|
||||
KeybindHandle app_registerKeybind(int sc, KeybindFn callback, void * opaque, const char * description)
|
||||
@@ -875,7 +876,7 @@ void app_setOverlay(bool enable)
|
||||
g_state.io->ConfigFlags |= ImGuiConfigFlags_NoMouse;
|
||||
core_resetOverlayInputState();
|
||||
core_setGrabQuiet(wasGrabbed);
|
||||
app_invalidateWindow();
|
||||
app_invalidateWindow(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -31,7 +31,7 @@ static bool showFPS;
|
||||
static void showFPSKeybind(int sc, void * opaque)
|
||||
{
|
||||
showFPS ^= true;
|
||||
app_invalidateWindow();
|
||||
app_invalidateWindow(false);
|
||||
}
|
||||
|
||||
static void fps_earlyInit(void)
|
||||
|
@@ -65,7 +65,7 @@ static void configCallback(void * udata)
|
||||
static void showTimingKeybind(int sc, void * opaque)
|
||||
{
|
||||
gs.show ^= true;
|
||||
app_invalidateWindow();
|
||||
app_invalidateWindow(false);
|
||||
}
|
||||
|
||||
static bool graphs_init(void ** udata, const void * params)
|
||||
|
Reference in New Issue
Block a user