Skip to content

Commit 257d754

Browse files
isageslouken
authored andcommitted
VITA: fix SDL_ShowMessageBox by using different memory type
(cherry picked from commit 52714d5)
1 parent c1adfb4 commit 257d754

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/render/vitagxm/SDL_render_vita_gxm_memory.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ void *vita_mem_alloc(unsigned int type, unsigned int size, unsigned int alignmen
3131

3232
if (type == SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW) {
3333
size = ALIGN(size, 256 * 1024);
34+
} else if (type == SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_RW) {
35+
size = ALIGN(size, 1024 * 1024);
3436
} else {
3537
size = ALIGN(size, 4 * 1024);
3638
}

src/render/vitagxm/SDL_render_vita_gxm_tools.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ void gxm_init_for_common_dialog(void)
11621162
for (int i = 0; i < VITA_GXM_BUFFERS; i += 1) {
11631163
buffer_for_common_dialog[i].displayData.wait_vblank = SDL_TRUE;
11641164
buffer_for_common_dialog[i].displayData.address = vita_mem_alloc(
1165-
SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW,
1165+
SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_RW,
11661166
4 * VITA_GXM_SCREEN_STRIDE * VITA_GXM_SCREEN_HEIGHT,
11671167
SCE_GXM_COLOR_SURFACE_ALIGNMENT,
11681168
SCE_GXM_MEMORY_ATTRIB_READ | SCE_GXM_MEMORY_ATTRIB_WRITE,

0 commit comments

Comments
 (0)