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>2009-04-10 02:15:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-10 02:15:26 +0400
commitac45472a1707934573a12d629a21a81c3ed409ba (patch)
tree4f32be22a7959c8db8c99d9f642e6071fc73420c /source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp
parentb0cca7de267f84768ee1eba0955373a24b661aad (diff)
BGE Bugfix
The End key didn't work work at all for the keyboard sensor. Removed getEventList() since it was added since 2.48a release.
Diffstat (limited to 'source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp')
-rw-r--r--source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp b/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp
index 474df9276a7..472ff580392 100644
--- a/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp
+++ b/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp
@@ -42,7 +42,7 @@ void GPC_KeyboardDevice::NextFrame()
// Now convert justpressed key events into regular (active) keyevents
int previousTable = 1-m_currentTable;
- for (int keyevent= KX_BEGINKEY; keyevent< KX_ENDKEY;keyevent++)
+ for (int keyevent= KX_BEGINKEY; keyevent<= KX_ENDKEY;keyevent++)
{
SCA_InputEvent& oldevent = m_eventStatusTables[previousTable][keyevent];
if (oldevent.m_status == SCA_InputEvent::KX_JUSTACTIVATED ||
@@ -69,7 +69,7 @@ bool GPC_KeyboardDevice::ConvertEvent(int incode, int val)
KX_EnumInputs kxevent = this->ToNative(incode);
// only process it, if it's a key
- if (kxevent >= KX_BEGINKEY && kxevent < KX_ENDKEY)
+ if (kxevent >= KX_BEGINKEY && kxevent <= KX_ENDKEY)
{
int previousTable = 1-m_currentTable;
@@ -114,9 +114,7 @@ bool GPC_KeyboardDevice::ConvertEvent(int incode, int val)
}
}
}
- } else if(kxevent==KX_ENDKEY) {
- exit(1);
- }
+ }
return result;
}