aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/iphone/osys_video.mm
diff options
context:
space:
mode:
authorJohannes Schickel2012-02-25 19:49:05 +0100
committerJohannes Schickel2012-02-25 19:49:05 +0100
commit97e486dee3a66bd8db0ca623ba65ba0a14da899d (patch)
tree3de8e38df0270ea45c7328baf732eaca32826383 /backends/platform/iphone/osys_video.mm
parent273df3c075ef321ae304f2ab2d26e35111480797 (diff)
downloadscummvm-rg350-97e486dee3a66bd8db0ca623ba65ba0a14da899d.tar.gz
scummvm-rg350-97e486dee3a66bd8db0ca623ba65ba0a14da899d.tar.bz2
scummvm-rg350-97e486dee3a66bd8db0ca623ba65ba0a14da899d.zip
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.
Diffstat (limited to 'backends/platform/iphone/osys_video.mm')
-rw-r--r--backends/platform/iphone/osys_video.mm17
1 files changed, 10 insertions, 7 deletions
diff --git a/backends/platform/iphone/osys_video.mm b/backends/platform/iphone/osys_video.mm
index 31db4c70e7..265a36f946 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() {