Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-08-09 11:09:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-09 11:09:49 +0400
commitffd5fa3eea5a724df0ebb14da2aa6f54768277d3 (patch)
treefa0e134e7472dc429b0d256b4bf8d0729736551e
parent85b77c931d2de579671dbe68640341407f91ecb2 (diff)
off by 1 error with number keys in ghost/sdl
-rw-r--r--intern/ghost/intern/GHOST_SystemSDL.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_SystemSDL.cpp b/intern/ghost/intern/GHOST_SystemSDL.cpp
index cd7efba592b..aebb94d5cdf 100644
--- a/intern/ghost/intern/GHOST_SystemSDL.cpp
+++ b/intern/ghost/intern/GHOST_SystemSDL.cpp
@@ -146,7 +146,7 @@ convertSDLKey(SDL_Scancode key)
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)) {