From f2772debf4e61a32bc6061ae5a11f53f0fca14c8 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 25 Mar 2003 12:42:06 +0000 Subject: [PATCH] Added back into the win32 build of KeyboardMouseCallback the check against VK_ESCAPE. --- src/osgProducer/KeyboardMouseCallback.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/osgProducer/KeyboardMouseCallback.cpp b/src/osgProducer/KeyboardMouseCallback.cpp index 4998380ce..8ada3102a 100644 --- a/src/osgProducer/KeyboardMouseCallback.cpp +++ b/src/osgProducer/KeyboardMouseCallback.cpp @@ -16,10 +16,17 @@ void KeyboardMouseCallback::keyPress( Producer::KeySymbol key ) osg::ref_ptr event = new EventAdapter; event->adaptKeyPress(getTime(),key); + +#ifdef WIN32 + if (_escapeKeySetsDone && + event->getKey()==VK_ESCAPE) _done = true; +#endif + // check against adapted key symbol. if (_escapeKeySetsDone && event->getKey()==osgGA::GUIEventAdapter::KEY_Escape) _done = true; + _eventQueueMutex.lock(); _eventQueue.push_back(event); _eventQueueMutex.unlock();