mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-02 05:12:02 +00:00
[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
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:
@@ -75,6 +75,8 @@ static LGEvent *e_spice = NULL;
|
||||
static LGThread *t_spice = NULL;
|
||||
static LGThread *t_render = NULL;
|
||||
|
||||
_Atomic(enum RunState) p_appState = APP_STATE_RUNNING;
|
||||
|
||||
struct AppState g_state =
|
||||
{
|
||||
.cbRemoteType = SPICE_DATA_NONE,
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user