Fixed x11 compile bugs.
authorjimtla
Thu, 22 Jul 2010 08:12:28 +0400
changeset 466962e6a6e9720b
parent 4668 a8ef4c3a5d8e
child 4670 ad4f32e874ee
Fixed x11 compile bugs.
Xcode/SDL/SDL.xcodeproj/project.pbxproj
configure.in
src/video/cocoa/SDL_cocoaevents.m
src/video/x11/SDL_eventtouch.c
src/video/x11/SDL_x11events.c
     1.1 --- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj	Sat Jul 17 23:16:57 2010 -0400
     1.2 +++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj	Thu Jul 22 08:12:28 2010 +0400
     1.3 @@ -476,6 +476,16 @@
     1.4  		04F2AF671104AC0800D6DDF7 /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F2AF651104AC0800D6DDF7 /* SDL_assert.c */; };
     1.5  		04F2AF691104AC4500D6DDF7 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */; settings = {ATTRIBUTES = (Public, ); }; };
     1.6  		04F2AF6A1104AC4500D6DDF7 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */; };
     1.7 +		8CB0A76C11F6A84800CBA2DE /* SDL_x11clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 8CB0A76A11F6A84800CBA2DE /* SDL_x11clipboard.c */; };
     1.8 +		8CB0A76D11F6A84800CBA2DE /* SDL_x11clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A76B11F6A84800CBA2DE /* SDL_x11clipboard.h */; };
     1.9 +		8CB0A77811F6A87F00CBA2DE /* SDL_gesture.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A77611F6A87F00CBA2DE /* SDL_gesture.h */; };
    1.10 +		8CB0A77911F6A87F00CBA2DE /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A77711F6A87F00CBA2DE /* SDL_touch.h */; };
    1.11 +		8CB0A77E11F6A8E700CBA2DE /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A77A11F6A8E700CBA2DE /* SDL_gesture_c.h */; };
    1.12 +		8CB0A77F11F6A8E700CBA2DE /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = 8CB0A77B11F6A8E700CBA2DE /* SDL_gesture.c */; };
    1.13 +		8CB0A78011F6A8E700CBA2DE /* SDL_touch_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A77C11F6A8E700CBA2DE /* SDL_touch_c.h */; };
    1.14 +		8CB0A78111F6A8E700CBA2DE /* SDL_touch.c in Sources */ = {isa = PBXBuildFile; fileRef = 8CB0A77D11F6A8E700CBA2DE /* SDL_touch.c */; };
    1.15 +		8CB0A78711F6A90B00CBA2DE /* SDL_eventtouch.c in Sources */ = {isa = PBXBuildFile; fileRef = 8CB0A78511F6A90B00CBA2DE /* SDL_eventtouch.c */; };
    1.16 +		8CB0A78811F6A90B00CBA2DE /* SDL_eventtouch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A78611F6A90B00CBA2DE /* SDL_eventtouch.h */; };
    1.17  		BECDF62E0761BA81005FE872 /* SDL_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538330006D78D67F000001 /* SDL_audio.c */; };
    1.18  		BECDF62F0761BA81005FE872 /* SDL_audiocvt.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538331006D78D67F000001 /* SDL_audiocvt.c */; };
    1.19  		BECDF6300761BA81005FE872 /* SDL_audiodev.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538332006D78D67F000001 /* SDL_audiodev.c */; };
    1.20 @@ -864,6 +874,16 @@
    1.21  		0C5AF5FD01191D2B7F000001 /* SDL_version.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_version.h; path = ../../include/SDL_version.h; sourceTree = SOURCE_ROOT; };
    1.22  		0C5AF5FE01191D2B7F000001 /* SDL_video.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_video.h; path = ../../include/SDL_video.h; sourceTree = SOURCE_ROOT; };
    1.23  		0C5AF5FF01191D2B7F000001 /* SDL.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL.h; path = ../../include/SDL.h; sourceTree = SOURCE_ROOT; };
    1.24 +		8CB0A76A11F6A84800CBA2DE /* SDL_x11clipboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_x11clipboard.c; sourceTree = "<group>"; };
    1.25 +		8CB0A76B11F6A84800CBA2DE /* SDL_x11clipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_x11clipboard.h; sourceTree = "<group>"; };
    1.26 +		8CB0A77611F6A87F00CBA2DE /* SDL_gesture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_gesture.h; path = ../../include/SDL_gesture.h; sourceTree = SOURCE_ROOT; };
    1.27 +		8CB0A77711F6A87F00CBA2DE /* SDL_touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_touch.h; path = ../../include/SDL_touch.h; sourceTree = SOURCE_ROOT; };
    1.28 +		8CB0A77A11F6A8E700CBA2DE /* SDL_gesture_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gesture_c.h; sourceTree = "<group>"; };
    1.29 +		8CB0A77B11F6A8E700CBA2DE /* SDL_gesture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_gesture.c; sourceTree = "<group>"; };
    1.30 +		8CB0A77C11F6A8E700CBA2DE /* SDL_touch_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_touch_c.h; sourceTree = "<group>"; };
    1.31 +		8CB0A77D11F6A8E700CBA2DE /* SDL_touch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_touch.c; sourceTree = "<group>"; };
    1.32 +		8CB0A78511F6A90B00CBA2DE /* SDL_eventtouch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_eventtouch.c; sourceTree = "<group>"; };
    1.33 +		8CB0A78611F6A90B00CBA2DE /* SDL_eventtouch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_eventtouch.h; sourceTree = "<group>"; };
    1.34  		B24DA50405A88D52006B9F1C /* SDL_cpuinfo.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SDL_cpuinfo.c; sourceTree = "<group>"; };
    1.35  		B29A290D04E5B28700A80002 /* SDL_loadso.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_loadso.h; path = ../../include/SDL_loadso.h; sourceTree = "<group>"; };
    1.36  		B2CF8DC405C444E400E5DC7F /* SDL_cpuinfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_cpuinfo.h; path = ../../include/SDL_cpuinfo.h; sourceTree = SOURCE_ROOT; };
    1.37 @@ -1108,6 +1128,10 @@
    1.38  		00CFA719106B498B00758660 /* x11 */ = {
    1.39  			isa = PBXGroup;
    1.40  			children = (
    1.41 +				8CB0A78511F6A90B00CBA2DE /* SDL_eventtouch.c */,
    1.42 +				8CB0A78611F6A90B00CBA2DE /* SDL_eventtouch.h */,
    1.43 +				8CB0A76A11F6A84800CBA2DE /* SDL_x11clipboard.c */,
    1.44 +				8CB0A76B11F6A84800CBA2DE /* SDL_x11clipboard.h */,
    1.45  				00CFA71A106B498B00758660 /* imKStoUCS.c */,
    1.46  				00CFA71B106B498B00758660 /* imKStoUCS.h */,
    1.47  				00CFA71C106B498B00758660 /* SDL_x11dyn.c */,
    1.48 @@ -1353,6 +1377,10 @@
    1.49  		01538367006D79147F000001 /* events */ = {
    1.50  			isa = PBXGroup;
    1.51  			children = (
    1.52 +				8CB0A77A11F6A8E700CBA2DE /* SDL_gesture_c.h */,
    1.53 +				8CB0A77B11F6A8E700CBA2DE /* SDL_gesture.c */,
    1.54 +				8CB0A77C11F6A8E700CBA2DE /* SDL_touch_c.h */,
    1.55 +				8CB0A77D11F6A8E700CBA2DE /* SDL_touch.c */,
    1.56  				0420497411E6F052007E7EC9 /* blank_cursor.h */,
    1.57  				0420497511E6F052007E7EC9 /* default_cursor.h */,
    1.58  				0420497611E6F052007E7EC9 /* scancodes_darwin.h */,
    1.59 @@ -1470,6 +1498,8 @@
    1.60  		0153844A006D81B07F000001 /* Public Headers */ = {
    1.61  			isa = PBXGroup;
    1.62  			children = (
    1.63 +				8CB0A77611F6A87F00CBA2DE /* SDL_gesture.h */,
    1.64 +				8CB0A77711F6A87F00CBA2DE /* SDL_touch.h */,
    1.65  				0C5AF5E501191D2B7F000001 /* begin_code.h */,
    1.66  				0C5AF5E601191D2B7F000001 /* close_code.h */,
    1.67  				0C5AF5FF01191D2B7F000001 /* SDL.h */,
    1.68 @@ -1805,6 +1835,12 @@
    1.69  				0420497D11E6F052007E7EC9 /* scancodes_linux.h in Headers */,
    1.70  				0420497E11E6F052007E7EC9 /* scancodes_win32.h in Headers */,
    1.71  				0420497F11E6F052007E7EC9 /* scancodes_xfree86.h in Headers */,
    1.72 +				8CB0A76D11F6A84800CBA2DE /* SDL_x11clipboard.h in Headers */,
    1.73 +				8CB0A77811F6A87F00CBA2DE /* SDL_gesture.h in Headers */,
    1.74 +				8CB0A77911F6A87F00CBA2DE /* SDL_touch.h in Headers */,
    1.75 +				8CB0A77E11F6A8E700CBA2DE /* SDL_gesture_c.h in Headers */,
    1.76 +				8CB0A78011F6A8E700CBA2DE /* SDL_touch_c.h in Headers */,
    1.77 +				8CB0A78811F6A90B00CBA2DE /* SDL_eventtouch.h in Headers */,
    1.78  			);
    1.79  			runOnlyForDeploymentPostprocessing = 0;
    1.80  		};
    1.81 @@ -2277,6 +2313,10 @@
    1.82  				04DEA57511E6009000386CAC /* SDL_clipboard.c in Sources */,
    1.83  				04DEA57A11E600A600386CAC /* SDL_cocoaclipboard.m in Sources */,
    1.84  				0420496211E6EFD3007E7EC9 /* SDL_clipboardevents.c in Sources */,
    1.85 +				8CB0A76C11F6A84800CBA2DE /* SDL_x11clipboard.c in Sources */,
    1.86 +				8CB0A77F11F6A8E700CBA2DE /* SDL_gesture.c in Sources */,
    1.87 +				8CB0A78111F6A8E700CBA2DE /* SDL_touch.c in Sources */,
    1.88 +				8CB0A78711F6A90B00CBA2DE /* SDL_eventtouch.c in Sources */,
    1.89  			);
    1.90  			runOnlyForDeploymentPostprocessing = 0;
    1.91  		};
     2.1 --- a/configure.in	Sat Jul 17 23:16:57 2010 -0400
     2.2 +++ b/configure.in	Thu Jul 22 08:12:28 2010 +0400
     2.3 @@ -285,6 +285,8 @@
     2.4      AC_DEFINE(uintptr_t, unsigned long)
     2.5  fi
     2.6  
     2.7 +AC_CHECK_HEADER(Linux/input.h,AC_DEFINE(HAVE_LINUX_INPUT_H))
     2.8 +
     2.9  # Standard C sources
    2.10  SOURCES="$SOURCES $srcdir/src/*.c"
    2.11  SOURCES="$SOURCES $srcdir/src/audio/*.c"
     3.1 --- a/src/video/cocoa/SDL_cocoaevents.m	Sat Jul 17 23:16:57 2010 -0400
     3.2 +++ b/src/video/cocoa/SDL_cocoaevents.m	Thu Jul 22 08:12:28 2010 +0400
     3.3 @@ -217,6 +217,8 @@
     3.4              if (([event modifierFlags] & NSCommandKeyMask) || [event type] == NSFlagsChanged)
     3.5                 [NSApp sendEvent: event];
     3.6              break;
     3.7 +		case NSBeginTouch:
     3.8 +			printf("Touch Event Received\n");
     3.9          default:
    3.10              [NSApp sendEvent:event];
    3.11              break;
     4.1 --- a/src/video/x11/SDL_eventtouch.c	Sat Jul 17 23:16:57 2010 -0400
     4.2 +++ b/src/video/x11/SDL_eventtouch.c	Thu Jul 22 08:12:28 2010 +0400
     4.3 @@ -24,12 +24,15 @@
     4.4  #include "SDL_eventtouch.h"
     4.5  #include "../../events/SDL_touch_c.h"
     4.6  
     4.7 +#ifdef HAVE_LINUX_INPUT_H
     4.8  #include <linux/input.h>
     4.9  #include <fcntl.h>
    4.10 +#endif
    4.11  
    4.12  void
    4.13  X11_InitTouch(_THIS)
    4.14  {
    4.15 +#ifdef HAVE_LINUX_INPUT_H
    4.16    printf("Initializing touch...\n");
    4.17  
    4.18    FILE *fd;
    4.19 @@ -109,6 +112,7 @@
    4.20    }
    4.21    
    4.22    close(fd);
    4.23 +#endif
    4.24  }
    4.25  
    4.26  void
     5.1 --- a/src/video/x11/SDL_x11events.c	Sat Jul 17 23:16:57 2010 -0400
     5.2 +++ b/src/video/x11/SDL_x11events.c	Thu Jul 22 08:12:28 2010 +0400
     5.3 @@ -37,10 +37,11 @@
     5.4  
     5.5  #include <stdio.h>
     5.6  
     5.7 +#ifdef HAVE_LINUX_INPUT_H
     5.8  //Touch Input/event* includes
     5.9  #include <linux/input.h>
    5.10  #include <fcntl.h>
    5.11 -
    5.12 +#endif
    5.13  /*#define DEBUG_XEVENTS*/
    5.14  
    5.15  static void
    5.16 @@ -401,7 +402,7 @@
    5.17          X11_DispatchEvent(_this);
    5.18      }
    5.19  
    5.20 -
    5.21 +#ifdef HAVE_LINUX_INPUT_H
    5.22      /* Process Touch events - TODO When X gets touch support, use that instead*/
    5.23      int i = 0,rd;
    5.24      char name[256];
    5.25 @@ -472,6 +473,7 @@
    5.26  	    }
    5.27  	}
    5.28      }
    5.29 +#endif
    5.30  }
    5.31  
    5.32  /* This is so wrong it hurts */