Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove SDL unicode keycode compat code
SDL 2.0 cannot store unicode anymore. Pre-2.0 versions provided this
field but it was removed right before the 2.0 release. Still using it
makes the compile fail.
  • Loading branch information
ecsv committed Aug 17, 2013
1 parent 8ab20c2 commit a6d1e14
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/api/vidext_sdl2_compat.h
Expand Up @@ -529,25 +529,6 @@ SDL_CompatEventFilter(void *userdata, SDL_Event * event)
SDL_PushEvent(&fake);
break;
}
case SDL_KEYDOWN:
case SDL_KEYUP:
{
Uint32 unicode = 0;
if (event->key.type == SDL_KEYDOWN && event->key.keysym.sym < 256) {
unicode = event->key.keysym.sym;
if (unicode >= 'a' && unicode <= 'z') {
int shifted = !!(event->key.keysym.mod & KMOD_SHIFT);
int capslock = !!(event->key.keysym.mod & KMOD_CAPS);
if ((shifted ^ capslock) != 0) {
unicode = SDL_toupper(unicode);
}
}
}
if (unicode) {
event->key.keysym.unicode = unicode;
}
break;
}
case SDL_TEXTINPUT:
{
/* FIXME: Generate an old style key repeat event if needed */
Expand Down

0 comments on commit a6d1e14

Please sign in to comment.