libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
SDLButtonToButtonMapping.h
Go to the documentation of this file.
3#include <memory>
4
5namespace Ship {
6class ConsoleVariable;
7class ControlDeck;
8
16 public:
23 SDLButtonToButtonMapping(uint8_t portIndex, CONTROLLERBUTTONS_T bitmask, int32_t sdlControllerButton,
24 std::shared_ptr<ControlDeck> controlDeck = nullptr,
25 std::shared_ptr<ConsoleVariable> consoleVariable = nullptr);
26
31 void UpdatePad(CONTROLLERBUTTONS_T& padButtons) override;
32
34 int8_t GetMappingType() override;
35
37 std::string GetButtonMappingId() override;
38
40 void SaveToConfig() override;
41
43 void EraseFromConfig() override;
44
46 std::string GetPhysicalDeviceName() override;
47
49 std::string GetPhysicalInputName() override;
50
51 protected:
52 std::shared_ptr<ConsoleVariable> mConsoleVariable;
53 std::shared_ptr<ControlDeck> mControlDeck;
54};
55} // namespace Ship
#define CONTROLLERBUTTONS_T
Definition ControllerButtonMapping.h:13
Maps a physical input to a virtual controller button.
Definition ControllerButtonMapping.h:23
Base class for mappings that bind an SDL gamepad button to any controller input.
Definition SDLButtonToAnyMapping.h:15
Maps an SDL gamepad button to a virtual controller button.
Definition SDLButtonToButtonMapping.h:15
std::string GetButtonMappingId() override
Returns the unique string identifier for this mapping.
int8_t GetMappingType() override
Returns the mapping type identifier.
SDLButtonToButtonMapping(uint8_t portIndex, CONTROLLERBUTTONS_T bitmask, int32_t sdlControllerButton, std::shared_ptr< ControlDeck > controlDeck=nullptr, std::shared_ptr< ConsoleVariable > consoleVariable=nullptr)
Constructs an SDL button-to-button mapping.
std::string GetPhysicalDeviceName() override
Returns the human-readable name of the SDL gamepad device.
void UpdatePad(CONTROLLERBUTTONS_T &padButtons) override
Updates the pad button state based on the current gamepad button state.
std::string GetPhysicalInputName() override
Returns the human-readable name of the bound button.
void SaveToConfig() override
Persists this mapping to the application configuration.
std::shared_ptr< ControlDeck > mControlDeck
Definition SDLButtonToButtonMapping.h:53
std::shared_ptr< ConsoleVariable > mConsoleVariable
Definition SDLButtonToButtonMapping.h:52
void EraseFromConfig() override
Removes this mapping from the application configuration.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14