Added back into the win32 build of KeyboardMouseCallback the check against VK_ESCAPE.

This commit is contained in:
Robert Osfield
2003-03-25 12:42:06 +00:00
parent 65e0ebf29d
commit f2772debf4

View File

@@ -16,10 +16,17 @@ void KeyboardMouseCallback::keyPress( Producer::KeySymbol key )
osg::ref_ptr<EventAdapter> 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();