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 1731 - Regression in SDL_GetKeyFromScancode
Summary: Regression in SDL_GetKeyFromScancode
Status: RESOLVED DUPLICATE of bug 1730
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.0
Hardware: x86_64 Windows 7
: P2 minor
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-26 07:34 UTC by Andreas Schiffler
Modified: 2013-02-27 02:36 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schiffler 2013-02-26 07:34:43 UTC
The latest changes to the windows keyboard mapping code seem to have introduced a regression which cause the automated test keyboard_getKeyFromScancode to fail.

The behavior of SDL_GetKeyFromScancode(0) changed to return 1073741824 rather than the expected value UNKNOWN.

Repro on cygwin:
./testautomation --filter keyboard_getKeyFromScancode

INFO:  02/26/13 15:28:37: ----- Test Case 4.4: 'keyboard_getKeyFromScancode' started
INFO:  02/26/13 15:28:37: Test Description: 'Check call to SDL_GetKeyFromScancode'
INFO:  02/26/13 15:28:37: Test Iteration 1: execKey 14134826104437399765
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_GetKeyFromScancode(valid)': Pass
INFO:  02/26/13 15:28:37: Assert 'Verify result from call, expected: 97, got: 97': Passed
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_GetKeyFromScancode(0)': Pass
ERROR: 02/26/13 15:28:37: Assert 'Verify result from call is UNKNOWN, expected: 0, got: 1073741824': Failed
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_ClearError()': Pass
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_GetKeyFromScancode(-999)': Pass
INFO:  02/26/13 15:28:37: Assert 'Verify result from call is UNKNOWN, expected: 0, got: 0': Passed
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_GetError()': Pass
INFO:  02/26/13 15:28:37: Assert 'Validate that error message was not NULL': Passed
INFO:  02/26/13 15:28:37: Assert 'Validate error message, expected: 'Parameter 'scancode' is invalid', got: 'Parameter 'scancode' is invalid'': Passed
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_ClearError()': Pass
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_GetKeyFromScancode(999)': Pass
INFO:  02/26/13 15:28:37: Assert 'Verify result from call is UNKNOWN, expected: 0, got: 0': Passed
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_GetError()': Pass
INFO:  02/26/13 15:28:37: Assert 'Validate that error message was not NULL': Passed
INFO:  02/26/13 15:28:37: Assert 'Validate error message, expected: 'Parameter 'scancode' is invalid', got: 'Parameter 'scancode' is invalid'': Passed
INFO:  02/26/13 15:28:37: Assert 'Call to SDL_ClearError()': Pass
ERROR: 02/26/13 15:28:37: Assert Summary: Total=17 Passed=16 Failed=1
INFO:  02/26/13 15:28:37: Total Test runtime: 0.0 sec
ERROR: 02/26/13 15:28:37: >>> Test 'keyboard_getKeyFromScancode': Failed
Comment 1 Gabriel Jacobo 2013-02-27 02:36:41 UTC

*** This bug has been marked as a duplicate of bug 1730 ***