diff --git a/dispatcher.c b/dispatcher.c index 6197faa..665a842 100644 --- a/dispatcher.c +++ b/dispatcher.c @@ -111,11 +111,10 @@ static void notify_subscribers(AppState *state) { // State access // ============================================================ -AppState dispatcher_get_state(void) { +void dispatcher_get_state(AppState *out) { pthread_mutex_lock(&dispatcher.state_mutex); - AppState state = dispatcher.state; + *out = dispatcher.state; pthread_mutex_unlock(&dispatcher.state_mutex); - return state; } // ============================================================