FreeBSD Bugzilla – Attachment 125432 Details for
Bug 169042
Joystick support in devel/sdl12 is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.40 KB, created by
jeffrey
on 2012-06-13 22:10:11 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
jeffrey
Created:
2012-06-13 22:10:11 UTC
Size:
1.40 KB
patch
obsolete
>diff -u a/src/joystick/bsd/SDL_sysjoystick.c b/src/joystick/bsd/SDL_sysjoystick.c >--- a/src/joystick/bsd/SDL_sysjoystick.c 2012-01-18 22:30:06.000000000 -0800 >+++ b/src/joystick/bsd/SDL_sysjoystick.c 2012-06-13 13:53:59.000000000 -0700 >@@ -82,13 +82,9 @@ > #define MAX_JOYS (MAX_UHID_JOYS + MAX_JOY_JOYS) > > struct report { >-#if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063) >- struct usb_gen_descriptor *buf; /* Buffer */ >-#else >- struct usb_ctl_report *buf; /* Buffer */ >-#endif >- size_t size; /* Buffer size */ >- int rid; /* Report ID */ >+ void *buf; /* Buffer */ >+ size_t size; /* Buffer size */ >+ int rid; /* Report ID */ > enum { > SREPORT_UNINIT, > SREPORT_CLEAN, >@@ -148,13 +144,7 @@ > static int report_alloc(struct report *, struct report_desc *, int); > static void report_free(struct report *); > >-#if defined(USBHID_UCR_DATA) || defined(__FreeBSD_kernel__) >-#define REP_BUF_DATA(rep) ((rep)->buf->ucr_data) >-#elif (defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063)) >-#define REP_BUF_DATA(rep) ((rep)->buf->ugd_data) >-#else >-#define REP_BUF_DATA(rep) ((rep)->buf->data) >-#endif >+#define REP_BUF_DATA(rep) ((rep)->buf) > > int > SDL_SYS_JoystickInit(void) >@@ -582,8 +572,7 @@ > r->size = len; > > if (r->size > 0) { >- r->buf = SDL_malloc(sizeof(*r->buf) - sizeof(REP_BUF_DATA(r)) + >- r->size); >+ r->buf = SDL_malloc(r->size); > if (r->buf == NULL) { > SDL_OutOfMemory(); > return (-1);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 169042
: 125432