diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2009-07-25 16:35:14 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2009-07-25 16:35:14 +0400 |
commit | 90dfb61e046625b61c3af8a7f8bfee431a356832 (patch) | |
tree | 9864058de3b98279d25f75afe56b861aafd63bc3 /source | |
parent | a13341bed1ad905c41e0f1a1991dee959b09b63a (diff) |
BGE: Fix Keyboard actuator that didn't generate release event.
Diffstat (limited to 'source')
-rw-r--r-- | source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h | 1 | ||||
-rw-r--r-- | source/gameengine/BlenderRoutines/KX_BlenderKeyboardDevice.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h b/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h index 7da4b9efb68..32391e63264 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h +++ b/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h @@ -36,6 +36,7 @@ #include <map> #include "wm_event_types.h" +#include "WM_types.h" #include "SCA_IInputDevice.h" diff --git a/source/gameengine/BlenderRoutines/KX_BlenderKeyboardDevice.cpp b/source/gameengine/BlenderRoutines/KX_BlenderKeyboardDevice.cpp index 877a0d39acf..58af94854e6 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderKeyboardDevice.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderKeyboardDevice.cpp @@ -104,7 +104,7 @@ bool KX_BlenderKeyboardDevice::ConvertBlenderEvent(unsigned short incode,short v { int previousTable = 1-m_currentTable; - if (val > 0) + if (val == KM_PRESS) { if (kxevent == KX_ESCKEY && val != 0 && !m_hookesc) result = true; @@ -138,7 +138,7 @@ bool KX_BlenderKeyboardDevice::ConvertBlenderEvent(unsigned short incode,short v } } - } else + } else if (val == KM_RELEASE) { // blender eventval == 0 switch (m_eventStatusTables[previousTable][kxevent].m_status) |