Closed Rukachan closed 7 years ago
I've had a look through it again, and this will NOT work as-is. SDL_GetKeyFromScancode returns different values for control codes - these are the ones which use SDL_SCANCODE_TO_KEYCODE() which adds (1<<30) to the scancode number. You still need some of the switch block in place.
I think we should just drop the backwards compatibility hack next time there's another breaking change. Plus, now that we have the dev branch, individual release can be a bit more substantial.
@rakiru - Isn't that what the dev branch is for right now? Between adding LuaJIT and Unicode support, we might as well break everything.
@asiekierka The dev branch is mostly so we don't have to bump the version number every time, and it will have to be merged into master at some point anyway.
Likewise, we'll break backwards compatibility with something at some point, so might as well use it as an opportunity to clean up as much cruft as possible.
I think this fix is ultimately pointless, as SDL3 or some other thing might come along and break the scancodes again in the future. We still have to remap them to our own list.
Alright, most important question, have you actually tested this? It's mostly for backwards compat with SDL 1.2, and the actual game code depends on this.