Commit c1e63cf8 authored by jimtla's avatar jimtla

Fixed x11 compile bugs.

parent 0858d51e
...@@ -476,6 +476,16 @@ ...@@ -476,6 +476,16 @@
04F2AF671104AC0800D6DDF7 /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F2AF651104AC0800D6DDF7 /* SDL_assert.c */; }; 04F2AF671104AC0800D6DDF7 /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F2AF651104AC0800D6DDF7 /* SDL_assert.c */; };
04F2AF691104AC4500D6DDF7 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */; settings = {ATTRIBUTES = (Public, ); }; }; 04F2AF691104AC4500D6DDF7 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */; settings = {ATTRIBUTES = (Public, ); }; };
04F2AF6A1104AC4500D6DDF7 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */; }; 04F2AF6A1104AC4500D6DDF7 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */; };
8CB0A76C11F6A84800CBA2DE /* SDL_x11clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 8CB0A76A11F6A84800CBA2DE /* SDL_x11clipboard.c */; };
8CB0A76D11F6A84800CBA2DE /* SDL_x11clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A76B11F6A84800CBA2DE /* SDL_x11clipboard.h */; };
8CB0A77811F6A87F00CBA2DE /* SDL_gesture.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A77611F6A87F00CBA2DE /* SDL_gesture.h */; };
8CB0A77911F6A87F00CBA2DE /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A77711F6A87F00CBA2DE /* SDL_touch.h */; };
8CB0A77E11F6A8E700CBA2DE /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A77A11F6A8E700CBA2DE /* SDL_gesture_c.h */; };
8CB0A77F11F6A8E700CBA2DE /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = 8CB0A77B11F6A8E700CBA2DE /* SDL_gesture.c */; };
8CB0A78011F6A8E700CBA2DE /* SDL_touch_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A77C11F6A8E700CBA2DE /* SDL_touch_c.h */; };
8CB0A78111F6A8E700CBA2DE /* SDL_touch.c in Sources */ = {isa = PBXBuildFile; fileRef = 8CB0A77D11F6A8E700CBA2DE /* SDL_touch.c */; };
8CB0A78711F6A90B00CBA2DE /* SDL_eventtouch.c in Sources */ = {isa = PBXBuildFile; fileRef = 8CB0A78511F6A90B00CBA2DE /* SDL_eventtouch.c */; };
8CB0A78811F6A90B00CBA2DE /* SDL_eventtouch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A78611F6A90B00CBA2DE /* SDL_eventtouch.h */; };
BECDF62E0761BA81005FE872 /* SDL_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538330006D78D67F000001 /* SDL_audio.c */; }; BECDF62E0761BA81005FE872 /* SDL_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538330006D78D67F000001 /* SDL_audio.c */; };
BECDF62F0761BA81005FE872 /* SDL_audiocvt.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538331006D78D67F000001 /* SDL_audiocvt.c */; }; BECDF62F0761BA81005FE872 /* SDL_audiocvt.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538331006D78D67F000001 /* SDL_audiocvt.c */; };
BECDF6300761BA81005FE872 /* SDL_audiodev.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538332006D78D67F000001 /* SDL_audiodev.c */; }; BECDF6300761BA81005FE872 /* SDL_audiodev.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538332006D78D67F000001 /* SDL_audiodev.c */; };
...@@ -864,6 +874,16 @@ ...@@ -864,6 +874,16 @@
0C5AF5FD01191D2B7F000001 /* SDL_version.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_version.h; path = ../../include/SDL_version.h; sourceTree = SOURCE_ROOT; }; 0C5AF5FD01191D2B7F000001 /* SDL_version.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_version.h; path = ../../include/SDL_version.h; sourceTree = SOURCE_ROOT; };
0C5AF5FE01191D2B7F000001 /* SDL_video.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_video.h; path = ../../include/SDL_video.h; sourceTree = SOURCE_ROOT; }; 0C5AF5FE01191D2B7F000001 /* SDL_video.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_video.h; path = ../../include/SDL_video.h; sourceTree = SOURCE_ROOT; };
0C5AF5FF01191D2B7F000001 /* SDL.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL.h; path = ../../include/SDL.h; sourceTree = SOURCE_ROOT; }; 0C5AF5FF01191D2B7F000001 /* SDL.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL.h; path = ../../include/SDL.h; sourceTree = SOURCE_ROOT; };
8CB0A76A11F6A84800CBA2DE /* SDL_x11clipboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_x11clipboard.c; sourceTree = "<group>"; };
8CB0A76B11F6A84800CBA2DE /* SDL_x11clipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_x11clipboard.h; sourceTree = "<group>"; };
8CB0A77611F6A87F00CBA2DE /* SDL_gesture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_gesture.h; path = ../../include/SDL_gesture.h; sourceTree = SOURCE_ROOT; };
8CB0A77711F6A87F00CBA2DE /* SDL_touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_touch.h; path = ../../include/SDL_touch.h; sourceTree = SOURCE_ROOT; };
8CB0A77A11F6A8E700CBA2DE /* SDL_gesture_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gesture_c.h; sourceTree = "<group>"; };
8CB0A77B11F6A8E700CBA2DE /* SDL_gesture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_gesture.c; sourceTree = "<group>"; };
8CB0A77C11F6A8E700CBA2DE /* SDL_touch_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_touch_c.h; sourceTree = "<group>"; };
8CB0A77D11F6A8E700CBA2DE /* SDL_touch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_touch.c; sourceTree = "<group>"; };
8CB0A78511F6A90B00CBA2DE /* SDL_eventtouch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_eventtouch.c; sourceTree = "<group>"; };
8CB0A78611F6A90B00CBA2DE /* SDL_eventtouch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_eventtouch.h; sourceTree = "<group>"; };
B24DA50405A88D52006B9F1C /* SDL_cpuinfo.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SDL_cpuinfo.c; sourceTree = "<group>"; }; B24DA50405A88D52006B9F1C /* SDL_cpuinfo.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SDL_cpuinfo.c; sourceTree = "<group>"; };
B29A290D04E5B28700A80002 /* SDL_loadso.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_loadso.h; path = ../../include/SDL_loadso.h; sourceTree = "<group>"; }; B29A290D04E5B28700A80002 /* SDL_loadso.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_loadso.h; path = ../../include/SDL_loadso.h; sourceTree = "<group>"; };
B2CF8DC405C444E400E5DC7F /* SDL_cpuinfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_cpuinfo.h; path = ../../include/SDL_cpuinfo.h; sourceTree = SOURCE_ROOT; }; B2CF8DC405C444E400E5DC7F /* SDL_cpuinfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_cpuinfo.h; path = ../../include/SDL_cpuinfo.h; sourceTree = SOURCE_ROOT; };
...@@ -1108,6 +1128,10 @@ ...@@ -1108,6 +1128,10 @@
00CFA719106B498B00758660 /* x11 */ = { 00CFA719106B498B00758660 /* x11 */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
8CB0A78511F6A90B00CBA2DE /* SDL_eventtouch.c */,
8CB0A78611F6A90B00CBA2DE /* SDL_eventtouch.h */,
8CB0A76A11F6A84800CBA2DE /* SDL_x11clipboard.c */,
8CB0A76B11F6A84800CBA2DE /* SDL_x11clipboard.h */,
00CFA71A106B498B00758660 /* imKStoUCS.c */, 00CFA71A106B498B00758660 /* imKStoUCS.c */,
00CFA71B106B498B00758660 /* imKStoUCS.h */, 00CFA71B106B498B00758660 /* imKStoUCS.h */,
00CFA71C106B498B00758660 /* SDL_x11dyn.c */, 00CFA71C106B498B00758660 /* SDL_x11dyn.c */,
...@@ -1353,6 +1377,10 @@ ...@@ -1353,6 +1377,10 @@
01538367006D79147F000001 /* events */ = { 01538367006D79147F000001 /* events */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
8CB0A77A11F6A8E700CBA2DE /* SDL_gesture_c.h */,
8CB0A77B11F6A8E700CBA2DE /* SDL_gesture.c */,
8CB0A77C11F6A8E700CBA2DE /* SDL_touch_c.h */,
8CB0A77D11F6A8E700CBA2DE /* SDL_touch.c */,
0420497411E6F052007E7EC9 /* blank_cursor.h */, 0420497411E6F052007E7EC9 /* blank_cursor.h */,
0420497511E6F052007E7EC9 /* default_cursor.h */, 0420497511E6F052007E7EC9 /* default_cursor.h */,
0420497611E6F052007E7EC9 /* scancodes_darwin.h */, 0420497611E6F052007E7EC9 /* scancodes_darwin.h */,
...@@ -1470,6 +1498,8 @@ ...@@ -1470,6 +1498,8 @@
0153844A006D81B07F000001 /* Public Headers */ = { 0153844A006D81B07F000001 /* Public Headers */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
8CB0A77611F6A87F00CBA2DE /* SDL_gesture.h */,
8CB0A77711F6A87F00CBA2DE /* SDL_touch.h */,
0C5AF5E501191D2B7F000001 /* begin_code.h */, 0C5AF5E501191D2B7F000001 /* begin_code.h */,
0C5AF5E601191D2B7F000001 /* close_code.h */, 0C5AF5E601191D2B7F000001 /* close_code.h */,
0C5AF5FF01191D2B7F000001 /* SDL.h */, 0C5AF5FF01191D2B7F000001 /* SDL.h */,
...@@ -1805,6 +1835,12 @@ ...@@ -1805,6 +1835,12 @@
0420497D11E6F052007E7EC9 /* scancodes_linux.h in Headers */, 0420497D11E6F052007E7EC9 /* scancodes_linux.h in Headers */,
0420497E11E6F052007E7EC9 /* scancodes_win32.h in Headers */, 0420497E11E6F052007E7EC9 /* scancodes_win32.h in Headers */,
0420497F11E6F052007E7EC9 /* scancodes_xfree86.h in Headers */, 0420497F11E6F052007E7EC9 /* scancodes_xfree86.h in Headers */,
8CB0A76D11F6A84800CBA2DE /* SDL_x11clipboard.h in Headers */,
8CB0A77811F6A87F00CBA2DE /* SDL_gesture.h in Headers */,
8CB0A77911F6A87F00CBA2DE /* SDL_touch.h in Headers */,
8CB0A77E11F6A8E700CBA2DE /* SDL_gesture_c.h in Headers */,
8CB0A78011F6A8E700CBA2DE /* SDL_touch_c.h in Headers */,
8CB0A78811F6A90B00CBA2DE /* SDL_eventtouch.h in Headers */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -2277,6 +2313,10 @@ ...@@ -2277,6 +2313,10 @@
04DEA57511E6009000386CAC /* SDL_clipboard.c in Sources */, 04DEA57511E6009000386CAC /* SDL_clipboard.c in Sources */,
04DEA57A11E600A600386CAC /* SDL_cocoaclipboard.m in Sources */, 04DEA57A11E600A600386CAC /* SDL_cocoaclipboard.m in Sources */,
0420496211E6EFD3007E7EC9 /* SDL_clipboardevents.c in Sources */, 0420496211E6EFD3007E7EC9 /* SDL_clipboardevents.c in Sources */,
8CB0A76C11F6A84800CBA2DE /* SDL_x11clipboard.c in Sources */,
8CB0A77F11F6A8E700CBA2DE /* SDL_gesture.c in Sources */,
8CB0A78111F6A8E700CBA2DE /* SDL_touch.c in Sources */,
8CB0A78711F6A90B00CBA2DE /* SDL_eventtouch.c in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
......
...@@ -285,6 +285,8 @@ if test x$have_inttypes != xyes; then ...@@ -285,6 +285,8 @@ if test x$have_inttypes != xyes; then
AC_DEFINE(uintptr_t, unsigned long) AC_DEFINE(uintptr_t, unsigned long)
fi fi
AC_CHECK_HEADER(Linux/input.h,AC_DEFINE(HAVE_LINUX_INPUT_H))
# Standard C sources # Standard C sources
SOURCES="$SOURCES $srcdir/src/*.c" SOURCES="$SOURCES $srcdir/src/*.c"
SOURCES="$SOURCES $srcdir/src/audio/*.c" SOURCES="$SOURCES $srcdir/src/audio/*.c"
......
...@@ -217,6 +217,8 @@ Cocoa_PumpEvents(_THIS) ...@@ -217,6 +217,8 @@ Cocoa_PumpEvents(_THIS)
if (([event modifierFlags] & NSCommandKeyMask) || [event type] == NSFlagsChanged) if (([event modifierFlags] & NSCommandKeyMask) || [event type] == NSFlagsChanged)
[NSApp sendEvent: event]; [NSApp sendEvent: event];
break; break;
case NSBeginTouch:
printf("Touch Event Received\n");
default: default:
[NSApp sendEvent:event]; [NSApp sendEvent:event];
break; break;
......
...@@ -24,12 +24,15 @@ ...@@ -24,12 +24,15 @@
#include "SDL_eventtouch.h" #include "SDL_eventtouch.h"
#include "../../events/SDL_touch_c.h" #include "../../events/SDL_touch_c.h"
#ifdef HAVE_LINUX_INPUT_H
#include <linux/input.h> #include <linux/input.h>
#include <fcntl.h> #include <fcntl.h>
#endif
void void
X11_InitTouch(_THIS) X11_InitTouch(_THIS)
{ {
#ifdef HAVE_LINUX_INPUT_H
printf("Initializing touch...\n"); printf("Initializing touch...\n");
FILE *fd; FILE *fd;
...@@ -109,6 +112,7 @@ X11_InitTouch(_THIS) ...@@ -109,6 +112,7 @@ X11_InitTouch(_THIS)
} }
close(fd); close(fd);
#endif
} }
void void
......
...@@ -37,10 +37,11 @@ ...@@ -37,10 +37,11 @@
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_LINUX_INPUT_H
//Touch Input/event* includes //Touch Input/event* includes
#include <linux/input.h> #include <linux/input.h>
#include <fcntl.h> #include <fcntl.h>
#endif
/*#define DEBUG_XEVENTS*/ /*#define DEBUG_XEVENTS*/
static void static void
...@@ -401,7 +402,7 @@ X11_PumpEvents(_THIS) ...@@ -401,7 +402,7 @@ X11_PumpEvents(_THIS)
X11_DispatchEvent(_this); X11_DispatchEvent(_this);
} }
#ifdef HAVE_LINUX_INPUT_H
/* Process Touch events - TODO When X gets touch support, use that instead*/ /* Process Touch events - TODO When X gets touch support, use that instead*/
int i = 0,rd; int i = 0,rd;
char name[256]; char name[256];
...@@ -472,6 +473,7 @@ X11_PumpEvents(_THIS) ...@@ -472,6 +473,7 @@ X11_PumpEvents(_THIS)
} }
} }
} }
#endif
} }
/* This is so wrong it hurts */ /* This is so wrong it hurts */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment