Revision: 39203
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39203
Author:   campbellbarton
Date:     2011-08-09 07:09:49 +0000 (Tue, 09 Aug 2011)
Log Message:
-----------
off by 1 error with number keys in ghost/sdl

Modified Paths:
--------------
    trunk/blender/intern/ghost/intern/GHOST_SystemSDL.cpp

Modified: trunk/blender/intern/ghost/intern/GHOST_SystemSDL.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemSDL.cpp       2011-08-09 
04:11:07 UTC (rev 39202)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemSDL.cpp       2011-08-09 
07:09:49 UTC (rev 39203)
@@ -146,7 +146,7 @@
        if ((key >= SDL_SCANCODE_A) && (key <= SDL_SCANCODE_Z)) {
                type= GHOST_TKey( key - SDL_SCANCODE_A + int(GHOST_kKeyA));
        } else if ((key >= SDL_SCANCODE_1) && (key <= SDL_SCANCODE_0)) {
-               type= GHOST_TKey(key - SDL_SCANCODE_1 + int(GHOST_kKey0));
+               type= (key == SDL_SCANCODE_0) ? GHOST_kKey0 : GHOST_TKey(key - 
SDL_SCANCODE_1 + int(GHOST_kKey1));
        } else if ((key >= SDL_SCANCODE_F1) && (key <= SDL_SCANCODE_F12)) {
                type= GHOST_TKey(key - SDL_SCANCODE_F1 + int(GHOST_kKeyF1));
        } else if ((key >= SDL_SCANCODE_F13) && (key <= SDL_SCANCODE_F24)) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to