Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid polluting preferences file with null commands (Bug #21969)
Only save non-default hot-keys to the preferences file if the hot-key is active (ie command != 'null'). Clearing hot-keys in memory (via the hot-key functions in the game) only sets the command to 'null', which currently gets written to the preferences file if it is a custom, ie non-default, hot-key. Over time, creating and clearing hot-keys results in a lot of redundant hot-key entries. The nice thing about this update is that it will remove redundant command='null' entries for existing preferences files as well as prevent it from being included in future ones.. I am making this change against the sdl2 branch instead of master because the sdl2 branch already contains a lot of rewriting of the hot-key functionality. Testing against master was also hopeless because hot-key handling is still rather broken building against SDL 1.2.
- Loading branch information