diff options
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; } |