Current status of SDL.

This commit is contained in:
BadQuanta
2026-05-13 19:48:22 +00:00
parent 28e9c4ba18
commit 15bb051619
24 changed files with 1806 additions and 360 deletions
+22 -1
View File
@@ -1,5 +1,5 @@
#pragma once
#include <SDL3/SDL.h>
#include <hdk/sdl.hpp>
/// @file Application.hpp
/// For complete documentation, see src/Application.cpp
namespace hdk::sdl {
@@ -24,4 +24,25 @@ namespace hdk::sdl {
// Default quit behavior is to do nothing, allowing the app to control its own lifetime.
}
};
/** Defines basically everything except for Init */
class ProtectedApp : public AppInterface {
protected:
SDL_AppResult AppStatus { SDL_APP_CONTINUE };
const sdl::Log& AppLog { sdl::Log::Application };
public:
sdl::evt::AllTypes events;
virtual SDL_AppResult Event(SDL_Event* event) override {
events.Trigger(event);
return AppStatus;
}
grid::eps::Conduit<> OnIterate;
virtual SDL_AppResult Iterate() override {
OnIterate();
return AppStatus;
}
virtual void Quit(SDL_AppResult code) override {
AppLog.Debug("Quit called with code %d", code);
}
};
} // namespace hdk::sdl