Please test Mac joysticks with latest in Mercurial

I just pushed a rewrite of the Mac OS X joystick code…

 https://hg.libsdl.org/SDL/rev/1c185bacf915

…this dumps the original way of managing HID devices for a new API
that was introduced in Mac OS X 10.5.

There are various technical reasons for this, but most notably, it lets
the PS4 controller work over Bluetooth out of the box, which is why I’m
trying to cram this in for 2.0.2.

Please test this with your Mac games and joysticks, and report back. If
there are reasonable bugs, I’ll fix them before 2.0.2, but if it turns
out to be a complete disaster or something, I’ll revert the change until
after 2.0.2 ships.

Thanks!

–ryan.

line 1766, is there a reason to ignore wheel devices? Maybe it would make
sense to add:

pDevice->usage != kHIDUsage_GD_Wheel

In the future, are there any plans to add an HID joystick driver to
windows to replace the deprecated DirectInput/WinMM APIs?

2014-02-22 8:46 GMT+01:00 Ryan C. Gordon :>

I just pushed a rewrite of the Mac OS X joystick code…

https://hg.libsdl.org/SDL/rev/1c185bacf915

…this dumps the original way of managing HID devices for a new API that
was introduced in Mac OS X 10.5.

There are various technical reasons for this, but most notably, it lets
the PS4 controller work over Bluetooth out of the box, which is why I’m
trying to cram this in for 2.0.2.

Please test this with your Mac games and joysticks, and report back. If
there are reasonable bugs, I’ll fix them before 2.0.2, but if it turns out
to be a complete disaster or something, I’ll revert the change until after
2.0.2 ships.

Thanks!

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Does this change the joystick guids in the game controller database?On Fri, Feb 21, 2014 at 11:46 PM, Ryan C. Gordon wrote:

I just pushed a rewrite of the Mac OS X joystick code…

https://hg.libsdl.org/SDL/rev/1c185bacf915

…this dumps the original way of managing HID devices for a new API that
was introduced in Mac OS X 10.5.

There are various technical reasons for this, but most notably, it lets
the PS4 controller work over Bluetooth out of the box, which is why I’m
trying to cram this in for 2.0.2.

Please test this with your Mac games and joysticks, and report back. If
there are reasonable bugs, I’ll fix them before 2.0.2, but if it turns out
to be a complete disaster or something, I’ll revert the change until after
2.0.2 ships.

Thanks!

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Nope!

–ryan.> On Feb 22, 2014, at 12:36 PM, Sam Lantinga wrote:

Does this change the joystick guids in the game controller database?

On Fri, Feb 21, 2014 at 11:46 PM, Ryan C. Gordon <@icculus> wrote:

I just pushed a rewrite of the Mac OS X joystick code…

https://hg.libsdl.org/SDL/rev/1c185bacf915

…this dumps the original way of managing HID devices for a new API that was introduced in Mac OS X 10.5.

There are various technical reasons for this, but most notably, it lets the PS4 controller work over Bluetooth out of the box, which is why I’m trying to cram this in for 2.0.2.

Please test this with your Mac games and joysticks, and report back. If there are reasonable bugs, I’ll fix them before 2.0.2, but if it turns out to be a complete disaster or something, I’ll revert the change until after 2.0.2 ships.

Thanks!

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

line 1766, is there a reason to ignore wheel devices? Maybe it would
make sense to add:

pDevice->usage != kHIDUsage_GD_Wheel

(My reading of the spec says that) HID doesn’t specify wheels as
devices, just as elements on devices.

 http://www.usb.org/developers/devclass_docs/Hut1_11.pdf

On page 27 is a list of possible usage values for the Generic Desktop
usage page.

The bold text items are collections (devices). The non-bold ones are
elements on those devices. So we’ll never get a kHIDUsage_GD_Wheel at
this point in the program, and we should reject it as bogus if we ever do.

We do accept elements on those devices that are kHIDUsage_GD_Wheel, in
AddHIDElement(), and treat them as axes.

I could be wrong about the spec’s intentions, though. I’m not a careful
reader. :slight_smile:

–ryan.

Ah indeed, you are totally right. I was working with Apple’s HID
documentation, which is rather confusing - the usb.org documentation is
much clearer, thanks!

2014-02-23 2:13 GMT+01:00 Ryan C. Gordon :>

line 1766, is there a reason to ignore wheel devices? Maybe it would

make sense to add:

pDevice->usage != kHIDUsage_GD_Wheel

(My reading of the spec says that) HID doesn’t specify wheels as devices,
just as elements on devices.

http://www.usb.org/developers/devclass_docs/Hut1_11.pdf

On page 27 is a list of possible usage values for the Generic Desktop
usage page.

The bold text items are collections (devices). The non-bold ones are
elements on those devices. So we’ll never get a kHIDUsage_GD_Wheel at this
point in the program, and we should reject it as bogus if we ever do.

We do accept elements on those devices that are kHIDUsage_GD_Wheel, in
AddHIDElement(), and treat them as axes.

I could be wrong about the spec’s intentions, though. I’m not a careful
reader. :slight_smile:

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

We noticed a crash bug on latest SDL2 from Mercurial (changeset 8245:2c63c27c4d1d)
on OSX 10.8.5. We get EXC_BAD_ACCESS at SDL_syshaptic.c line 682 when quitting.
See stack trace below.

This seems to have been caused by Edward’s hotplug work. List item next pointer
is not initialized and points to garbage. On quit we try to free it which fails.
To fix it add
item->next = NULL;
to SDL_syshaptic.c line 252.

Extract from OSX crash report:

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
*** error for object 0x80000000: pointer being freed was not allocated

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x9915ea6a __pthread_kill + 10
1 libsystem_c.dylib 0x92a42b2f pthread_kill + 101
2 libsystem_c.dylib 0x92a79631 abort + 168
3 libsystem_c.dylib 0x92a63227 szone_error + 443
4 libsystem_c.dylib 0x92a6387b free_large + 243
5 libsystem_c.dylib 0x92a5bd30 free + 217
6 org.libsdl.SDL2 0x027262f7 SDL_free_REAL + 23 (SDL_malloc.c:47)
7 org.libsdl.SDL2 0x02719807 SDL_SYS_HapticQuit + 87 (SDL_syshaptic.c:681)
8 org.libsdl.SDL2 0x0271d5e6 SDL_HapticQuit + 22 (SDL_haptic.c:392)
9 org.libsdl.SDL2 0x02723fa1 SDL_QuitSubSystem_REAL + 241 (SDL.c:275)
10 org.libsdl.SDL2 0x027243ce SDL_Quit_REAL + 46 (SDL.c:358)
11 org.libsdl.SDL2 0x027d7b82 SDL_Quit + 18 (SDL_dynapi_procs.h:93)
12 com.Drinkbox.Guacamelee 0x0010326a Shutdown() + 698
13 com.Drinkbox.Guacamelee 0x0010b5f1 main + 13809
14 com.Drinkbox.Guacamelee 0x000c1285 start + 53

2014-02-24 10:06 GMT-03:00 Turo Lamminen <turo.lamminen at alternativegames.net

:

We noticed a crash bug on latest SDL2 from Mercurial (changeset
8245:2c63c27c4d1d)
on OSX 10.8.5. We get EXC_BAD_ACCESS at SDL_syshaptic.c line 682 when
quitting.
See stack trace below.

This seems to have been caused by Edward’s hotplug work. List item next
pointer
is not initialized and points to garbage. On quit we try to free it which
fails.
To fix it add
item->next = NULL;
to SDL_syshaptic.c line 252.

Extract from OSX crash report:

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
*** error for object 0x80000000: pointer being freed was not allocated

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x9915ea6a __pthread_kill + 10
1 libsystem_c.dylib 0x92a42b2f pthread_kill + 101
2 libsystem_c.dylib 0x92a79631 abort + 168
3 libsystem_c.dylib 0x92a63227 szone_error + 443
4 libsystem_c.dylib 0x92a6387b free_large + 243
5 libsystem_c.dylib 0x92a5bd30 free + 217
6 org.libsdl.SDL2 0x027262f7 SDL_free_REAL + 23
(SDL_malloc.c:47)
7 org.libsdl.SDL2 0x02719807 SDL_SYS_HapticQuit + 87
(SDL_syshaptic.c:681)
8 org.libsdl.SDL2 0x0271d5e6 SDL_HapticQuit + 22
(SDL_haptic.c:392)
9 org.libsdl.SDL2 0x02723fa1 SDL_QuitSubSystem_REAL

  • 241 (SDL.c:275)
    10 org.libsdl.SDL2 0x027243ce SDL_Quit_REAL + 46
    (SDL.c:358)
    11 org.libsdl.SDL2 0x027d7b82 SDL_Quit + 18
    (SDL_dynapi_procs.h:93)
    12 com.Drinkbox.Guacamelee 0x0010326a Shutdown() + 698
    13 com.Drinkbox.Guacamelee 0x0010b5f1 main + 13809
    14 com.Drinkbox.Guacamelee 0x000c1285 start + 53

Let me know if this fixes the issue:

Thanks!–
Gabriel.

Let me know if this fixes the issue:
https://hg.libsdl.org/SDL/rev/fd220c4df418
Confirm fixed.On Mon, 24 Feb 2014 10:26:21 -0300 Gabriel Jacobo wrote: