Initial Video, Render, and Properties implementations.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
BadQuanta
2026-04-26 14:39:01 +00:00
parent 6d0de7e621
commit 85dbe33a77
17 changed files with 2461 additions and 50 deletions
+32
View File
@@ -0,0 +1,32 @@
#pragma once
#include <SDL3/SDL.h>
#include <cstdlib>
inline void hdk_set_headless_video_driver() {
#if defined(_WIN32)
_putenv_s("SDL_VIDEODRIVER", "dummy");
#else
setenv("SDL_VIDEODRIVER", "dummy", 1);
#endif
}
class SDLSession {
public:
SDLSession() {
hdk_set_headless_video_driver();
initialized = SDL_Init(SDL_INIT_VIDEO);
}
~SDLSession() {
if (initialized) {
SDL_Quit();
}
}
bool IsInitialized() const { return initialized; }
private:
bool initialized = false;
};