mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-20 20:56:22 +00:00
iOS: Expose iOS 12.1+/13/14 buttons.
Now with corrected version checks.
This commit is contained in:
parent
fa466d2363
commit
43948d4d4a
@ -673,6 +673,38 @@ static LocationHelper *locationHelper;
|
||||
extendedProfile.rightTrigger.valueChangedHandler = ^(GCControllerButtonInput *button, float value, BOOL pressed) {
|
||||
[self controllerButtonPressed:pressed keyCode:NKCODE_BUTTON_10]; // Start
|
||||
};
|
||||
|
||||
#if defined(__IPHONE_12_1) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_12_1
|
||||
if (extendedProfile.leftThumbstickButton != nil) {
|
||||
extendedProfile.leftThumbstickButton.valueChangedHandler = ^(GCControllerButtonInput *button, float value, BOOL pressed) {
|
||||
[self controllerButtonPressed:pressed keyCode:NKCODE_BUTTON_11];
|
||||
};
|
||||
}
|
||||
if (extendedProfile.rightThumbstickButton != nil) {
|
||||
extendedProfile.rightThumbstickButton.valueChangedHandler = ^(GCControllerButtonInput *button, float value, BOOL pressed) {
|
||||
[self controllerButtonPressed:pressed keyCode:NKCODE_BUTTON_12];
|
||||
};
|
||||
}
|
||||
#endif
|
||||
#if defined(__IPHONE_13) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13
|
||||
if (extendedProfile.buttonOptions != nil) {
|
||||
extendedProfile.buttonOptions.valueChangedHandler = ^(GCControllerButtonInput *button, float value, BOOL pressed) {
|
||||
[self controllerButtonPressed:pressed keyCode:NKCODE_BUTTON_13];
|
||||
};
|
||||
}
|
||||
if (extendedProfile.buttonMenu != nil) {
|
||||
extendedProfile.buttonMenu.valueChangedHandler = ^(GCControllerButtonInput *button, float value, BOOL pressed) {
|
||||
[self controllerButtonPressed:pressed keyCode:NKCODE_BUTTON_14];
|
||||
};
|
||||
}
|
||||
#endif
|
||||
#if defined(__IPHONE_14_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_0
|
||||
if (extendedProfile.buttonHome != nil) {
|
||||
extendedProfile.buttonHome.valueChangedHandler = ^(GCControllerButtonInput *button, float value, BOOL pressed) {
|
||||
[self controllerButtonPressed:pressed keyCode:NKCODE_BUTTON_15];
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
extendedProfile.leftThumbstick.xAxis.valueChangedHandler = ^(GCControllerAxisInput *axis, float value) {
|
||||
AxisInput axisInput;
|
||||
|
Loading…
x
Reference in New Issue
Block a user