Differences From Artifact [234ef24ee3]:
- File tests/gamecontroller/GameControllerTests.m — part of check-in [336ecd9bdc] at 2024-05-09 19:46:06 on branch gamecontroller — OFGameController: Support for pressure sensitivity (user: js, size: 2751) [annotate] [blame] [check-ins using]
To Artifact [97e82caa67]:
- File
tests/gamecontroller/GameControllerTests.m
— part of check-in
[0f902d87eb]
at
2024-05-09 23:41:48
on branch gamecontroller
— OFGameController: Retrieve state explicitly
This avoids retrieving it multiple times when reading multiple things. (user: js, size: 2783) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
45 46 47 48 49 50 51 52 53 54 55 56 57 58 | for (OFGameController *controller in controllers) { OFArray OF_GENERIC(OFGameControllerButton) *buttons = controller.buttons.allObjects.sortedArray; size_t i = 0; [OFStdOut setForegroundColor: [OFColor green]]; [OFStdOut writeLine: controller.name]; for (OFGameControllerButton button in buttons) { float pressure = [controller pressureForButton: button]; if (pressure == 1) [OFStdOut setForegroundColor: | > > | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | for (OFGameController *controller in controllers) { OFArray OF_GENERIC(OFGameControllerButton) *buttons = controller.buttons.allObjects.sortedArray; size_t i = 0; [OFStdOut setForegroundColor: [OFColor green]]; [OFStdOut writeLine: controller.name]; [controller retrieveState]; for (OFGameControllerButton button in buttons) { float pressure = [controller pressureForButton: button]; if (pressure == 1) [OFStdOut setForegroundColor: |
︙ | ︙ |