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:
authorBenoit Bolsee <benoit.bolsee@online.be>2009-07-25 16:35:14 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2009-07-25 16:35:14 +0400
commit90dfb61e046625b61c3af8a7f8bfee431a356832 (patch)
tree9864058de3b98279d25f75afe56b861aafd63bc3 /source/gameengine
parenta13341bed1ad905c41e0f1a1991dee959b09b63a (diff)
BGE: Fix Keyboard actuator that didn't generate release event.
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h1
-rw-r--r--source/gameengine/BlenderRoutines/KX_BlenderKeyboardDevice.cpp4
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)