From 739f4e1eb2ba02d295675dabcf47706fca2a4445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Cadete?= Date: Mon, 1 Feb 2021 23:14:28 +0000 Subject: [PATCH] Only call sceGxmFinish when vsync is on Also fix oversight with supported textures --- src/render/vitagxm/SDL_render_vita_gxm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/render/vitagxm/SDL_render_vita_gxm.c b/src/render/vitagxm/SDL_render_vita_gxm.c index 4be15d5a9..e13171998 100644 --- a/src/render/vitagxm/SDL_render_vita_gxm.c +++ b/src/render/vitagxm/SDL_render_vita_gxm.c @@ -115,8 +115,8 @@ SDL_RenderDriver VITA_GXM_RenderDriver = { [1] = SDL_PIXELFORMAT_ARGB8888, [2] = SDL_PIXELFORMAT_RGB888, [3] = SDL_PIXELFORMAT_BGR888, - [2] = SDL_PIXELFORMAT_RGB565, - [3] = SDL_PIXELFORMAT_BGR565 + [4] = SDL_PIXELFORMAT_RGB565, + [5] = SDL_PIXELFORMAT_BGR565 }, .max_texture_width = 1024, .max_texture_height = 1024, @@ -1086,9 +1086,11 @@ VITA_GXM_RenderPresent(SDL_Renderer *renderer) VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; SceCommonDialogUpdateParam updateParam; - if(data->drawing) { + if (data->drawing) { sceGxmEndScene(data->gxm_context, NULL, NULL); - sceGxmFinish(data->gxm_context); + if (data->displayData.wait_vblank) { + sceGxmFinish(data->gxm_context); + } } data->displayData.address = data->displayBufferData[data->backBufferIndex];