diff options
author | Bastien Bouclet | 2019-10-20 09:33:04 +0200 |
---|---|---|
committer | Bastien Bouclet | 2019-10-25 19:13:40 +0200 |
commit | e9b1df95ffeff6f63d29786060bad70f1f89cea0 (patch) | |
tree | 9739f2af455740c486594acace3df218c4896cdc /backends/platform/3ds/sprite.cpp | |
parent | aaed15d308ddca2eefb9fdb11ca3b8174b97f4cd (diff) | |
download | scummvm-rg350-e9b1df95ffeff6f63d29786060bad70f1f89cea0.tar.gz scummvm-rg350-e9b1df95ffeff6f63d29786060bad70f1f89cea0.tar.bz2 scummvm-rg350-e9b1df95ffeff6f63d29786060bad70f1f89cea0.zip |
3DS: Upload the textures to VRAM in a separate frame
So rendering waits for the textures to finish uploading before using
them. Fixes glitchy mouse pointer in Riven.
Diffstat (limited to 'backends/platform/3ds/sprite.cpp')
-rw-r--r-- | backends/platform/3ds/sprite.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/backends/platform/3ds/sprite.cpp b/backends/platform/3ds/sprite.cpp index 78082f3027..b2785e2c2d 100644 --- a/backends/platform/3ds/sprite.cpp +++ b/backends/platform/3ds/sprite.cpp @@ -100,13 +100,15 @@ void Sprite::convertToInPlace(const Graphics::PixelFormat &dstFormat, const byte // } -void Sprite::render() { +void Sprite::transfer() { if (dirtyPixels) { dirtyPixels = false; GSPGPU_FlushDataCache(pixels, w * h * format.bytesPerPixel); C3D_SyncDisplayTransfer((u32*)pixels, GX_BUFFER_DIM(w, h), (u32*)texture.data, GX_BUFFER_DIM(w, h), TEXTURE_TRANSFER_FLAGS); -// gspWaitForPPF(); } +} + +void Sprite::render() { C3D_TexBind(0, &texture); C3D_BufInfo *bufInfo = C3D_GetBufInfo(); |