yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::emu::input::IInputBackend Class Referenceabstract

Abstract input backend interface. More...

#include <input_backend.h>

Inheritance diagram for yaze::emu::input::IInputBackend:

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~IInputBackend()

virtual yaze::emu::input::IInputBackend::~IInputBackend ( )
virtualdefault

Member Function Documentation

◆ Initialize()

virtual bool yaze::emu::input::IInputBackend::Initialize ( const InputConfig config)
pure virtual

Initialize the input backend.

Implemented in yaze::emu::input::SDL2InputBackend, and yaze::emu::input::NullInputBackend.

◆ Shutdown()

virtual void yaze::emu::input::IInputBackend::Shutdown ( )
pure virtual

Shutdown the input backend.

Implemented in yaze::emu::input::SDL2InputBackend, and yaze::emu::input::NullInputBackend.

◆ Poll()

virtual ControllerState yaze::emu::input::IInputBackend::Poll ( int  player = 1)
pure virtual

Poll current input state (call every frame)

Parameters
playerPlayer number (1-4)
Returns
Current controller state

Implemented in yaze::emu::input::SDL2InputBackend, and yaze::emu::input::NullInputBackend.

◆ ProcessEvent()

virtual void yaze::emu::input::IInputBackend::ProcessEvent ( void *  event)
pure virtual

Process platform-specific events (optional)

Parameters
eventPlatform-specific event data (e.g., SDL_Event*)

Implemented in yaze::emu::input::SDL2InputBackend, and yaze::emu::input::NullInputBackend.

◆ GetConfig()

virtual InputConfig yaze::emu::input::IInputBackend::GetConfig ( ) const
pure virtual

Get current configuration.

Implemented in yaze::emu::input::SDL2InputBackend, and yaze::emu::input::NullInputBackend.

◆ SetConfig()

virtual void yaze::emu::input::IInputBackend::SetConfig ( const InputConfig config)
pure virtual

Update configuration (hot-reload)

Implemented in yaze::emu::input::SDL2InputBackend, and yaze::emu::input::NullInputBackend.

◆ GetBackendName()

virtual std::string yaze::emu::input::IInputBackend::GetBackendName ( ) const
pure virtual

◆ IsInitialized()

virtual bool yaze::emu::input::IInputBackend::IsInitialized ( ) const
pure virtual

Check if backend is initialized.

Implemented in yaze::emu::input::SDL2InputBackend, and yaze::emu::input::NullInputBackend.


The documentation for this class was generated from the following file: