Abstract input backend interface. More...
#include <input_backend.h>
Public Member Functions | |
virtual | ~IInputBackend ()=default |
virtual bool | Initialize (const InputConfig &config)=0 |
Initialize the input backend. | |
virtual void | Shutdown ()=0 |
Shutdown the input backend. | |
virtual ControllerState | Poll (int player=1)=0 |
Poll current input state (call every frame) | |
virtual void | ProcessEvent (void *event)=0 |
Process platform-specific events (optional) | |
virtual InputConfig | GetConfig () const =0 |
Get current configuration. | |
virtual void | SetConfig (const InputConfig &config)=0 |
Update configuration (hot-reload) | |
virtual std::string | GetBackendName () const =0 |
Get backend name for debugging. | |
virtual bool | IsInitialized () const =0 |
Check if backend is initialized. | |
Abstract input backend interface.
Allows swapping between SDL2, SDL3, or custom input implementations without changing emulator code.
Definition at line 84 of file input_backend.h.
|
virtualdefault |
|
pure virtual |
Initialize the input backend.
Implemented in yaze::emu::input::SDL2InputBackend, and yaze::emu::input::NullInputBackend.
|
pure virtual |
Shutdown the input backend.
Implemented in yaze::emu::input::SDL2InputBackend, and yaze::emu::input::NullInputBackend.
|
pure virtual |
Poll current input state (call every frame)
player | Player number (1-4) |
Implemented in yaze::emu::input::SDL2InputBackend, and yaze::emu::input::NullInputBackend.
|
pure virtual |
Process platform-specific events (optional)
event | Platform-specific event data (e.g., SDL_Event*) |
Implemented in yaze::emu::input::SDL2InputBackend, and yaze::emu::input::NullInputBackend.
|
pure virtual |
Get current configuration.
Implemented in yaze::emu::input::SDL2InputBackend, and yaze::emu::input::NullInputBackend.
|
pure virtual |
Update configuration (hot-reload)
Implemented in yaze::emu::input::SDL2InputBackend, and yaze::emu::input::NullInputBackend.
|
pure virtual |
Get backend name for debugging.
Implemented in yaze::emu::input::SDL2InputBackend, and yaze::emu::input::NullInputBackend.
Referenced by yaze::emu::ui::RenderKeyboardConfig(), and yaze::emu::Emulator::Run().
|
pure virtual |
Check if backend is initialized.
Implemented in yaze::emu::input::SDL2InputBackend, and yaze::emu::input::NullInputBackend.