diff options
author | Johannes Schickel | 2012-02-26 01:25:18 +0100 |
---|---|---|
committer | Johannes Schickel | 2012-02-26 01:25:18 +0100 |
commit | 3b1e4b5bdcdd67db03c6d225c0a7985d8ce35d3b (patch) | |
tree | 3830acb23f6b9ec2148b17dd24c8f5f144da22c6 /backends/platform/iphone/osys_main.cpp | |
parent | 83ce8da9359d0f015165d8e75c37776a7a49474e (diff) | |
download | scummvm-rg350-3b1e4b5bdcdd67db03c6d225c0a7985d8ce35d3b.tar.gz scummvm-rg350-3b1e4b5bdcdd67db03c6d225c0a7985d8ce35d3b.tar.bz2 scummvm-rg350-3b1e4b5bdcdd67db03c6d225c0a7985d8ce35d3b.zip |
IPHONE: Let hi-color games directly draw onto the screen texture buffer.
This avoids an unecessary copying step from the framebuffer to the texture
buffer.
Diffstat (limited to 'backends/platform/iphone/osys_main.cpp')
-rw-r--r-- | backends/platform/iphone/osys_main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/backends/platform/iphone/osys_main.cpp b/backends/platform/iphone/osys_main.cpp index 0f63a13db7..f3e0d97b97 100644 --- a/backends/platform/iphone/osys_main.cpp +++ b/backends/platform/iphone/osys_main.cpp @@ -71,7 +71,11 @@ OSystem_IPHONE::~OSystem_IPHONE() { AudioQueueDispose(s_AudioQueue.queue, true); delete _mixer; - _framebuffer.free(); + // Prevent accidental freeing of the screen texture here. This needs to be + // checked since we might use the screen texture as framebuffer in the case + // of hi-color games for example. + if (_framebuffer.pixels == _videoContext->screenTexture.pixels) + _framebuffer.free(); _mouseBuffer.free(); } |