From 52714d506324ac0d745d23155f1c6c860cc492a4 Mon Sep 17 00:00:00 2001 From: Ivan Epifanov Date: Tue, 22 Oct 2024 22:10:15 +0300 Subject: [PATCH] VITA: fix SDL_ShowMessageBox by using different memory type --- src/render/vitagxm/SDL_render_vita_gxm_memory.c | 2 ++ src/render/vitagxm/SDL_render_vita_gxm_tools.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/render/vitagxm/SDL_render_vita_gxm_memory.c b/src/render/vitagxm/SDL_render_vita_gxm_memory.c index 86e33115f47f4..cba8b357d9ed1 100644 --- a/src/render/vitagxm/SDL_render_vita_gxm_memory.c +++ b/src/render/vitagxm/SDL_render_vita_gxm_memory.c @@ -31,6 +31,8 @@ void *vita_mem_alloc(unsigned int type, unsigned int size, unsigned int alignmen if (type == SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW) { size = ALIGN(size, 256 * 1024); + } else if (type == SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_RW) { + size = ALIGN(size, 1024 * 1024); } else { size = ALIGN(size, 4 * 1024); } diff --git a/src/render/vitagxm/SDL_render_vita_gxm_tools.c b/src/render/vitagxm/SDL_render_vita_gxm_tools.c index 2c38441d1d058..6c6c8c0e66df7 100644 --- a/src/render/vitagxm/SDL_render_vita_gxm_tools.c +++ b/src/render/vitagxm/SDL_render_vita_gxm_tools.c @@ -1162,7 +1162,7 @@ void gxm_init_for_common_dialog(void) for (int i = 0; i < VITA_GXM_BUFFERS; i += 1) { buffer_for_common_dialog[i].displayData.wait_vblank = SDL_TRUE; buffer_for_common_dialog[i].displayData.address = vita_mem_alloc( - SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW, + SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_RW, 4 * VITA_GXM_SCREEN_STRIDE * VITA_GXM_SCREEN_HEIGHT, SCE_GXM_COLOR_SURFACE_ALIGNMENT, SCE_GXM_MEMORY_ATTRIB_READ | SCE_GXM_MEMORY_ATTRIB_WRITE,