]> git.sesse.net Git - vlc/commitdiff
motion: Don't use unimotion on iOS.
authorPierre d'Herbemont <pdherbemont@free.fr>
Sun, 31 Oct 2010 09:05:21 +0000 (10:05 +0100)
committerPierre d'Herbemont <pdherbemont@free.fr>
Sun, 31 Oct 2010 09:59:59 +0000 (10:59 +0100)
modules/control/motion.c
modules/control/unimotion.c

index 091f76702586398392d716ffc71bd77754441ab9..4b605af30f50e90745e7c6a7071c18e45b62b713 100644 (file)
 #endif
 
 #ifdef __APPLE__
+#include "TargetConditionals.h"
+#if !TARGET_OS_IPHONE
+#define HAVE_MACOS_UNIMOTION
+#endif
+#endif
+
+#ifdef HAVE_MACOS_UNIMOTION
 #include "unimotion.h"
 #endif
 
@@ -52,7 +59,7 @@ struct intf_sys_t
 {
     enum { NO_SENSOR, HDAPS_SENSOR, AMS_SENSOR, APPLESMC_SENSOR,
            UNIMOTION_SENSOR } sensor;
-#ifdef __APPLE__
+#ifdef HAVE_MACOS_UNIMOTION
     enum sms_hardware unimotion_hw;
 #endif
     int i_calibrate;
@@ -144,7 +151,7 @@ int Open ( vlc_object_t *p_this )
             p_intf->p_sys->sensor = NO_SENSOR;
         }
     }
-#ifdef __APPLE__
+#ifdef HAVE_MACOS_UNIMOTION
     else if((p_intf->p_sys->unimotion_hw = detect_sms()))
         p_intf->p_sys->sensor = UNIMOTION_SENSOR;
 #endif
@@ -307,7 +314,7 @@ static int GetOrientation( intf_thread_t *p_intf )
 
         return ( i_x - p_intf->p_sys->i_calibrate ) * 10;
 
-#ifdef __APPLE__
+#ifdef HAVE_MACOS_UNIMOTION
     case UNIMOTION_SENSOR:
         if( read_sms_raw( p_intf->p_sys->unimotion_hw, &i_x, &i_y, &i_z ) )
         {
index 39b6c1b9704b5a61f4da56971d0cf5afe7682b7b..4b07a3c15fb1dbeb22fe37e727ff57d5d7f68f7e 100644 (file)
  */
 
 #ifdef __APPLE__
+#include "TargetConditionals.h"
+#if !TARGET_OS_IPHONE
+#define HAVE_MACOS_UNIMOTION
+#endif
+#endif
+
+#ifdef HAVE_MACOS_UNIMOTION
 
 #include "unimotion.h"
 #include <IOKit/IOKitLib.h>