17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
* <https://www.gnu.org/licenses/>.
*/
#include "config.h"
#import "OFGameController.h"
#import "OFArray.h"
#if defined(OF_LINUX) && defined(OF_HAVE_FILES)
# include "OFEvdevGameController.h"
#endif
#ifdef OF_WINDOWS
# include "OFXInputGameController.h"
#endif
|
>
>
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
* <https://www.gnu.org/licenses/>.
*/
#include "config.h"
#import "OFGameController.h"
#import "OFArray.h"
#import "OFNumber.h"
#import "OFSet.h"
#if defined(OF_LINUX) && defined(OF_HAVE_FILES)
# include "OFEvdevGameController.h"
#endif
#ifdef OF_WINDOWS
# include "OFXInputGameController.h"
#endif
|
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
- (void)retrieveState
{
OF_UNRECOGNIZED_SELECTOR
}
- (float)pressureForButton: (OFGameControllerButton)button
{
OF_UNRECOGNIZED_SELECTOR
}
@end
#if defined(OF_LINUX) && defined(OF_HAVE_FILES)
# include "OFEvdevGameController.m"
#endif
#ifdef OF_WINDOWS
|
>
>
|
>
>
>
>
>
>
>
>
>
>
|
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
- (void)retrieveState
{
OF_UNRECOGNIZED_SELECTOR
}
- (float)pressureForButton: (OFGameControllerButton)button
{
return ([self.pressedButtons containsObject: button] ? 1 : 0);
}
- (OFString *)description
{
if (self.vendorID != nil && self.productID != nil)
return [OFString stringWithFormat:
@"<%@: %@ [%04X:%04X]>",
self.class, self.name, self.vendorID.unsignedShortValue,
self.productID.unsignedShortValue];
else
return [OFString stringWithFormat: @"<%@: %@>",
self.class, self.name];
}
@end
#if defined(OF_LINUX) && defined(OF_HAVE_FILES)
# include "OFEvdevGameController.m"
#endif
#ifdef OF_WINDOWS
|