ObjFW  Diff

Differences From Artifact [ee160f8921]:

To Artifact [cc3b87f597]:


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#import "OHXInputGameController.h"
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFNumber.h"
#import "OHGameControllerAxis.h"
#import "OHGameControllerButton.h"
#import "OHGameControllerDirectionalPad.h"
#import "OHXbox360Gamepad.h"

#import "OFInitializationFailedException.h"
#import "OFReadFailedException.h"

#include <xinput.h>

#ifndef XINPUT_GAMEPAD_GUIDE







|







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#import "OHXInputGameController.h"
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFNumber.h"
#import "OHGameControllerAxis.h"
#import "OHGameControllerButton.h"
#import "OHGameControllerDirectionalPad.h"
#import "OHXboxGamepad.h"

#import "OFInitializationFailedException.h"
#import "OFReadFailedException.h"

#include <xinput.h>

#ifndef XINPUT_GAMEPAD_GUIDE
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
				    capabilities.vendorID];
				_productID = [[OFNumber alloc]
				    initWithUnsignedShort:
				    capabilities.productID];
			}
		}

		_extendedGamepad = [[OHXbox360Gamepad alloc]
		    initWithHasGuideButton: (XInputVersion != 910)];

		[self retrieveState];
	} @catch (id e) {
		[self release];
		@throw e;
	}







|







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
				    capabilities.vendorID];
				_productID = [[OFNumber alloc]
				    initWithUnsignedShort:
				    capabilities.productID];
			}
		}

		_extendedGamepad = [[OHXboxGamepad alloc]
		    initWithHasGuideButton: (XInputVersion != 910)];

		[self retrieveState];
	} @catch (id e) {
		[self release];
		@throw e;
	}
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
	case 910:
		return @"XInput 9.1.0 device";
	}

	return nil;
}

- (id <OHGameControllerProfile>)rawProfile
{
	return _extendedGamepad;
}

- (id <OHGamepad>)gamepad
{
	return _extendedGamepad;
}
@end







|









233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
	case 910:
		return @"XInput 9.1.0 device";
	}

	return nil;
}

- (id <OHGameControllerProfile>)profile
{
	return _extendedGamepad;
}

- (id <OHGamepad>)gamepad
{
	return _extendedGamepad;
}
@end