mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-02 08:55:45 +00:00
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.
This commit is contained in:
parent
273df3c075
commit
97e486dee3
@ -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();
|
||||
|
||||
|
@ -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;
|
||||
_screenChangeCount++;
|
||||
}
|
||||
|
||||
updateScreen();
|
||||
void OSystem_IPHONE::beginGFXTransaction() {
|
||||
}
|
||||
|
||||
OSystem::TransactionError OSystem_IPHONE::endGFXTransaction() {
|
||||
_screenChangeCount++;
|
||||
updateOutputSurface();
|
||||
[g_iPhoneViewInstance performSelectorOnMainThread:@selector(setGraphicsMode) withObject:nil waitUntilDone: YES];
|
||||
|
||||
// TODO: Can we return better error codes?
|
||||
return kTransactionSuccess;
|
||||
}
|
||||
|
||||
void OSystem_IPHONE::updateOutputSurface() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user