diff options
author | Bastien Bouclet | 2019-11-03 19:14:15 +0100 |
---|---|---|
committer | Bastien Bouclet | 2019-11-03 19:14:15 +0100 |
commit | 036d61cbd62dc7907f4eeb36764bef9f794588f4 (patch) | |
tree | 37379e8b4a8e1c3a52029e8e606ba2b925da4df6 /backends/platform/3ds/osystem-graphics.cpp | |
parent | 2d11974c28b50c5c0a65be71caa4c93be24ab468 (diff) | |
download | scummvm-rg350-036d61cbd62dc7907f4eeb36764bef9f794588f4.tar.gz scummvm-rg350-036d61cbd62dc7907f4eeb36764bef9f794588f4.tar.bz2 scummvm-rg350-036d61cbd62dc7907f4eeb36764bef9f794588f4.zip |
3DS: Implement cloud sync support
Diffstat (limited to 'backends/platform/3ds/osystem-graphics.cpp')
-rw-r--r-- | backends/platform/3ds/osystem-graphics.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp index 56e5e95a83..1a86be4402 100644 --- a/backends/platform/3ds/osystem-graphics.cpp +++ b/backends/platform/3ds/osystem-graphics.cpp @@ -86,6 +86,7 @@ void OSystem_3DS::destroyGraphics() { _gameTopTexture.free(); _gameBottomTexture.free(); _overlay.free(); + _activityIcon.free(); shaderProgramFree(&_program); DVLB_Free(_dvlb); @@ -280,6 +281,7 @@ void OSystem_3DS::updateScreen() { if (_cursorVisible && config.showCursor) { _cursorTexture.transfer(); } + _activityIcon.transfer(); C3D_FrameEnd(0); C3D_FrameBegin(0); @@ -294,6 +296,11 @@ void OSystem_3DS::updateScreen() { C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _overlay.getMatrix()); _overlay.render(); } + if (_activityIcon.getPixels() && config.screen == kScreenTop) { + _activityIcon.setPosition(400 - _activityIcon.actualWidth, 0); + C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _activityIcon.getMatrix()); + _activityIcon.render(); + } if (_cursorVisible && config.showCursor && config.screen == kScreenTop) { C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _cursorTexture.getMatrix()); _cursorTexture.render(); @@ -311,6 +318,11 @@ void OSystem_3DS::updateScreen() { C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _overlay.getMatrix()); _overlay.render(); } + if (_activityIcon.getPixels()) { + _activityIcon.setPosition(320 - _activityIcon.actualWidth, 0); + C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _activityIcon.getMatrix()); + _activityIcon.render(); + } if (_cursorVisible && config.showCursor) { C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _cursorTexture.getMatrix()); _cursorTexture.render(); @@ -436,6 +448,22 @@ void OSystem_3DS::copyRectToOverlay(const void *buf, int pitch, int x, _overlay.markDirty(); } +void OSystem_3DS::displayActivityIconOnOSD(const Graphics::Surface *icon) { + if (!icon) { + _activityIcon.free(); + } else { + if (!_activityIcon.getPixels() || icon->w != _activityIcon.w || icon->h != _activityIcon.h) { + _activityIcon.create(icon->w, icon->h, _pfGameTexture); + } + + Graphics::Surface *converted = icon->convertTo(_pfGameTexture); + _activityIcon.copyRectToSurface(*converted, 0, 0, Common::Rect(converted->w, converted->h)); + _activityIcon.markDirty(); + converted->free(); + delete converted; + } +} + int16 OSystem_3DS::getOverlayHeight() { return 240; } |