]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
don't use MacOSX-specific code with __IPHONEOS__ defined
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 2 Feb 2011 18:35:57 +0000 (18:35 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 2 Feb 2011 18:35:57 +0000 (18:35 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10791 d7cf8633-e32d-0410-b094-e92efae38249

vid_sdl.c

index 21be5eaafd059e5d33d4ee09e25228d4fce16e4c..9c682648fed92e10114ddb3f3819408e5e1dfebe 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "image.h"
 #include "dpsoftrast.h"
 
+#ifndef __IPHONEOS__
 #ifdef MACOSX
 #include <Carbon/Carbon.h>
 #include <IOKit/hidsystem/IOHIDLib.h>
@@ -54,6 +55,7 @@ io_connect_t IN_GetIOHandle(void)
        return iohandle;
 }
 #endif
+#endif
 
 #ifdef WIN32
 #define SDL_R_RESTART
@@ -288,16 +290,19 @@ static int MapKey( unsigned int sdlkey )
 
 void VID_SetMouse(qboolean fullscreengrab, qboolean relative, qboolean hidecursor)
 {
+#ifndef __IPHONEOS__
 #ifdef MACOSX
        if(relative)
                if(vid_usingmouse && (vid_usingnoaccel != !!apple_mouse_noaccel.integer))
                        VID_SetMouse(false, false, false); // ungrab first!
+#endif
 #endif
        if (vid_usingmouse != relative)
        {
                vid_usingmouse = relative;
                cl_ignoremousemoves = 2;
                SDL_WM_GrabInput( relative ? SDL_GRAB_ON : SDL_GRAB_OFF );
+#ifndef __IPHONEOS__
 #ifdef MACOSX
                if(relative)
                {
@@ -349,6 +354,7 @@ void VID_SetMouse(qboolean fullscreengrab, qboolean relative, qboolean hidecurso
                                        Con_Print("Could not re-enable mouse acceleration (failed at IO_GetIOHandle).\n");
                        }
                }
+#endif
 #endif
        }
        if (vid_usinghidecursor != hidecursor)
@@ -680,8 +686,10 @@ static qboolean vid_sdl_initjoysticksystem = false;
 
 void VID_Init (void)
 {
+#ifndef __IPHONEOS__
 #ifdef MACOSX
        Cvar_RegisterVariable(&apple_mouse_noaccel);
+#endif
 #endif
        Cvar_RegisterVariable(&vid_soft);
        Cvar_RegisterVariable(&joy_detected);