Classes | |
| struct | ControllerState |
| Controller state (16-bit SNES controller format) More... | |
| class | IInputBackend |
| Abstract input backend interface. More... | |
| class | InputBackendFactory |
| Factory for creating input backends. More... | |
| struct | InputConfig |
| Input configuration (platform-agnostic key codes) More... | |
| class | InputManager |
| class | NullInputBackend |
| Null input backend for testing/replay. More... | |
| class | SDL2InputBackend |
| SDL2 input backend implementation. More... | |
| class | SDL3InputBackend |
| SDL3 input backend implementation. More... | |
Enumerations | |
| enum class | SnesButton : uint8_t { B = 0 , Y = 1 , SELECT = 2 , START = 3 , UP = 4 , DOWN = 5 , LEFT = 6 , RIGHT = 7 , A = 8 , X = 9 , L = 10 , R = 11 } |
| SNES controller button mapping (platform-agnostic) More... | |
Functions | |
| void | ApplyDefaultKeyBindings (InputConfig &config) |
| Apply default keyboard bindings if unset. | |
|
strong |
SNES controller button mapping (platform-agnostic)
| Enumerator | |
|---|---|
| B | |
| Y | |
| SELECT | |
| START | |
| UP | |
| DOWN | |
| LEFT | |
| RIGHT | |
| A | |
| X | |
| L | |
| R | |
Definition at line 15 of file input_backend.h.
| void yaze::emu::input::ApplyDefaultKeyBindings | ( | InputConfig & | config | ) |
Apply default keyboard bindings if unset.
Sets SNES buttons to a sensible keyboard layout when keycodes are 0.
Definition at line 15 of file input_backend.cc.
References yaze::emu::input::InputConfig::key_a, yaze::emu::input::InputConfig::key_b, yaze::emu::input::InputConfig::key_down, yaze::emu::input::InputConfig::key_l, yaze::emu::input::InputConfig::key_left, yaze::emu::input::InputConfig::key_r, yaze::emu::input::InputConfig::key_right, yaze::emu::input::InputConfig::key_select, yaze::emu::input::InputConfig::key_start, yaze::emu::input::InputConfig::key_up, yaze::emu::input::InputConfig::key_x, yaze::emu::input::InputConfig::key_y, yaze::platform::kKeyA, yaze::platform::kKeyC, yaze::platform::kKeyD, yaze::platform::kKeyDown, yaze::platform::kKeyLeft, yaze::platform::kKeyReturn, yaze::platform::kKeyRight, yaze::platform::kKeyRShift, yaze::platform::kKeyS, yaze::platform::kKeyUp, yaze::platform::kKeyX, and yaze::platform::kKeyZ.
Referenced by yaze::emu::input::SDL2InputBackend::Initialize(), yaze::emu::input::NullInputBackend::Initialize(), yaze::emu::input::SDL3InputBackend::Initialize(), yaze::emu::input::InputManager::Initialize(), yaze::emu::input::InputManager::Initialize(), yaze::emu::input::InputManager::InputManager(), yaze::emu::ui::RenderKeyboardConfig(), and yaze::emu::input::InputManager::SetConfig().