Files
radiantwave/src/app_state.h
T
2026-08-07 14:51:41 -05:00

42 lines
1.6 KiB
C

#pragma once
#include <SDL3/SDL.h>
#include "page_manager.h"
#include "keybind_manager.h"
#include "config/config_manager.h"
#include "db/database_manager.h"
#include "network/network_manager.h"
#include "network/license_status.h"
#include "audio/audio_manager.h"
#include "audio/audio_downloader.h"
struct AppState {
SDL_Window* window = nullptr;
SDL_Renderer* renderer = nullptr;
PageManager pages;
KeybindManager keybinds;
radiantwave::config::ConfigManager config;
radiantwave::db::DatabaseManager db;
radiantwave::network::NetworkManager network;
radiantwave::license::LicenseStatusTracker licenseTracker;
radiantwave::audio::AudioManager audio;
radiantwave::audio::AudioDownloader audioDownloader;
bool quitRequested = false;
// While >0, the app is fading audio out before quitting; decremented in
// SDL_AppIterate until it reaches zero and teardown runs.
float quitFadeRemaining = 0.0f;
int currentMenuItem = 0;
// First-Run walkthrough state (see provisioning.h). provisioningMode is
// true only while a walkthrough step page is on the stack; it is cleared
// when Home is reached. walkthroughInternetUp caches the step-1 result so
// advancing past the WiFi page never re-runs a blocking probe.
bool provisioningMode = false;
bool walkthroughInternetUp = false;
// Placeholder flag raised when the device is brand-new (no internet, no
// email, no license). Will later launch the first-run welcome walkthrough
// (TOS, quick user guide, ...).
bool firstRunWalkthrough = false;
};