Re: [hatari-devel] Win + SDL2 = no debugger

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


> Keycode encoding changed between SDL1 and SDL2, so if you're using the
> encoding from SDL1, it's normal that it does not work anymore...

I had similar problems when adding support for SDL2 to Aranym. Except for a few names, they are identical for the source, but the actual values are very different. So if you had written the internal codes to the config file before, that does not work anymore. The solution was to not write keycodes to the config file, but symbolic names. Since SDL_GetKeyName() also reports different names between the versions, i made a custom table for this. The existing code now expects either keycodes or names in the config file. If keycodes ares found they are assumed to be the old SDL1 keycodes, and translated. When a new config file is written, the symbolic names are used. That allows seemless upgrading from a config file that was written by an older version.
The tables and conversion routines are in src/parameter.cpp in the AraNYM repo, if you want to take a look.

Greetings,
    Thorsten




Thomas Huth <th.huth@xxxxxx> schrieb am 13:54 Samstag, 21.November 2015:


Am Sat, 21 Nov 2015 09:16:40 +0000
schrieb Douglas Little <doug694@xxxxxxxxxxxxxx>:

> Hi,
>
> It seems with the SDL2 Windows build of Hatari, it's not possible to
> invoke the debugger with a keypress. It ignores the configured key
> (F10). Other hotkeys work (e.g. for options, reset etc. etc.).

Keycode encoding changed between SDL1 and SDL2, so if you're using the
encoding from SDL1, it's normal that it does not work anymore...
This is something that has to be solved in a better way before we fully
switch to SDL2.
For the time being, you can use this table here for SDL2 keycodes:
https://wiki.libsdl.org/SDLKeycodeLookup

Thomas






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