Re: [hatari-devel] OS X SDL2 testing

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 29/11/2015 06:28, Bob Carpenter a écrit :
> I have noticed that the OS X preferences window will not work if I have a joystick/gamepad plugged in. The SDL menu still works and shows the gamepad or joystick. However, if I leave the joystick unplugged and start Hatari, then the OS X preferences window appears. I tried my CX-40 with the 2600-daptor II and my USB Nyko gamepad that I use for my normal Mac gaming. I see the same results with both the Atari joystick and the Nyko gamepad.
> 
> Since I know there have been problems with the OS X port of SDL2, I am wondering if this is another SDL problem. 

Yes, it's related to SDL2. SDL2 changed the way Joystick support and
detection are now handled, so that all the code used to populate the
Preference panel do not work anymore, it heaven cause a crash.

You have a warning at build for this:
/Users/jeromevernet/Documents/dev/Hatari-hgrc3/hatari/src/gui-osx/PrefsController.m:589:51:
warning: incompatible integer to pointer
      conversion passing 'int' to parameter of type 'SDL_Joystick *'
(aka 'struct _SDL_Joystick *') [-Wint-conversion]
                                const char* szJoystickName =
SDL_JoystickName(i);

      ^
/Users/jeromevernet/Library/Frameworks/SDL2.framework/Headers/SDL_joystick.h:118:69:
note: passing argument to parameter 'joystick'
      here
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick *
joystick);

I need to study that part, looking at Hatari related code.


JV



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/