-
Notifications
You must be signed in to change notification settings - Fork 556
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: fix joypad and keyboard config retrieval
because the GTK frontends use GDK keysyms, not SDL ones, - the former are being stored in the config file and used by the GTK ui) - a temporary workaround was put into place 14 years ago: the loaded config values were simply being overwritten with the hardcoded defaults. this commit removes the overriding of the config, and introduces a cli frontend specific section "SDLKEYS", which is written by the GTK2 frontend upon a configuration change. it tries to convert the GDK keycodes into SDL2 ones while doing so. an alternative solution (involving less code changes) would have been to do the conversion in the cli frontend, but that would require having the gdk header available for compilation, which may not be the case if the user only wants the cli frontend. such a user could now create the config file on another machine with the GTK frontend, or simply manually take the desired values from the SDL_keycode.h header. this change is instigated by one of the changes in PR #822, which simply removed the workaround and kept parsing on error, which mitigated the problem for some keys, but not all.
- Loading branch information
Showing
5 changed files
with
312 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.