4#include "imgui/imgui.h"
40 LOG_WARN(
"InputBackend",
"Already initialized");
49 LOG_INFO(
"InputBackend",
"SDL2 Input Backend initialized");
56 LOG_INFO(
"InputBackend",
"SDL2 Input Backend shut down");
108 static int button_log_count = 0;
109 if (state.
buttons != 0 && button_log_count++ < 100) {
110 LOG_INFO(
"InputBackend",
"SDL2 Poll: buttons=0x%04X (keyboard detected)",
128 SDL_Event* sdl_event =
static_cast<SDL_Event*
>(event);
214 "SDL2 backend requested but SDL3 build enabled, using SDL3");
215 return std::make_unique<SDL3InputBackend>();
217 return std::make_unique<SDL2InputBackend>();
222 return std::make_unique<SDL3InputBackend>();
225 "SDL3 backend requested but not available, using SDL2");
226 return std::make_unique<SDL2InputBackend>();
230 return std::make_unique<NullInputBackend>();
234 LOG_ERROR(
"InputBackend",
"Unknown backend type, using SDL3");
235 return std::make_unique<SDL3InputBackend>();
237 LOG_ERROR(
"InputBackend",
"Unknown backend type, using SDL2");
238 return std::make_unique<SDL2InputBackend>();
#define LOG_ERROR(category, format,...)
#define LOG_WARN(category, format,...)
#define LOG_INFO(category, format,...)
SDL2/SDL3 compatibility layer.