aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/3ds/osystem-graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/3ds/osystem-graphics.cpp')
-rw-r--r--backends/platform/3ds/osystem-graphics.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp
index 9dd9c5a91f..c1434177e7 100644
--- a/backends/platform/3ds/osystem-graphics.cpp
+++ b/backends/platform/3ds/osystem-graphics.cpp
@@ -265,13 +265,22 @@ void OSystem_3DS::unlockScreen() {
}
void OSystem_3DS::updateScreen() {
-
if (sleeping || exiting)
return;
// updateFocus();
- C3D_FrameBegin(C3D_FRAME_SYNCDRAW);
+ C3D_FrameBegin(0);
+ _gameTopTexture.transfer();
+ if (_overlayVisible) {
+ _overlay.transfer();
+ }
+ if (_cursorVisible && config.showCursor) {
+ _cursorTexture.transfer();
+ }
+ C3D_FrameEnd(0);
+
+ C3D_FrameBegin(0);
// Render top screen
C3D_RenderTargetClear(_renderTargetTop, C3D_CLEAR_ALL, 0x00000000, 0);
C3D_FrameDrawOn(_renderTargetTop);
@@ -279,7 +288,6 @@ void OSystem_3DS::updateScreen() {
C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _projectionLocation, &_projectionTop);
C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _gameTopTexture.getMatrix());
_gameTopTexture.render();
- _gameTopTexture.render();
if (_overlayVisible && config.screen == kScreenTop) {
C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _overlay.getMatrix());
_overlay.render();
@@ -297,7 +305,6 @@ void OSystem_3DS::updateScreen() {
C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _projectionLocation, &_projectionBottom);
C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _gameBottomTexture.getMatrix());
_gameTopTexture.render();
- _gameTopTexture.render();
if (_overlayVisible) {
C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, _modelviewLocation, _overlay.getMatrix());
_overlay.render();