[client] main: prevent accidental access to appState without accessors
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled

This commit is contained in:
Geoffrey McRae
2026-07-29 11:58:04 +10:00
parent 56ad487d0a
commit 5196c5503a
2 changed files with 6 additions and 4 deletions

View File

@@ -61,8 +61,6 @@ enum AudioResampler {
struct AppState
{
_Atomic(enum RunState) state;
ImGuiIO * io;
ImGuiStyle * style;
struct ll * overlays;
@@ -353,12 +351,14 @@ extern struct AppParams g_params;
static inline enum RunState app_getState(void)
{
return atomic_load_explicit(&g_state.state, memory_order_acquire);
extern _Atomic(enum RunState) p_appState;
return atomic_load_explicit(&p_appState, memory_order_acquire);
}
static inline void app_setState(enum RunState state)
{
atomic_store_explicit(&g_state.state, state, memory_order_release);
extern _Atomic(enum RunState) p_appState;
atomic_store_explicit(&p_appState, state, memory_order_release);
}
int main_cursorThread(void * unused);