This maps most keyboard keys for the default configuration. This is necessary as remapping the keys currently fails, and not enough keys were mapped in OpenSWE1R to play the game.
Code wise, a better solution would be to create a mapping function/table from SDL to DirectInput and vice versa. However, this will have to do for now.
In the future, the DirectInput emulation will be rewritten anyway to support all keys and also remapping the keys using the menu. So this is just a temporary solution. Therefore code quality does not matter here.
Not every key has been tested properly as some are used during multiplayer only.
The F12 key should not be used as the screenshot functionality will currently crash OpenSWE1R. An issue should be created for this after merge.
This maps most keyboard keys for the default configuration. This is necessary as remapping the keys currently fails, and not enough keys were mapped in OpenSWE1R to play the game.
Code wise, a better solution would be to create a mapping function/table from SDL to DirectInput and vice versa. However, this will have to do for now. In the future, the DirectInput emulation will be rewritten anyway to support all keys and also remapping the keys using the menu. So this is just a temporary solution. Therefore code quality does not matter here.
Not every key has been tested properly as some are used during multiplayer only. The F12 key should not be used as the screenshot functionality will currently crash OpenSWE1R. An issue should be created for this after merge.