Ignore:
Timestamp:
07/25/13 14:37:24 (12 years ago)
Author:
epyon
Message:
  • sdl - missing 2.0 sdl_functions
  • lua - compat implementation of lua_upvalueindex
  • position - rectangle single argument constructor made explicit
  • gl_window - fix for SDL 2.0 ascii code of key press
  • lua/glm - coord as a separate class (behaves like ivec2)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gl/gl_window.cc

    r171 r172  
    2828        {
    2929                kevent.key.ascii = static_cast<char8>( ucode );
     30#if NV_SDL_VERSION == NV_SDL_20
     31                if (ucode >= 'a' && ucode <= 'z')
     32                {
     33                        int shifted = !!(ke.keysym.mod & KMOD_SHIFT);
     34                        int capslock = !!(ke.keysym.mod & KMOD_CAPS);
     35                        if ((shifted ^ capslock) != 0) {
     36                                kevent.key.ascii = SDL_toupper(ucode);
     37                        }
     38                }
     39#endif
    3040        }
    3141
Note: See TracChangeset for help on using the changeset viewer.