[Scummvm-devel] SDL v2.0 Released...

Johannes Schickel lordhoto at gmail.com
Sun Oct 20 19:28:22 CEST 2013


On 08/14/2013 09:07 AM, D G Turner wrote:
>    A migration guide from v1.2 API to v2.0 can be found here:
>    http://wiki.libsdl.org/moin.fcg/MigrationGuide
>
>    It would be good if we could look at adding the ability to
>    all the SDL based backends to link against either SDL v1.2
>    or v2.0 for future development.
>
>    For clarity, I am not suggesting that we switch to v2.0 by default,
>    but as with the OpenGL backend, we add the required code to link
>    against v2.0 instead and a configure option to do this...
>
>    I am also sending this to kick off the discussion on how we deal with
>    the missing APIs ie. CDROM handling and to see if anyone has an
>    question we should pose to the libSDL team, which are not in the
>    migration guide...

The real issue with SDL2 is the keyboard input handling. We require that 
with each (character/printable) keypress there's an ascii value. This is 
used both in our GUI and in (some of) the engines itself. In SDL 1.2 we 
used the unicode field of SDL_keysysm to read the symbol entered by a 
certain keypress. SDL2 now removes this field because this way of 
handling character input does not work for languages like Asian ones. 
Instead they introduce some text input which gives you the actual 
characters input directly.

It's sadly also not possible for us to generate the old values on our 
own (based on the keypress events) because we need to know the keyboard 
layout to connect keypresses to characters.

The question is whether we can find a clever way to use SDL2s input 
handling and still emit what we need. Especially since I think hoping 
that we can rewrite all engine event handling to work with a system 
similar to SDL2's is a bit crazy...

// Johannes





More information about the Scummvm-devel mailing list