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>2008-04-13 01:18:58 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2008-04-13 01:18:58 +0400
commitdfd7387641c28f2a80f7647f26c981911d4a8cfe (patch)
tree9dee61c58544d6cd6944b9a5d2070e089a2efc5a /source/gameengine/GamePlayer/ghost
parent6b94db570f07429c04a77e321186785aa4b82800 (diff)
fix BGE bug #8880: blenderplayer closing when esc is pressed
ESC now quits the game by default in all modes unless a keyboard sensor is set on ESC. In this case, the game designer must arrange for an alternative way to quit the game.
Diffstat (limited to 'source/gameengine/GamePlayer/ghost')
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index 5ef20514390..dcc70db9eed 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -845,11 +845,12 @@ bool GPG_Application::handleKey(GHOST_IEvent* event, bool isDown)
{
GHOST_TEventDataPtr eventData = ((GHOST_IEvent*)event)->getData();
GHOST_TEventKeyData* keyData = static_cast<GHOST_TEventKeyData*>(eventData);
- if (fSystem->getFullScreen()) {
- if (keyData->key == GHOST_kKeyEsc) {
+ //no need for this test
+ //if (fSystem->getFullScreen()) {
+ if (keyData->key == GHOST_kKeyEsc && !m_keyboard->m_hookesc) {
m_exitRequested = KX_EXIT_REQUEST_OUTSIDE;
}
- }
+ //}
m_keyboard->ConvertEvent(keyData->key, isDown);
handled = true;
}