mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 00:05:35 +00:00
Added documentation that the UIApplicationSupportsIndirectInputEvents key must be set to true
in your application's Info.plist in order to get real Bluetooth mouse events.
This commit is contained in:
parent
a7e2e3a329
commit
19c129faba
|
@ -8,6 +8,10 @@ This is a list of major changes in SDL's version history.
|
|||
Android:
|
||||
* Added support for audio output and capture using AAudio
|
||||
|
||||
iOS:
|
||||
* Added documentation that the UIApplicationSupportsIndirectInputEvents key must be set to true in your application's Info.plist in order to get real Bluetooth mouse events.
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.16:
|
||||
---------------------------------------------------------------------------
|
||||
|
|
|
@ -30,5 +30,7 @@
|
|||
<string>iOS Launch Screen</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -191,6 +191,12 @@ SDL_bool SDL_IsTextInputActive()
|
|||
-- returns whether or not text events are enabled (and the onscreen keyboard is visible)
|
||||
|
||||
|
||||
Notes -- Mouse
|
||||
==============================================================================
|
||||
|
||||
iOS now supports Bluetooth mice on iPad, but by default will provide the mouse input as touch. In order for SDL to see the real mouse events, you should set the key UIApplicationSupportsIndirectInputEvents to true in your Info.plist
|
||||
|
||||
|
||||
Notes -- Reading and Writing files
|
||||
==============================================================================
|
||||
|
||||
|
|
|
@ -268,6 +268,11 @@ void SDL_InitGCMouse(void)
|
|||
@autoreleasepool {
|
||||
/* There is a bug where mouse accumulates duplicate deltas over time in iOS 14.0 */
|
||||
if (@available(iOS 14.1, tvOS 14.1, *)) {
|
||||
/* iOS will not send the new pointer touch events if you don't have this key,
|
||||
* and we need them to differentiate between mouse events and real touch events.
|
||||
*/
|
||||
BOOL indirect_input_available = [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"UIApplicationSupportsIndirectInputEvents"] boolValue];
|
||||
if (indirect_input_available) {
|
||||
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
|
||||
|
||||
mouse_connect_observer = [center addObserverForName:GCMouseDidConnectNotification
|
||||
|
@ -291,6 +296,9 @@ void SDL_InitGCMouse(void)
|
|||
}
|
||||
|
||||
SDL_GetMouse()->SetRelativeMouseMode = SetGCMouseRelativeMode;
|
||||
} else {
|
||||
NSLog(@"You need UIApplicationSupportsIndirectInputEvents in your Info.plist for mouse support");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue