Revision: 14403
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14403
Author: ben2610
Date: 2008-04-12 23:18:58 +0200 (Sat, 12 Apr 2008)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.h
trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
Modified: trunk/blender/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.h
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.h
2008-04-12 20:36:35 UTC (rev 14402)
+++ trunk/blender/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.h
2008-04-12 21:18:58 UTC (rev 14403)
@@ -58,9 +58,9 @@
* System dependent keyboard codes are stored as ints.
*/
std::map<int, KX_EnumInputs> m_reverseKeyTranslateTable;
- bool m_hookesc;
public:
+ bool m_hookesc;
GPC_KeyboardDevice()
: m_hookesc(false)
{
Modified: trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
2008-04-12 20:36:35 UTC (rev 14402)
+++ trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
2008-04-12 21:18:58 UTC (rev 14403)
@@ -845,11 +845,12 @@
{
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;
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs