Differences From Artifact [30201f00f5]:
- File
src/platform/NintendoDS/OFGameController.m
— part of check-in
[498a91a2a4]
at
2024-05-05 19:56:47
on branch gamecontroller
— OFGameController: Rename axis to analog stick
This was just wrong, an analog stick has two axes. (user: js, size: 2810) [annotate] [blame] [check-ins using]
To Artifact [bd26d85f5f]:
- File src/platform/NintendoDS/OFGameController.m — part of check-in [6f20cdbd5c] at 2024-05-09 12:57:21 on branch gamecontroller — OFGameController: Add support for Linux (user: js, size: 3011) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
28 29 30 31 32 33 34 | #include <nds.h> #undef asm @interface OFGameController () - (instancetype)of_init OF_METHOD_FAMILY(init); @end | | | > > > | > > < < < < | < < < < | | > > > > > | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | #include <nds.h> #undef asm @interface OFGameController () - (instancetype)of_init OF_METHOD_FAMILY(init); @end static OFArray OF_GENERIC(OFGameController *) *controllers; static void initControllers(void) { void *pool = objc_autoreleasePoolPush(); controllers = [[OFArray alloc] initWithObject: [[[OFGameController alloc] of_init] autorelease]]; objc_autoreleasePoolPop(); } @implementation OFGameController + (OFArray OF_GENERIC(OFGameController *) *)controllers { static OFOnceControl onceControl = OFOnceControlInitValue; OFOnce(&onceControl, initControllers); return [[controllers retain] autorelease]; } - (instancetype)init { OF_INVALID_INIT_METHOD } - (instancetype)of_init { return [super init]; } - (OFString *)name { return @"Nintendo DS"; } - (OFSet *)buttons { return [OFSet setWithObjects: @"A", @"B", @"Select", @"Start", @"D-Pad Right", @"D-Pad Left", @"D-Pad Up", @"D-Pad Down", @"R", @"L", @"X", @"Y", nil]; } |
︙ | ︙ | |||
118 119 120 121 122 123 124 125 | return 0; } - (OFPoint)positionOfAnalogStickWithIndex: (size_t)index { @throw [OFOutOfRangeException exception]; } @end | > > > > > | 120 121 122 123 124 125 126 127 128 129 130 131 132 | return 0; } - (OFPoint)positionOfAnalogStickWithIndex: (size_t)index { @throw [OFOutOfRangeException exception]; } - (OFString *)description { return [OFString stringWithFormat: @"<%@: %@>", self.class, self.name]; } @end |