libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
SDLButtonToButtonMapping.h
Go to the documentation of this file.
1
#include "
ship/controller/controldevice/controller/mapping/ControllerButtonMapping.h
"
2
#include "
ship/controller/controldevice/controller/mapping/sdl/SDLButtonToAnyMapping.h
"
3
#include <memory>
4
5
namespace
Ship
{
6
class
ConsoleVariable;
7
class
ControlDeck;
8
15
class
SDLButtonToButtonMapping
final :
public
SDLButtonToAnyMapping
,
public
ControllerButtonMapping
{
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
ControllerButtonMapping.h
CONTROLLERBUTTONS_T
#define CONTROLLERBUTTONS_T
Definition
ControllerButtonMapping.h:13
SDLButtonToAnyMapping.h
Ship::ControllerButtonMapping
Maps a physical input to a virtual controller button.
Definition
ControllerButtonMapping.h:23
Ship::SDLButtonToAnyMapping
Base class for mappings that bind an SDL gamepad button to any controller input.
Definition
SDLButtonToAnyMapping.h:15
Ship::SDLButtonToButtonMapping
Maps an SDL gamepad button to a virtual controller button.
Definition
SDLButtonToButtonMapping.h:15
Ship::SDLButtonToButtonMapping::GetButtonMappingId
std::string GetButtonMappingId() override
Returns the unique string identifier for this mapping.
Ship::SDLButtonToButtonMapping::GetMappingType
int8_t GetMappingType() override
Returns the mapping type identifier.
Ship::SDLButtonToButtonMapping::SDLButtonToButtonMapping
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.
Ship::SDLButtonToButtonMapping::GetPhysicalDeviceName
std::string GetPhysicalDeviceName() override
Returns the human-readable name of the SDL gamepad device.
Ship::SDLButtonToButtonMapping::UpdatePad
void UpdatePad(CONTROLLERBUTTONS_T &padButtons) override
Updates the pad button state based on the current gamepad button state.
Ship::SDLButtonToButtonMapping::GetPhysicalInputName
std::string GetPhysicalInputName() override
Returns the human-readable name of the bound button.
Ship::SDLButtonToButtonMapping::SaveToConfig
void SaveToConfig() override
Persists this mapping to the application configuration.
Ship::SDLButtonToButtonMapping::mControlDeck
std::shared_ptr< ControlDeck > mControlDeck
Definition
SDLButtonToButtonMapping.h:53
Ship::SDLButtonToButtonMapping::mConsoleVariable
std::shared_ptr< ConsoleVariable > mConsoleVariable
Definition
SDLButtonToButtonMapping.h:52
Ship::SDLButtonToButtonMapping::EraseFromConfig
void EraseFromConfig() override
Removes this mapping from the application configuration.
Ship
Core namespace for the libultraship engine framework.
Definition
gfx_direct3d_common.h:14
include
ship
controller
controldevice
controller
mapping
sdl
SDLButtonToButtonMapping.h
Generated by
1.9.8