]> git.sesse.net Git - vlc/blobdiff - modules/control/unimotion.c
Qt4: don't ruin RC interface fallback when preferences are saved
[vlc] / modules / control / unimotion.c
index c4195e20e012fc106424506ee22316fd37501849..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>
@@ -138,8 +145,8 @@ static int probe_sms(int kernFunc, char *servMatch, int dataType, void *data)
     io_object_t aDevice;
     io_connect_t  dataPort;
 
-    IOItemCount structureInputSize;
-    IOByteCount structureOutputSize;
+    size_t structureInputSize;
+    size_t structureOutputSize;
 
     union motion_data inputStructure;
     union motion_data *outputStructure;
@@ -189,8 +196,8 @@ static int probe_sms(int kernFunc, char *servMatch, int dataType, void *data)
     memset(&inputStructure, 0, sizeof(union motion_data));
     memset(outputStructure, 0, sizeof(union motion_data));
 
-    result = IOConnectMethodStructureIStructureO(dataPort, kernFunc, structureInputSize,
-                &structureOutputSize, &inputStructure, outputStructure);
+    result = IOConnectCallStructMethod(dataPort, kernFunc, &inputStructure, 
+                structureInputSize, outputStructure, &structureOutputSize );
 
     IOServiceClose(dataPort);