diff --git a/CHANGES b/CHANGES index 4e6a8db8c..4d295c873 100644 --- a/CHANGES +++ b/CHANGES @@ -37,6 +37,7 @@ Misc: - Qt: Improve camera initialization - Qt: Support switching webcams - Core: Add keysRead callback + - Vita: Improved frame drawing speed 0.7.1: (2019-02-24) Bugfixes: diff --git a/src/platform/psp2/main.c b/src/platform/psp2/main.c index f5843a911..4dad587d8 100644 --- a/src/platform/psp2/main.c +++ b/src/platform/psp2/main.c @@ -36,7 +36,6 @@ static void _drawStart(void) { static void _drawEnd(void) { vita2d_end_drawing(); - vita2d_wait_rendering_done(); vita2d_swap_buffers(); } diff --git a/src/platform/psp2/psp2-context.c b/src/platform/psp2/psp2-context.c index 98f44934c..f5d8b1254 100644 --- a/src/platform/psp2/psp2-context.c +++ b/src/platform/psp2/psp2-context.c @@ -324,7 +324,7 @@ void mPSP2Setup(struct mGUIRunner* runner) { tex = vita2d_create_empty_texture_format(256, toPow2(height), SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1BGR); screenshot = vita2d_create_empty_texture_format(256, toPow2(height), SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1BGR); - outputBuffer = vita2d_texture_get_datap(tex); + outputBuffer = anonymousMemoryMap(256 * toPow2(height) * 4); runner->core->setVideoBuffer(runner->core, outputBuffer, 256); runner->core->setAudioBufferSize(runner->core, PSP2_SAMPLES); @@ -458,6 +458,7 @@ void mPSP2Teardown(struct mGUIRunner* runner) { CircleBufferDeinit(&rumble.history); vita2d_free_texture(tex); vita2d_free_texture(screenshot); + mappedMemoryFree(outputBuffer, 256 * 256 * 4); frameLimiter = true; } @@ -525,6 +526,8 @@ void _drawTex(vita2d_texture* t, unsigned width, unsigned height, bool faded) { void mPSP2Draw(struct mGUIRunner* runner, bool faded) { unsigned width, height; runner->core->desiredVideoDimensions(runner->core, &width, &height); + void* texpixels = vita2d_texture_get_datap(tex); + memcpy(texpixels, outputBuffer, 256 * height * 4); _drawTex(tex, width, height, faded); }