Skip to content

Commit

Permalink
Merge pull request #54 from OrangeFox86/34-add-support-for-all-differ…
Browse files Browse the repository at this point in the history
…ent-types-of-controllers

34: Changed some digital button names; it seems like that is all that…
  • Loading branch information
Tails86 authored Jan 1, 2023
2 parents 9b6bfe3 + a1a1084 commit 32e28ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions inc/hal/Usb/DreamcastControllerObserver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ class DreamcastControllerObserver
unsigned z:1;
unsigned y:1;
unsigned x:1;
unsigned unknown5:1;
unsigned unknown4:1;
unsigned unknown3:1;
unsigned unknown2:1;
unsigned unknown1:1;
unsigned d:1;
unsigned upb:1;
unsigned downb:1;
unsigned leftb:1;
unsigned rightb:1;

unsigned c:1;
unsigned b:1;
Expand Down
10 changes: 5 additions & 5 deletions src/hal/Usb/Hid/UsbGamepadDreamcastControllerObserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ void UsbGamepadDreamcastControllerObserver::setControllerCondition(const Control
mUsbController.setButton(UsbGamepad::GAMEPAD_BUTTON_START, 0 == controllerCondition.start);

// Mapping these to random unique buttons just in case something out there uses them
mUsbController.setButton(UsbGamepad::GAMEPAD_BUTTON_TL, 0 == controllerCondition.unknown1);
mUsbController.setButton(UsbGamepad::GAMEPAD_BUTTON_TR, 0 == controllerCondition.unknown2);
mUsbController.setButton(UsbGamepad::GAMEPAD_BUTTON_TL2, 0 == controllerCondition.unknown3);
mUsbController.setButton(UsbGamepad::GAMEPAD_BUTTON_TR2, 0 == controllerCondition.unknown4);
mUsbController.setButton(UsbGamepad::GAMEPAD_BUTTON_SELECT, 0 == controllerCondition.unknown5);
mUsbController.setButton(UsbGamepad::GAMEPAD_BUTTON_TL, 0 == controllerCondition.rightb);
mUsbController.setButton(UsbGamepad::GAMEPAD_BUTTON_TR, 0 == controllerCondition.leftb);
mUsbController.setButton(UsbGamepad::GAMEPAD_BUTTON_TL2, 0 == controllerCondition.downb);
mUsbController.setButton(UsbGamepad::GAMEPAD_BUTTON_TR2, 0 == controllerCondition.upb);
mUsbController.setButton(UsbGamepad::GAMEPAD_BUTTON_SELECT, 0 == controllerCondition.d);

mUsbController.setDigitalPad(UsbGamepad::DPAD_UP, 0 == controllerCondition.up);
mUsbController.setDigitalPad(UsbGamepad::DPAD_DOWN, 0 == controllerCondition.down);
Expand Down

0 comments on commit 32e28ed

Please sign in to comment.