[Scummvm-cvs-logs] scummvm master -> 97e486dee3a66bd8db0ca623ba65ba0a14da899d

lordhoto lordhoto at gmail.com
Sat Feb 25 19:52:05 CET 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
97e486dee3 IPHONE: Implement very basic GFX transaction support.


Commit: 97e486dee3a66bd8db0ca623ba65ba0a14da899d
    https://github.com/scummvm/scummvm/commit/97e486dee3a66bd8db0ca623ba65ba0a14da899d
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-02-25T10:49:05-08:00

Commit Message:
IPHONE: Implement very basic GFX transaction support.

This allows for AR ratio correction changes to take place, even when the AR
setting is set after initSize for example.

Changed paths:
    backends/platform/iphone/osys_main.h
    backends/platform/iphone/osys_video.mm



diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h
index 180d3e9..84c460a 100644
--- a/backends/platform/iphone/osys_main.h
+++ b/backends/platform/iphone/osys_main.h
@@ -121,6 +121,10 @@ public:
 	virtual bool setGraphicsMode(int mode);
 	virtual int getGraphicsMode() const;
 	virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format);
+
+	virtual void beginGFXTransaction();
+	virtual TransactionError endGFXTransaction();
+
 	virtual int16 getHeight();
 	virtual int16 getWidth();
 
diff --git a/backends/platform/iphone/osys_video.mm b/backends/platform/iphone/osys_video.mm
index 31db4c7..265a36f 100644
--- a/backends/platform/iphone/osys_video.mm
+++ b/backends/platform/iphone/osys_video.mm
@@ -44,7 +44,6 @@ bool OSystem_IPHONE::setGraphicsMode(int mode) {
 	case kGraphicsModeNone:
 	case kGraphicsModeLinear:
 		_videoContext->graphicsMode = (GraphicsModes)mode;
-		[g_iPhoneViewInstance performSelectorOnMainThread:@selector(setGraphicsMode) withObject:nil waitUntilDone: YES];
 		return true;
 
 	default:
@@ -68,17 +67,21 @@ void OSystem_IPHONE::initSize(uint width, uint height, const Graphics::PixelForm
 	_gameScreenRaw = (byte *)malloc(width * height);
 	bzero(_gameScreenRaw, width * height);
 
-	updateOutputSurface();
-
-	clearOverlay();
-
 	_fullScreenIsDirty = false;
 	dirtyFullScreen();
-	_videoContext->mouseIsVisible = false;
 	_mouseCursorPaletteEnabled = false;
+}
+
+void OSystem_IPHONE::beginGFXTransaction() {
+}
+
+OSystem::TransactionError OSystem_IPHONE::endGFXTransaction() {
 	_screenChangeCount++;
+	updateOutputSurface();
+	[g_iPhoneViewInstance performSelectorOnMainThread:@selector(setGraphicsMode) withObject:nil waitUntilDone: YES];
 
-	updateScreen();
+	// TODO: Can we return better error codes?
+	return kTransactionSuccess;
 }
 
 void OSystem_IPHONE::updateOutputSurface() {






More information about the Scummvm-git-logs mailing list