From e5ab0ae277e89765932224278c94a2931f2456ce Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 26 Oct 2020 23:55:33 -0700 Subject: [PATCH] Vita: Clear both buffers when loading a game --- CHANGES | 1 + src/platform/psp2/psp2-context.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index becbef98d..fc935c115 100644 --- a/CHANGES +++ b/CHANGES @@ -109,6 +109,7 @@ Misc: - Qt: Window title updates can be disabled (closes mgba.io/i/1912) - Util: Reset vector size on deinit - VFS: Change semantics of VFile.sync on mapped files (fixes mgba.io/i/1730) + - Vita: Clear both buffers when loading a game 0.8.3: (2020-08-03) Emulation fixes: diff --git a/src/platform/psp2/psp2-context.c b/src/platform/psp2/psp2-context.c index 420bd444b..f6fe0150a 100644 --- a/src/platform/psp2/psp2-context.c +++ b/src/platform/psp2/psp2-context.c @@ -328,6 +328,9 @@ void mPSP2Setup(struct mGUIRunner* runner) { currentTex = 0; screenshot = vita2d_create_empty_texture_format(256, toPow2(height), SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1BGR); + memset(vita2d_texture_get_datap(tex[0]), 0xFF, 256 * toPow2(height) * 4); + memset(vita2d_texture_get_datap(tex[1]), 0xFF, 256 * toPow2(height) * 4); + runner->core->setVideoBuffer(runner->core, vita2d_texture_get_datap(tex[currentTex]), 256); runner->core->setAudioBufferSize(runner->core, PSP2_SAMPLES);