Differences From Artifact [fb841c3ea2]:
- File
src/platform/Linux/OFGameController.m
— part of check-in
[22f6f258d8]
at
2024-05-10 00:27:25
on branch gamecontroller
— OFGameController: Add support for Windows
As this is using XInput 1.3, only XInput-compatible devices are supported. (user: js, size: 13004) [annotate] [blame] [check-ins using] [more...]
To Artifact [3f585adcc6]:
- File src/platform/Linux/OFGameController.m — part of check-in [899801a8b8] at 2024-05-10 12:58:34 on branch gamecontroller — OFGameController: Quirks for Mega Drive controller (user: js, size: 13498) [annotate] [blame] [check-ins using]
︙ | |||
36 37 38 39 40 41 42 43 44 45 46 47 48 49 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | + | #import "OFInvalidArgumentException.h" #import "OFOpenItemFailedException.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" static const uint16_t vendorIDNintendo = 0x057E; static const uint16_t productIDN64Controller = 0x2019; static const uint16_t productIDMegaDriveController = 0x201E; @interface OFGameController () - (instancetype)of_initWithPath: (OFString *)path OF_METHOD_FAMILY(init); @end static const uint16_t buttons[] = { BTN_A, BTN_B, BTN_C, BTN_X, BTN_Y, BTN_Z, BTN_TL, BTN_TR, BTN_TL2, |
︙ | |||
67 68 69 70 71 72 73 74 75 76 77 78 79 80 | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | + + + + + + + + + + + + + + + + | return OFGameControllerButtonCPadUp; case BTN_X: return OFGameControllerButtonCPadDown; case BTN_MODE: return OFGameControllerButtonHome; case BTN_Z: return OFGameControllerButtonCapture; } } else if (vendorID == vendorIDNintendo && productID == productIDMegaDriveController) { switch (button) { case BTN_B: return OFGameControllerButtonA; case BTN_A: return OFGameControllerButtonB; case BTN_Z: return OFGameControllerButtonC; case BTN_TR2: return OFGameControllerButtonStart; case BTN_TR: return OFGameControllerButtonMode; case BTN_THUMBL: return OFGameControllerButtonCapture; } } switch (button) { case BTN_A: return OFGameControllerButtonA; case BTN_B: |
︙ |