|
|
|
|
@ -12,7 +12,7 @@ extern bool sgbControllerActive;
|
|
|
|
|
|
|
|
|
|
std::vector<Joystick> *const Joystick::joysticks_ = new std::vector<Joystick>; |
|
|
|
|
|
|
|
|
|
ControllerButton Joystick::ToControllerButton(const SDL_Event &event) const |
|
|
|
|
ControllerButton Joystick::ToControllerButton(const SDL_Event &event) |
|
|
|
|
{ |
|
|
|
|
switch (event.type) { |
|
|
|
|
case SDL_JOYBUTTONDOWN: |
|
|
|
|
@ -111,7 +111,7 @@ ControllerButton Joystick::ToControllerButton(const SDL_Event &event) const
|
|
|
|
|
return ControllerButton_NONE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int Joystick::ToSdlJoyButton(ControllerButton button) const |
|
|
|
|
int Joystick::ToSdlJoyButton(ControllerButton button) |
|
|
|
|
{ |
|
|
|
|
if (button == ControllerButton_AXIS_TRIGGERLEFT || button == ControllerButton_AXIS_TRIGGERRIGHT) |
|
|
|
|
UNIMPLEMENTED(); |
|
|
|
|
@ -177,7 +177,7 @@ int Joystick::ToSdlJoyButton(ControllerButton button) const
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool Joystick::IsHatButtonPressed(ControllerButton button) const |
|
|
|
|
bool Joystick::IsHatButtonPressed(ControllerButton button) |
|
|
|
|
{ |
|
|
|
|
switch (button) { |
|
|
|
|
#if defined(JOY_HAT_DPAD_UP_HAT) && defined(JOY_HAT_DPAD_UP) |
|
|
|
|
|