Re: [hatari-devel] SDL2 support

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


Thomas,

Unfortunately, I can’t compile an OS X bundle with SDL 2 support enabled. First, I received an error in doFullScreen in SDLMain.m. It said that which is not an element of the SDL_KeyboardEvent structure. I tried to replace the entire logic with a call to Screen_EnterFullScreen since the comment stated that the logic was written this way to avoid a bug in SDL 1.2.11. Unfortunately, once I did that, I found a number of errors in PrefsController.m. The first error states that SDLKey is an unknown type. After that, it does not like the definition of a number of the elements in the Preferences_KeysForJoysticks structure. The errors start with SDLK_KP0 that it suggests should be SDLK_KP_0 and continues on into SDLK_RMETA, SDLK_LSUPER, among others.

Unfortunately, it is beyond my current capabilities to fix this. Hopefully, Miguel or you will be able to fix the problems.

I was finally able to compile Hatari with no OS X support by commenting out the if(APPLE) block in CMakeLists.txt. As you mentioned, the desktop resolution code is disabled so going to full screen just shows you the same size screen. You also mentioned that keyboard mapping is not currently functional with SDL 2. Except for the problems you have already mentioned, I have not found anything new. As soon as I can run a full OS X version, I may have other bug reports. It might be my imagination, but the SDL 2 version does feel faster on my iMac.


Bob C


On Aug 3, 2014, at 3:43 AM, Thomas Huth <th.huth@xxxxxx> wrote:

> 
> Hi all,
> 
> I've now committed all my patches for compiling with SDL2. You can now
> build Hatari with SDL2 support by using the "--enable-sdl2" option of
> the configure script or by setting the ENABLE_SDL2 option when running
> cmake.
> 
> Please note that this is currently the bare minimum to get Hatari
> working with SDL2. Some things are still limited or disabled:
> 
> - Keyboard handling has changed quite a bit in SDL2. The code in
>  keymap.c is currently rather a quick than a real solution, e.g.
>  loading a keyboard mapping file currently does not work anymore.
> 
> - The desktop resolution code in resolution.c is mostly disabled.
>  Should not be a big issue though since SDL2 features a nice zoom
>  to desktop size in the library itself.
> 
> - SDL_UpdateRects was gone in SDL2. I've added a simple wrapper in
>  screen.c which now always refreshes the whole screen instead.
>  I.e. partial screen updates are now gone (and we should continue
>  to make sure that SDL_UpdateRects is only called once per frame)
> 
> - Support of 8 bits per pixel surfaces is also somewhat hacky now...
>  But I wonder whether we still should support these today, or whether
>  we could start to get rid of this color depths nowadays (but we need
>  to rewrite the VDI resolution convert functions for this)
> 
> ... and there are likely a bunch of more shortcomings, I haven't tested
> everything yet, so if you're interested, please have a try and write
> your bug reports to the list!
> 
> Thomas
> 
> 




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