mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 13:33:40 +00:00
[client] audio: redraw the graphs if they have been updated
This commit is contained in:
parent
775ac7ce8b
commit
0ad26b7da7
@ -116,6 +116,7 @@ typedef const char * (*GraphFormatFn)(const char * name,
|
||||
GraphHandle app_registerGraph(const char * name, RingBuffer buffer,
|
||||
float min, float max, GraphFormatFn formatFn);
|
||||
void app_unregisterGraph(GraphHandle handle);
|
||||
void app_invalidateGraphs(void);
|
||||
|
||||
void app_overlayConfigRegister(const char * title,
|
||||
void (*callback)(void * udata, int * id), void * udata);
|
||||
|
@ -706,6 +706,11 @@ void app_unregisterGraph(GraphHandle handle)
|
||||
overlayGraph_unregister(handle);
|
||||
}
|
||||
|
||||
void app_invalidateGraphs(void)
|
||||
{
|
||||
overlayGraph_invalidate();
|
||||
}
|
||||
|
||||
void app_registerOverlay(const struct LG_OverlayOps * ops, const void * params)
|
||||
{
|
||||
ASSERT_LG_OVERLAY_VALID(ops);
|
||||
|
@ -298,4 +298,6 @@ void audio_tick(unsigned long long tickCount)
|
||||
ringbuffer_push(audio.playback.timings, &flatency);
|
||||
|
||||
LG_UNLOCK(audio.playback.lock);
|
||||
|
||||
app_invalidateGraphs();
|
||||
}
|
||||
|
@ -241,3 +241,11 @@ void overlayGraph_iterate(void (*callback)(GraphHandle handle, const char * name
|
||||
callback(graph, graph->name, &graph->enabled, udata);
|
||||
ll_unlock(gs.graphs);
|
||||
}
|
||||
|
||||
void overlayGraph_invalidate(void)
|
||||
{
|
||||
if (!gs.show)
|
||||
return;
|
||||
|
||||
app_invalidateWindow(false);
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ GraphHandle overlayGraph_register(const char * name, RingBuffer buffer,
|
||||
void overlayGraph_unregister();
|
||||
void overlayGraph_iterate(void (*callback)(GraphHandle handle, const char * name,
|
||||
bool * enabled, void * udata), void * udata);
|
||||
void overlayGraph_invalidate(void);
|
||||
|
||||
void overlayConfig_register(const char * title,
|
||||
void (*callback)(void * udata, int * id), void * udata);
|
||||
|
Loading…
Reference in New Issue
Block a user