コード例 #1
0
ファイル: form.cpp プロジェクト: chrisws/scummvm
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();
	}
}
コード例 #2
0
ファイル: form.cpp プロジェクト: Bundesdrucker/scummvm
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();
	}
}
コード例 #3
0
ファイル: system.cpp プロジェクト: rkmarvin/scummvm
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);
        }
    }
}
コード例 #4
0
ファイル: system.cpp プロジェクト: AdamRi/scummvm-pink
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();
	}
}
コード例 #5
0
ファイル: form.cpp プロジェクト: chrisws/scummvm
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;
}