Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed x11 compile bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimtla committed Jul 22, 2010
1 parent 553a244 commit f656482
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 2 deletions.
40 changes: 40 additions & 0 deletions Xcode/SDL/SDL.xcodeproj/project.pbxproj
Expand Up @@ -476,6 +476,16 @@
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, ); }; };
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 */; };
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 */; };
Expand Down Expand Up @@ -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; };
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; };
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>"; };
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; };
Expand Down Expand Up @@ -1108,6 +1128,10 @@
00CFA719106B498B00758660 /* x11 */ = {
isa = PBXGroup;
children = (
8CB0A78511F6A90B00CBA2DE /* SDL_eventtouch.c */,
8CB0A78611F6A90B00CBA2DE /* SDL_eventtouch.h */,
8CB0A76A11F6A84800CBA2DE /* SDL_x11clipboard.c */,
8CB0A76B11F6A84800CBA2DE /* SDL_x11clipboard.h */,
00CFA71A106B498B00758660 /* imKStoUCS.c */,
00CFA71B106B498B00758660 /* imKStoUCS.h */,
00CFA71C106B498B00758660 /* SDL_x11dyn.c */,
Expand Down Expand Up @@ -1353,6 +1377,10 @@
01538367006D79147F000001 /* events */ = {
isa = PBXGroup;
children = (
8CB0A77A11F6A8E700CBA2DE /* SDL_gesture_c.h */,
8CB0A77B11F6A8E700CBA2DE /* SDL_gesture.c */,
8CB0A77C11F6A8E700CBA2DE /* SDL_touch_c.h */,
8CB0A77D11F6A8E700CBA2DE /* SDL_touch.c */,
0420497411E6F052007E7EC9 /* blank_cursor.h */,
0420497511E6F052007E7EC9 /* default_cursor.h */,
0420497611E6F052007E7EC9 /* scancodes_darwin.h */,
Expand Down Expand Up @@ -1470,6 +1498,8 @@
0153844A006D81B07F000001 /* Public Headers */ = {
isa = PBXGroup;
children = (
8CB0A77611F6A87F00CBA2DE /* SDL_gesture.h */,
8CB0A77711F6A87F00CBA2DE /* SDL_touch.h */,
0C5AF5E501191D2B7F000001 /* begin_code.h */,
0C5AF5E601191D2B7F000001 /* close_code.h */,
0C5AF5FF01191D2B7F000001 /* SDL.h */,
Expand Down Expand Up @@ -1805,6 +1835,12 @@
0420497D11E6F052007E7EC9 /* scancodes_linux.h in Headers */,
0420497E11E6F052007E7EC9 /* scancodes_win32.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;
};
Expand Down Expand Up @@ -2277,6 +2313,10 @@
04DEA57511E6009000386CAC /* SDL_clipboard.c in Sources */,
04DEA57A11E600A600386CAC /* SDL_cocoaclipboard.m 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;
};
Expand Down
2 changes: 2 additions & 0 deletions configure.in
Expand Up @@ -285,6 +285,8 @@ if test x$have_inttypes != xyes; then
AC_DEFINE(uintptr_t, unsigned long)
fi

AC_CHECK_HEADER(Linux/input.h,AC_DEFINE(HAVE_LINUX_INPUT_H))

# Standard C sources
SOURCES="$SOURCES $srcdir/src/*.c"
SOURCES="$SOURCES $srcdir/src/audio/*.c"
Expand Down
2 changes: 2 additions & 0 deletions src/video/cocoa/SDL_cocoaevents.m
Expand Up @@ -217,6 +217,8 @@ - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sende
if (([event modifierFlags] & NSCommandKeyMask) || [event type] == NSFlagsChanged)
[NSApp sendEvent: event];
break;
case NSBeginTouch:
printf("Touch Event Received\n");
default:
[NSApp sendEvent:event];
break;
Expand Down
4 changes: 4 additions & 0 deletions src/video/x11/SDL_eventtouch.c
Expand Up @@ -24,12 +24,15 @@
#include "SDL_eventtouch.h"
#include "../../events/SDL_touch_c.h"

#ifdef HAVE_LINUX_INPUT_H
#include <linux/input.h>
#include <fcntl.h>
#endif

void
X11_InitTouch(_THIS)
{
#ifdef HAVE_LINUX_INPUT_H
printf("Initializing touch...\n");

FILE *fd;
Expand Down Expand Up @@ -109,6 +112,7 @@ X11_InitTouch(_THIS)
}

close(fd);
#endif
}

void
Expand Down
6 changes: 4 additions & 2 deletions src/video/x11/SDL_x11events.c
Expand Up @@ -37,10 +37,11 @@

#include <stdio.h>

#ifdef HAVE_LINUX_INPUT_H
//Touch Input/event* includes
#include <linux/input.h>
#include <fcntl.h>

#endif
/*#define DEBUG_XEVENTS*/

static void
Expand Down Expand Up @@ -401,7 +402,7 @@ X11_PumpEvents(_THIS)
X11_DispatchEvent(_this);
}


#ifdef HAVE_LINUX_INPUT_H
/* Process Touch events - TODO When X gets touch support, use that instead*/
int i = 0,rd;
char name[256];
Expand Down Expand Up @@ -472,6 +473,7 @@ X11_PumpEvents(_THIS)
}
}
}
#endif
}

/* This is so wrong it hurts */
Expand Down

0 comments on commit f656482

Please sign in to comment.