SDLK_g went from being an uppercase ‘G’ to a lowercase ‘g’.
Look again. ASCII 103 is a lowercase G.
The comment is just to indicate that the value represents the ‘G’ key.
(You’ll note that the glyph painted on the keycap is usually an
uppercase letter.)
The actual value of SDLK_g is unimportant. If you want to know the
actual character generated, use the unicode field.
That’s because 0x000D is carriage return (literally, the return character), this causes terminals to return to the beginning of the line and continue printing from there, overwriting the beginning of
whatever is already on that line, hence your (unicode) text appearing at the beginning of the line.
It is generally best not to print control characters directly when debugging :)On 05/27/2011 12:22 PM, greno wrote:
Also, whatever the Unicode string is for Return it is causing weirdness with printf.
–
LordHavoc
Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier