Example #1
0
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();
	}
}
Example #2
0
void BadaAppForm::pushEvent(Common::EventType type, const Point &currentPosition) {
	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();
	}
}
Example #3
0
void BadaSystem::setMute(bool on) {
    // only change mute after eventManager init() has completed
    if (_audioThread) {
        BadaGraphicsManager *graphics = getGraphics();
        if (graphics && graphics->isReady()) {
            _audioThread->setMute(on);
        }
    }
}
Example #4
0
void BadaEventManager::init() {
	DefaultEventManager::init();

	// theme and vkbd should have now loaded - clear the splash screen
	BadaSystem *system = (BadaSystem *)g_system;
	BadaGraphicsManager *graphics = system->getGraphics();
	if (graphics) {
		graphics->setReady();
		graphics->updateScreen();
	}
}
Example #5
0
result BadaAppForm::OnDraw(void) {
	logEntered();

	if (g_system) {
		BadaSystem* system = (BadaSystem*) g_system;
		BadaGraphicsManager* graphics = system->getGraphics();
		if (graphics && graphics->isReady()) {
			g_system->updateScreen();
		}
	}

	return E_SUCCESS;
}