mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 16:45:32 +00:00
Don't build iOS mouse support on Apple TV
This commit is contained in:
parent
e5d3629931
commit
cab1ee9cbc
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#include "SDL_touch.h"
|
#include "SDL_touch.h"
|
||||||
|
|
||||||
#ifdef __IPHONE_13_4
|
#if !TARGET_OS_TV && defined(__IPHONE_13_4)
|
||||||
@interface SDL_uikitview : UIView <UIPointerInteractionDelegate>
|
@interface SDL_uikitview : UIView <UIPointerInteractionDelegate>
|
||||||
#else
|
#else
|
||||||
@interface SDL_uikitview : UIView
|
@interface SDL_uikitview : UIView
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
- (void)setSDLWindow:(SDL_Window *)window;
|
- (void)setSDLWindow:(SDL_Window *)window;
|
||||||
|
|
||||||
#ifdef __IPHONE_13_4
|
#if !TARGET_OS_TV && defined(__IPHONE_13_4)
|
||||||
- (UIPointerRegion *)pointerInteraction:(UIPointerInteraction *)interaction regionForRequest:(UIPointerRegionRequest *)request defaultRegion:(UIPointerRegion *)defaultRegion API_AVAILABLE(ios(13.4));
|
- (UIPointerRegion *)pointerInteraction:(UIPointerInteraction *)interaction regionForRequest:(UIPointerRegionRequest *)request defaultRegion:(UIPointerRegion *)defaultRegion API_AVAILABLE(ios(13.4));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
|
||||||
SDL_AddTouch(directTouchId, SDL_TOUCH_DEVICE_DIRECT, "");
|
SDL_AddTouch(directTouchId, SDL_TOUCH_DEVICE_DIRECT, "");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __IPHONE_13_4
|
#if !TARGET_OS_TV && defined(__IPHONE_13_4)
|
||||||
if (@available(iOS 13.4, *)) {
|
if (@available(iOS 13.4, *)) {
|
||||||
[self addInteraction:[[UIPointerInteraction alloc] initWithDelegate:self]];
|
[self addInteraction:[[UIPointerInteraction alloc] initWithDelegate:self]];
|
||||||
}
|
}
|
||||||
|
@ -142,7 +142,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
|
||||||
sdlwindow = window;
|
sdlwindow = window;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __IPHONE_13_4
|
#if !TARGET_OS_TV && defined(__IPHONE_13_4)
|
||||||
- (UIPointerRegion *)pointerInteraction:(UIPointerInteraction *)interaction regionForRequest:(UIPointerRegionRequest *)request defaultRegion:(UIPointerRegion *)defaultRegion API_AVAILABLE(ios(13.4)){
|
- (UIPointerRegion *)pointerInteraction:(UIPointerInteraction *)interaction regionForRequest:(UIPointerRegionRequest *)request defaultRegion:(UIPointerRegion *)defaultRegion API_AVAILABLE(ios(13.4)){
|
||||||
if (request != nil) {
|
if (request != nil) {
|
||||||
CGPoint origin = self.bounds.origin;
|
CGPoint origin = self.bounds.origin;
|
||||||
|
@ -155,7 +155,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
|
||||||
}
|
}
|
||||||
return defaultRegion;
|
return defaultRegion;
|
||||||
}
|
}
|
||||||
#endif /* __IPHONE_13_4 */
|
#endif /* !TARGET_OS_TV && __IPHONE_13_4 */
|
||||||
|
|
||||||
- (SDL_TouchDeviceType)touchTypeForTouch:(UITouch *)touch
|
- (SDL_TouchDeviceType)touchTypeForTouch:(UITouch *)touch
|
||||||
{
|
{
|
||||||
|
@ -210,7 +210,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
|
||||||
for (UITouch *touch in touches) {
|
for (UITouch *touch in touches) {
|
||||||
BOOL handled = NO;
|
BOOL handled = NO;
|
||||||
|
|
||||||
#ifdef __IPHONE_13_4
|
#if !TARGET_OS_TV && defined(__IPHONE_13_4)
|
||||||
if (@available(iOS 13.4, *)) {
|
if (@available(iOS 13.4, *)) {
|
||||||
if (touch.type == UITouchTypeIndirectPointer) {
|
if (touch.type == UITouchTypeIndirectPointer) {
|
||||||
/* FIXME: How can we tell the difference between left and right button clicks? */
|
/* FIXME: How can we tell the difference between left and right button clicks? */
|
||||||
|
@ -242,7 +242,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
|
||||||
for (UITouch *touch in touches) {
|
for (UITouch *touch in touches) {
|
||||||
BOOL handled = NO;
|
BOOL handled = NO;
|
||||||
|
|
||||||
#ifdef __IPHONE_13_4
|
#if !TARGET_OS_TV && defined(__IPHONE_13_4)
|
||||||
if (@available(iOS 13.4, *)) {
|
if (@available(iOS 13.4, *)) {
|
||||||
if (touch.type == UITouchTypeIndirectPointer) {
|
if (touch.type == UITouchTypeIndirectPointer) {
|
||||||
/* FIXME: How can we tell the difference between left and right button clicks? */
|
/* FIXME: How can we tell the difference between left and right button clicks? */
|
||||||
|
@ -279,7 +279,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
|
||||||
for (UITouch *touch in touches) {
|
for (UITouch *touch in touches) {
|
||||||
BOOL handled = NO;
|
BOOL handled = NO;
|
||||||
|
|
||||||
#ifdef __IPHONE_13_4
|
#if !TARGET_OS_TV && defined(__IPHONE_13_4)
|
||||||
if (@available(iOS 13.4, *)) {
|
if (@available(iOS 13.4, *)) {
|
||||||
if (touch.type == UITouchTypeIndirectPointer) {
|
if (touch.type == UITouchTypeIndirectPointer) {
|
||||||
/* Already handled in pointerInteraction callback */
|
/* Already handled in pointerInteraction callback */
|
||||||
|
|
Loading…
Reference in a new issue