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

Null input backend for testing/replay. More...

Inheritance diagram for yaze::emu::input::NullInputBackend:
Collaboration diagram for yaze::emu::input::NullInputBackend:

Public Member Functions

bool Initialize (const InputConfig &config) override
 Initialize the input backend.
 
void Shutdown () override
 Shutdown the input backend.
 
ControllerState Poll (int player) override
 Poll current input state (call every frame)
 
void ProcessEvent (void *event) override
 Process platform-specific events (optional)
 
InputConfig GetConfig () const override
 Get current configuration.
 
void SetConfig (const InputConfig &config) override
 Update configuration (hot-reload)
 
std::string GetBackendName () const override
 Get backend name for debugging.
 
bool IsInitialized () const override
 Check if backend is initialized.
 
void SetReplayState (const ControllerState &state)
 
- Public Member Functions inherited from yaze::emu::input::IInputBackend
virtual ~IInputBackend ()=default
 

Private Attributes

InputConfig config_
 
ControllerState replay_state_
 

Detailed Description

Null input backend for testing/replay.

Definition at line 154 of file input_backend.cc.

Member Function Documentation

◆ Initialize()

bool yaze::emu::input::NullInputBackend::Initialize ( const InputConfig config)
inlineoverridevirtual

Initialize the input backend.

Implements yaze::emu::input::IInputBackend.

Definition at line 156 of file input_backend.cc.

References config_.

◆ Shutdown()

void yaze::emu::input::NullInputBackend::Shutdown ( )
inlineoverridevirtual

Shutdown the input backend.

Implements yaze::emu::input::IInputBackend.

Definition at line 160 of file input_backend.cc.

◆ Poll()

ControllerState yaze::emu::input::NullInputBackend::Poll ( int  player)
inlineoverridevirtual

Poll current input state (call every frame)

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

Implements yaze::emu::input::IInputBackend.

Definition at line 161 of file input_backend.cc.

References replay_state_.

◆ ProcessEvent()

void yaze::emu::input::NullInputBackend::ProcessEvent ( void *  event)
inlineoverridevirtual

Process platform-specific events (optional)

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

Implements yaze::emu::input::IInputBackend.

Definition at line 162 of file input_backend.cc.

◆ GetConfig()

InputConfig yaze::emu::input::NullInputBackend::GetConfig ( ) const
inlineoverridevirtual

Get current configuration.

Implements yaze::emu::input::IInputBackend.

Definition at line 163 of file input_backend.cc.

References config_.

◆ SetConfig()

void yaze::emu::input::NullInputBackend::SetConfig ( const InputConfig config)
inlineoverridevirtual

Update configuration (hot-reload)

Implements yaze::emu::input::IInputBackend.

Definition at line 164 of file input_backend.cc.

References config_.

◆ GetBackendName()

std::string yaze::emu::input::NullInputBackend::GetBackendName ( ) const
inlineoverridevirtual

Get backend name for debugging.

Implements yaze::emu::input::IInputBackend.

Definition at line 165 of file input_backend.cc.

◆ IsInitialized()

bool yaze::emu::input::NullInputBackend::IsInitialized ( ) const
inlineoverridevirtual

Check if backend is initialized.

Implements yaze::emu::input::IInputBackend.

Definition at line 166 of file input_backend.cc.

◆ SetReplayState()

void yaze::emu::input::NullInputBackend::SetReplayState ( const ControllerState state)
inline

Definition at line 169 of file input_backend.cc.

References replay_state_.

Member Data Documentation

◆ config_

InputConfig yaze::emu::input::NullInputBackend::config_
private

Definition at line 172 of file input_backend.cc.

Referenced by GetConfig(), Initialize(), and SetConfig().

◆ replay_state_

ControllerState yaze::emu::input::NullInputBackend::replay_state_
private

Definition at line 173 of file input_backend.cc.

Referenced by Poll(), and SetReplayState().


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