// // Created by darman on 9/24/26. // #pragma once namespace SiegeDeck::Engine { // Owns the process-wide SDL_Init / SDL_Quit pair. Anything that talks to SDL // must be declared after this in Application, so it is torn down first. // // Only core subsystems are initialized here. Audio belongs to AudioSystem, which // brings it up through SDL_mixer, so a machine without an audio device can still // run the headless --frames smoke test. // // Exactly one per process, and never relocated: not copyable, not movable. class SdlContext { public: // Throws std::runtime_error if SDL can't initialize (fatal: nothing to fall back to). SdlContext(const string& appName, const string& appVersion); ~SdlContext(); SdlContext(const SdlContext&) = delete; SdlContext& operator=(const SdlContext&) = delete; SdlContext(SdlContext&&) = delete; SdlContext& operator=(SdlContext&&) = delete; }; }