Re: [hatari-devel] OS X SDL2 fixes

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


Yes, Hatari will immediately crash with SDL2 if you try to run Hatari from Xcode. However, Hatari does not crash if you run it outside of Xcode as long as you do not attempt to use the OS X system shortcut of Cmd-F for fullscreen. Then, Hatari will crash. I wanted to mention this for anyone who was wondering why it crashed immediately for Miguel but ran for me. To prevent OS X from using its fullscreen code, I removed Cmd-F as a keyboard shortcut from the NIB file. That way, Hatari’s code is run for the fullscreen mode and that works fine with Hatari. I am still trying to find where the OS X code sets its shortcut keys since they are different than the default Hatari shortcuts.

Miguel - Off list, could you send me the proper syntax for a call to NSAlert? Since I cannot get Hatari to run from within Xcode, I thought I would try the old fashioned debugging method and insert alerts to try to determine when the Create Blank Floppy window appears.


Bob C


On Aug 23, 2014, at 6:53 AM, Miguel Saro <miguel.saro@xxxxxxx> wrote:

Eero,

Also I’m not a programmer! I dowloaded SDL2 sources and I compared with SDL1 sources.
Compiled with SDL2, Hatari crashs immediately at launch. None in my breakpoints are encountered.
See this piece of code from  SDL_main.h in SDL2:

<removed>


As you can see macro SDL_MAIN_NEEDED is defined for IOS and not defined for OSx.
In SDL_main.h of  SDL1 this macro is defined for IOS and OSx
This implies that  compiled with SDL1  main  function is called,  but compiled with SDL2  main function is not called.
I change line #elif defined(__IPHONEOS__)  by line  #elif defined(__IPHONEOS__) || defined(__MACOSX__)
I compile SDL2 then compile Hatari. Now Hatari launchs then breakpoint in applicationDidFinishLaunching: function stop the launch process.

Following the launch process, I find that  Hatari crashs during initialization of SDL. But I don’t know enough Hatari and SDL to continue!

Miguel






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