Don't build iOS mouse support on Apple TV
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
diff --git a/src/video/uikit/SDL_uikitview.h b/src/video/uikit/SDL_uikitview.h
index 93bd862..faad0f8 100644
--- a/src/video/uikit/SDL_uikitview.h
+++ b/src/video/uikit/SDL_uikitview.h
@@ -25,7 +25,7 @@
#include "SDL_touch.h"
-#ifdef __IPHONE_13_4
+#if !TARGET_OS_TV && defined(__IPHONE_13_4)
@interface SDL_uikitview : UIView <UIPointerInteractionDelegate>
#else
@interface SDL_uikitview : UIView
@@ -35,7 +35,7 @@
- (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));
#endif
diff --git a/src/video/uikit/SDL_uikitview.m b/src/video/uikit/SDL_uikitview.m
index da4c09d..c28aab8 100644
--- a/src/video/uikit/SDL_uikitview.m
+++ b/src/video/uikit/SDL_uikitview.m
@@ -76,7 +76,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
SDL_AddTouch(directTouchId, SDL_TOUCH_DEVICE_DIRECT, "");
#endif
-#ifdef __IPHONE_13_4
+#if !TARGET_OS_TV && defined(__IPHONE_13_4)
if (@available(iOS 13.4, *)) {
[self addInteraction:[[UIPointerInteraction alloc] initWithDelegate:self]];
}
@@ -142,7 +142,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
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)){
if (request != nil) {
CGPoint origin = self.bounds.origin;
@@ -155,7 +155,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
}
return defaultRegion;
}
-#endif /* __IPHONE_13_4 */
+#endif /* !TARGET_OS_TV && __IPHONE_13_4 */
- (SDL_TouchDeviceType)touchTypeForTouch:(UITouch *)touch
{
@@ -210,7 +210,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
for (UITouch *touch in touches) {
BOOL handled = NO;
-#ifdef __IPHONE_13_4
+#if !TARGET_OS_TV && defined(__IPHONE_13_4)
if (@available(iOS 13.4, *)) {
if (touch.type == UITouchTypeIndirectPointer) {
/* 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) {
BOOL handled = NO;
-#ifdef __IPHONE_13_4
+#if !TARGET_OS_TV && defined(__IPHONE_13_4)
if (@available(iOS 13.4, *)) {
if (touch.type == UITouchTypeIndirectPointer) {
/* 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) {
BOOL handled = NO;
-#ifdef __IPHONE_13_4
+#if !TARGET_OS_TV && defined(__IPHONE_13_4)
if (@available(iOS 13.4, *)) {
if (touch.type == UITouchTypeIndirectPointer) {
/* Already handled in pointerInteraction callback */