void BadaAppForm::pushEvent(Common::EventType type, const Point& currentPosition) { BadaSystem* system = (BadaSystem*) g_system; BadaGraphicsManager* graphics = system->getGraphics(); if (graphics) { Common::Event e; e.type = type; e.mouse.x = currentPosition.x; e.mouse.y = currentPosition.y; bool moved = graphics->moveMouse(e.mouse.x, e.mouse.y); _eventQueueLock->Acquire(); if (moved && type != Common::EVENT_MOUSEMOVE) { Common::Event moveEvent; moveEvent.type = Common::EVENT_MOUSEMOVE; moveEvent.mouse = e.mouse; _eventQueue.push(moveEvent); } _eventQueue.push(e); _eventQueueLock->Release(); } }
void BadaAppForm::pushEvent(Common::EventType type, const Point ¤tPosition) { BadaSystem *system = (BadaSystem *)g_system; BadaGraphicsManager *graphics = system->getGraphics(); if (graphics) { // graphics could be NULL at startup or when // displaying the system error screen Common::Event e; e.type = type; e.mouse.x = currentPosition.x; e.mouse.y = currentPosition.y > MIN_TOUCH_Y ? currentPosition.y : 1; bool moved = graphics->moveMouse(e.mouse.x, e.mouse.y); _eventQueueLock->Acquire(); if (moved && type != Common::EVENT_MOUSEMOVE) { Common::Event moveEvent; moveEvent.type = Common::EVENT_MOUSEMOVE; moveEvent.mouse = e.mouse; _eventQueue.push(moveEvent); } _eventQueue.push(e); _eventQueueLock->Release(); } }