示例#1
0
void  OSystem_IPHONE::handleEvent_orientationChanged(int orientation) {
	//printf("Orientation: %i\n", orientation);

	ScreenOrientation newOrientation;
	switch (orientation) {
	case 1:
		newOrientation = kScreenOrientationPortrait;
		break;
	case 3:
		newOrientation = kScreenOrientationLandscape;
		break;
	case 4:
		newOrientation = kScreenOrientationFlippedLandscape;
		break;
	default:
		return;
	}


	if (_screenOrientation != newOrientation) {
		_screenOrientation = newOrientation;
		updateOutputSurface();

		dirtyFullScreen();
		if (_videoContext->overlayVisible)
			dirtyFullOverlayScreen();
		updateScreen();
	}
}
示例#2
0
void OSystem_IPHONE::clearOverlay() {
	//printf("clearOverlay()\n");
	bzero(_overlayBuffer, _overlayWidth * _overlayHeight * sizeof(OverlayColor));
	dirtyFullOverlayScreen();
}
示例#3
0
void OSystem_IPHONE::showOverlay() {
	//printf("showOverlay()\n");
	_overlayVisible = true;
	dirtyFullOverlayScreen();
	iPhone_enableOverlay(true);
}