diff options
author | Mark Linimon <linimon@FreeBSD.org> | 2003-12-20 20:16:54 +0000 |
---|---|---|
committer | Mark Linimon <linimon@FreeBSD.org> | 2003-12-20 20:16:54 +0000 |
commit | b54bfeaa7a50c62b5d22218c6ef39e4f00223afd (patch) | |
tree | 96cb871274e73b2115049a17ec8efeddd563c013 /devel/sdl12/files | |
parent | fe7f5265852ad36eaf214ab5727a248db6b1aa3b (diff) | |
download | ports-b54bfeaa7a50c62b5d22218c6ef39e4f00223afd.tar.gz ports-b54bfeaa7a50c62b5d22218c6ef39e4f00223afd.zip |
Update to 1.2.6:
Added SDL_LoadObject(), SDL_LoadFunction(), and SDL_UnloadObject()
Added SDL_GL_MULTISAMPLEBUFFERS and SDL_GL_MULTISAMPLESAMPLES for FSAA
PR: ports/41400
Submitted by: Marc Recht <marc@informatik.uni-bremen.de>
Notes
Notes:
svn path=/head/; revision=96272
Diffstat (limited to 'devel/sdl12/files')
-rw-r--r-- | devel/sdl12/files/patch-ac | 17 | ||||
-rw-r--r-- | devel/sdl12/files/patch-joystick::bsd::SDL_sysjoystick.c | 165 | ||||
-rw-r--r-- | devel/sdl12/files/patch-src::video::SDL_stretch.c | 18 |
3 files changed, 7 insertions, 193 deletions
diff --git a/devel/sdl12/files/patch-ac b/devel/sdl12/files/patch-ac index 81c1a6c8de4f..b18eca83ccb3 100644 --- a/devel/sdl12/files/patch-ac +++ b/devel/sdl12/files/patch-ac @@ -1,9 +1,6 @@ - -$FreeBSD$ - ---- configure.orig Sun Oct 6 23:35:02 2002 -+++ configure Fri Jun 27 22:19:43 2003 -@@ -674,9 +674,9 @@ +--- configure.orig Sat Aug 30 21:13:23 2003 ++++ configure Mon Sep 29 22:20:16 2003 +@@ -676,9 +676,9 @@ # libtool versioning LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION @@ -15,7 +12,7 @@ $FreeBSD$ -@@ -2794,7 +2794,7 @@ +@@ -2832,7 +2832,7 @@ SDL_CFLAGS="" @@ -24,7 +21,7 @@ $FreeBSD$ case "$target" in -@@ -5840,8 +5840,8 @@ +@@ -5966,8 +5966,8 @@ # pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" ;; *-*-freebsd*) @@ -35,11 +32,11 @@ $FreeBSD$ ;; *-*-netbsd*) pthread_cflags="-I/usr/pkg/include -D_REENTRANT" -@@ -6946,7 +6946,9 @@ +@@ -7231,7 +7231,9 @@ CFLAGS="$CFLAGS -DHAVE_USBHID_H" fi if test x$have_libusb_h = xyes; then -+ if x$have_libusbhid_h = xno; then ++ if test x$have_libusbhid_h = xno; then CFLAGS="$CFLAGS -DHAVE_LIBUSB_H" + fi fi diff --git a/devel/sdl12/files/patch-joystick::bsd::SDL_sysjoystick.c b/devel/sdl12/files/patch-joystick::bsd::SDL_sysjoystick.c index 9dd750180e4f..e69de29bb2d1 100644 --- a/devel/sdl12/files/patch-joystick::bsd::SDL_sysjoystick.c +++ b/devel/sdl12/files/patch-joystick::bsd::SDL_sysjoystick.c @@ -1,165 +0,0 @@ - -$FreeBSD$ - ---- src/joystick/bsd/SDL_sysjoystick.c.orig Sat Oct 5 08:32:49 2002 -+++ src/joystick/bsd/SDL_sysjoystick.c Mon Jul 14 21:12:23 2003 -@@ -53,6 +53,11 @@ - #include <libusbhid.h> - #endif - -+#ifdef __FreeBSD__ -+#include <osreldate.h> -+#include <sys/joystick.h> -+#endif -+ - #include "SDL_error.h" - #include "SDL_joystick.h" - #include "SDL_sysjoystick.h" -@@ -192,7 +197,18 @@ - joy->hwdata = hw; - hw->fd = fd; - hw->path = strdup(path); -- hw->type = BSDJOY_UHID; -+ if (! strncmp(path, "/dev/joy", 8)) -+ { -+ hw->type = BSDJOY_JOY; -+ joy->naxes = 2; -+ joy->nbuttons = 2; -+ joy->nhats = 0; -+ joy->nballs = 0; -+ joydevnames[joy->index] = strdup("Gameport joystick"); -+ goto usbend; -+ } -+ else -+ hw->type = BSDJOY_UHID; - hw->repdesc = hid_get_report_desc(fd); - if (hw->repdesc == NULL) { - SDL_SetError("%s: USB_GET_REPORT_DESC: %s", hw->path, -@@ -201,6 +217,7 @@ - } - - rep = &hw->inreport; -+ rep->rid = 0; - if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) { - goto usberr; - } -@@ -210,7 +227,7 @@ - goto usberr; - } - --#ifdef USBHID_NEW -+#if defined(USBHID_NEW) || (defined(__FreeBSD__) && __FreeBSD_version >= 500111) - hdata = hid_start_parse(hw->repdesc, 1 << hid_input, rep->rid); - #else - hdata = hid_start_parse(hw->repdesc, 1 << hid_input); -@@ -275,6 +292,7 @@ - } - hid_end_parse(hdata); - -+usbend: - /* The poll blocks the event thread. */ - fcntl(fd, F_SETFL, O_NONBLOCK); - -@@ -294,13 +312,62 @@ - struct report *rep; - int nbutton, naxe = -1; - Sint32 v; -+ struct joystick gameport; -+ static int x, y, xmin=0xffff, ymin=0xffff, xmax=0, ymax=0; -+ -+ if (!strncmp(joy->hwdata->path, "/dev/joy", 8)) { -+ if (read(joy->hwdata->fd, &gameport, sizeof(gameport)) != sizeof(gameport)) { -+ return; -+ } -+ if (abs(x - gameport.x) > 8) { -+ x = gameport.x; -+ if (x < xmin) { -+ xmin = x; -+ } -+ if (x > xmax) { -+ xmax = x; -+ } -+ if (xmin == xmax) { -+ xmin--; -+ xmax++; -+ } -+ v = (Sint32)x; -+ v -= (xmax + xmin + 1)/2; -+ v *= 32768/((xmax - xmin + 1)/2); -+ SDL_PrivateJoystickAxis(joy, 0, v); -+ } -+ if (abs(y - gameport.y) > 8) { -+ y = gameport.y; -+ if (y < ymin) { -+ ymin = y; -+ } -+ if (y > ymax) { -+ ymax = y; -+ } -+ if (ymin == ymax) { -+ ymin--; -+ ymax++; -+ } -+ v = (Sint32)y; -+ v -= (ymax + ymin + 1)/2; -+ v *= 32768/((ymax - ymin + 1)/2); -+ SDL_PrivateJoystickAxis(joy, 1, v); -+ } -+ if (gameport.b1 != joy->buttons[0]) { -+ SDL_PrivateJoystickButton(joy, 0, gameport.b1); -+ } -+ if (gameport.b2 != joy->buttons[1]) { -+ SDL_PrivateJoystickButton(joy, 1, gameport.b2); -+ } -+ return; -+ } - - rep = &joy->hwdata->inreport; - - if (read(joy->hwdata->fd, REP_BUF_DATA(rep), rep->size) != rep->size) { - return; - } --#ifdef USBHID_NEW -+#if defined(USBHID_NEW) || (defined(__FreeBSD__) && __FreeBSD_version >= 500111) - hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input, rep->rid); - #else - hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input); -@@ -370,8 +437,10 @@ - void - SDL_SYS_JoystickClose(SDL_Joystick *joy) - { -- report_free(&joy->hwdata->inreport); -- hid_dispose_report_desc(joy->hwdata->repdesc); -+ if (strncmp(joy->hwdata->path, "/dev/joy", 8)) { -+ report_free(&joy->hwdata->inreport); -+ hid_dispose_report_desc(joy->hwdata->repdesc); -+ } - close(joy->hwdata->fd); - free(joy->hwdata->path); - free(joy->hwdata); -@@ -399,11 +468,24 @@ - { - int len; - --#ifdef USBHID_NEW -+#ifdef __FreeBSD__ -+# if (__FreeBSD_version >= 470000) -+# if ((__FreeBSD_version <= 500111) && (__FreeBSD_version >= 480000)) -+ len = hid_report_size(rd, r->rid, repinfo[repind].kind); -+# else -+ len = hid_report_size(rd, repinfo[repind].kind, r->rid); -+# endif -+# else - len = hid_report_size(rd, repinfo[repind].kind, &r->rid); -+#endif - #else -+# ifdef USBHID_NEW -+ len = hid_report_size(rd, repinfo[repind].kind, &r->rid); -+# else - len = hid_report_size(rd, repinfo[repind].kind, r->rid); -+# endif - #endif -+ - if (len < 0) { - SDL_SetError("Negative HID report size"); - return (-1); diff --git a/devel/sdl12/files/patch-src::video::SDL_stretch.c b/devel/sdl12/files/patch-src::video::SDL_stretch.c index 4bb10b67a2a0..e69de29bb2d1 100644 --- a/devel/sdl12/files/patch-src::video::SDL_stretch.c +++ b/devel/sdl12/files/patch-src::video::SDL_stretch.c @@ -1,18 +0,0 @@ - -$FreeBSD$ - ---- src/video/SDL_stretch.c 2003/07/14 18:17:21 1.1 -+++ src/video/SDL_stretch.c 2003/07/14 18:18:39 -@@ -261,9 +261,9 @@ - break; - default: - #ifdef __GNUC__ -- __asm__ __volatile__ (" -- call _copy_row -- " -+ __asm__ __volatile__ ("" -+ " call _copy_row" -+ "" - : "=&D" (u1), "=&S" (u2) - : "0" (dstp), "1" (srcp) - : "memory" ); |