Re: [hatari-devel] Re: Hatari SDL2

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


Le 17/08/2014 23:12, Bob Carpenter a écrit :
Thomas,

I finally had time to try this again. If you comment out the main function in SDLMain.m, Hatari will compile. However, you are exactly correct that the OS X menu does not work correctly. The Preferences menu item is disabled so you cannot access the Hatari preferences using the OS X interface. Also, command-M is handled by the system as minimizing the window instead of grabbing the mouse. Lastly, the Emulator menu does not appear at all. SDL is not intercepting the system keystrokes like it does under SDL 1.2.

If you go into full-screen mode, Hatari’s menu bar will be gone when you exit full-screen mode.

 From the current development code, here is what I have done (in case anyone is interested):

1. In SDLMain.m, I commented out code to workaround bug in SDL 1.2.11. I simply changed the doFullScreen function to call Screen_EnterFullScreen(). It appears the SDL developers fixed the problem in 1.2.15 (if not earlier). I tried my change using 1.2.15 and I had no problems changing between full-screen mode and windowed mode. I gave up trying after 10 times of switching Hatari between full-screen and windowed mode.

2. In PrefsController.m, I commented out SDLK_LSUPER, SDLK_RSUPER, SDLK_COMPOSE, SDLK_BREAK, and SDLK_EURO in Preferences_KeysForJoysticks[]. I did not see where they were used.

3. In SDLMain.m, I changed the SDL_main call in applicationDidFinishLaunching to status = SDL_Init (SDL_INIT_EVERYTHING); I tried just using SDL_INIT_VIDEO, but it did not make a difference.

I know we cannot leave the main() call in SDLMain.m commented out because that is the code that determines if Hatari was launched from the Finder or not. Based on my testing, I assume I am not correctly initializing SDL since the system keystrokes are still being handled by OS X. I also assume the OS X application is not initialized correctly since the menu bar should not disappear simply because Hatari returns from full-screen mode.




Hello

I don't know if it can be of any use, but maybe you could have a look at FS-UAE ; it also uses SDL2 and compiles under linux, windows and OSX.

Nicolas



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