Fixed bug 1916 - SDL_Keysym contains a deprecated field for unicode which may be removed.

Philipp Wiesemann

SDL_Keysym contains a deprecated field for unicode which may be removed for SDL 2.0 release.

As far as I can tell the field is not set on all "major" platforms and therefore will not be useful for most users. Its existence in a public header therefore becomes (in my opinion) only confusing.
This commit is contained in:
Sam Lantinga 2013-06-18 00:39:47 -07:00
parent 46487bd122
commit 9293678409
4 changed files with 21 additions and 36 deletions

View file

@ -107,24 +107,6 @@ PrintKey(SDL_Keysym * sym, SDL_bool pressed, SDL_bool repeat)
SDL_GetScancodeName(sym->scancode),
pressed ? "pressed " : "released");
}
/* Print the translated character, if one exists */
if (sym->unicode) {
/* Is it a control-character? */
if (sym->unicode < ' ') {
print_string(&spot, &left, " (^%c)", sym->unicode + '@');
} else {
#ifdef UNICODE
print_string(&spot, &left, " (%c)", sym->unicode);
#else
/* This is a Latin-1 program, so only show 8-bits */
if (!(sym->unicode & 0xFF00))
print_string(&spot, &left, " (%c)", sym->unicode);
else
print_string(&spot, &left, " (0x%X)", sym->unicode);
#endif
}
}
print_modifiers(&spot, &left);
if (repeat) {
print_string(&spot, &left, " (repeat)");