We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5412 - Scancodes are different between 1.2 and 2.0
Summary: Scancodes are different between 1.2 and 2.0
Status: NEW
Alias: None
Product: sdl12-compat
Classification: Unclassified
Component: everything (show other bugs)
Version: unspecified
Hardware: x86_64 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-23 02:10 UTC by Malte Kießling
Modified: 2020-12-23 02:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Malte Kießling 2020-12-23 02:10:12 UTC
So, the good old sdl 1.2 documentation states that scancodes are "best left alone". 

Turns out that people didn't care. There is the issue now that dosbox (to give an example) is somewhat activly using scancodes (dosbox/src/gui_sdl_mapper.cpp:421; function called GetKeyCode). The bounds-checking is also only an assert, so this is a guaranteed crash. 

I have "fixed" this by permanently setting the scancode of the key event to zero. I have no idea if that is an actual fix - who knows what else depends on the scancodes. Emulating old behaviour here is probalby preferable.