TheAssemblyArmada / Vanilla-Conquer

Vanilla Conquer provides clean, cross-platform builds of the C&C Remastered Collection and the standalone legacy games.
Other
346 stars 52 forks source link

Fix keyboard handling for SDL1 #974

Open th-otto opened 6 months ago

th-otto commented 6 months ago

A lot of scancodes in SDL1 are > 256. The current code assumed in a lot of places that they are less than 256, causing eg. ctrl-key combination not to work.

Also the the sdl_keymap array for translating keysyms to ascii was only suitable for SDL2.

th-otto commented 6 months ago

Unfortunately this PR will conflict with https://github.com/TheAssemblyArmada/Vanilla-Conquer/pull/957

Please let me know of you want to merge that PR first, then i will refactor the code

OmniBlade commented 3 months ago

I merged the other PR first, feel free to update this PR.

arczi84 commented 3 weeks ago

I have used your fix in my branch merged with main one but can't scroll map with keyboard arrows. Can you test that on your end?

EDIT: Changing key numbers in .ini file fixed that.