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
|
for (OFGameController *controller in controllers) {
OFArray OF_GENERIC(OFGameControllerButton) *buttons =
controller.buttons.allObjects.sortedArray;
size_t i = 0;
[OFStdOut setForegroundColor: [OFColor green]];
[OFStdOut writeString: controller.name];
if (controller.vendorID != nil &&
controller.productID != nil) {
[OFStdOut setForegroundColor: [OFColor teal]];
[OFStdOut writeFormat: @" [%04X:%04X]",
controller.vendorID.unsignedShortValue,
controller.productID.unsignedShortValue];
}
[OFStdOut writeString: @"\n"];
[controller retrieveState];
for (OFGameControllerButton button in buttons) {
float pressure =
[controller pressureForButton: button];
|
<
<
<
<
<
<
<
<
<
<
|
|
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
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.description];
[controller retrieveState];
for (OFGameControllerButton button in buttons) {
float pressure =
[controller pressureForButton: button];
|