Workaround of issue 167: Unicode only enabled while entering text, so at all other moments there's no SDL crash when pressing ^ key (French or German keyboard) on Windows 98
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@812 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
@@ -543,6 +543,9 @@ word Keysym_to_ANSI(SDL_keysym keysym)
|
||||
#if !(defined(__macosx__) || defined(__FreeBSD__))
|
||||
if ( keysym.unicode == 0)
|
||||
{
|
||||
// Converty lowercase to uppercase if SHIFT is on.
|
||||
if (keysym.sym >= 'a' && keysym.sym <= 'z' && (SDL_GetModState() & (KMOD_SHIFT|KMOD_CAPS)))
|
||||
return ('A' - 'a') + keysym.sym;
|
||||
return keysym.sym;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user