Differences From Artifact [747d91c177]:
- File src/test/OTAppDelegate.m — part of check-in [d901707b57] at 2024-05-20 17:21:28 on branch trunk — Add ObjFWHID subframework with OFGameController (user: js, size: 15219) [annotate] [blame] [check-ins using] [more...]
To Artifact [6e4666d486]:
- File
src/test/OTAppDelegate.m
— part of check-in
[39639cd987]
at
2024-06-02 21:24:25
on branch trunk
— Completely redesign and rewrite ObjFWHID
Right now only evdev is supported, support for others will be added back
later. (user: js, size: 15236) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
26 27 28 29 30 31 32 | #import "OFSet.h" #import "OFStdIOStream.h" #import "OFThread.h" #import "OFValue.h" #import "OTTestCase.h" | | | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #import "OFSet.h" #import "OFStdIOStream.h" #import "OFThread.h" #import "OFValue.h" #import "OTTestCase.h" #import "HIDGameController.h" #import "OTAssertionFailedException.h" #import "OTTestSkippedException.h" #ifdef OF_IOS # include <CoreFoundation/CoreFoundation.h> #endif |
︙ | ︙ | |||
279 280 281 282 283 284 285 | if (status == StatusFailed) { #if defined(OF_WII) || defined(OF_NINTENDO_DS) || defined(OF_NINTENDO_3DS) [OFStdOut setForegroundColor: [OFColor silver]]; [OFStdOut writeLine: @"Press A to continue"]; for (;;) { void *pool = objc_autoreleasePoolPush(); | | | > > | < | 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | if (status == StatusFailed) { #if defined(OF_WII) || defined(OF_NINTENDO_DS) || defined(OF_NINTENDO_3DS) [OFStdOut setForegroundColor: [OFColor silver]]; [OFStdOut writeLine: @"Press A to continue"]; for (;;) { void *pool = objc_autoreleasePoolPush(); HIDGameController *controller = [[HIDGameController controllers] objectAtIndex: 0]; HIDGameControllerButton *button = [controller.buttons objectForKey: @"A"]; [controller retrieveState]; if (button.pressed) break; [OFThread waitForVerticalBlank]; objc_autoreleasePoolPop(pool); } #elif defined(OF_NINTENDO_SWITCH) |
︙ | ︙ | |||
541 542 543 544 545 546 547 | [OFStdOut writeLine: @"Press Home button to exit"]; # else [OFStdOut writeLine: @"Press Start button to exit"]; # endif for (;;) { void *pool = objc_autoreleasePoolPush(); | | | > > > > > > < | < < < < < | 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 | [OFStdOut writeLine: @"Press Home button to exit"]; # else [OFStdOut writeLine: @"Press Start button to exit"]; # endif for (;;) { void *pool = objc_autoreleasePoolPush(); HIDGameController *controller = [[HIDGameController controllers] objectAtIndex: 0]; HIDGameControlelrButton *button = # ifdef OF_WII [controller.buttons objectForKey: @"Home"]; # else [controller.buttons objectForKey: @"Start"]; # endif [controller retrieveState]; if (button.pressed) break; [OFThread waitForVerticalBlank]; objc_autoreleasePoolPop(pool); } #elif defined(OF_NINTENDO_SWITCH) |
︙ | ︙ |