Commits

ecsv committed 1966632

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.

  • Participants
  • Parent commits f17a1af

Comments (0)

Files changed (1)

File src/api/vidext_sdl2_compat.h

             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 */