Changeset 172 for trunk/src


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)
Location:
trunk/src
Files:
3 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
  • trunk/src/lib/lua.cc

    r166 r172  
    4545#       include <nv/lib/detail/lua_functions_compat.inc>
    4646#       undef NV_LUA_COMPAT_FUN
     47int LUA_UPVALUEINDEX  = 0;
    4748int LUA_REGISTRYINDEX = 0;
    4849int LUA_VERSION_NUM   = 0;
     
    266267                NV_LUA_LOAD( luaL_getsubtable );
    267268
     269                LUA_UPVALUEINDEX  = LUA_REGISTRYINDEX_52;
    268270                LUA_REGISTRYINDEX = LUA_REGISTRYINDEX_52;
    269271                LUA_VERSION_NUM   = 502;
     
    292294                NV_LUA_LOAD( lua_equal );
    293295                lua_compare       = lua_compare_51;
     296                LUA_UPVALUEINDEX  = LUA_GLOBALSINDEX_51;
    294297                LUA_REGISTRYINDEX = LUA_REGISTRYINDEX_51;
    295298                LUA_VERSION_NUM   = 501;
  • trunk/src/lua/lua_glm.cc

    r121 r172  
    340340        int stack = lua_gettop( L );
    341341
     342        luaL_requiref(L, "coord", luaopen_vec<nv::ivec2>, 1);
    342343        luaL_requiref(L, "ivec2", luaopen_vec<nv::ivec2>, 1);
    343344        luaL_requiref(L, "ivec3", luaopen_vec<nv::ivec3>, 1);
Note: See TracChangeset for help on using the changeset viewer.