Skip to content

Commit

Permalink
VITA: fix SDL_ShowMessageBox by using different memory type
Browse files Browse the repository at this point in the history
(cherry picked from commit 52714d5)
  • Loading branch information
isage authored and slouken committed Oct 22, 2024
1 parent c1adfb4 commit 257d754
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/render/vitagxm/SDL_render_vita_gxm_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/render/vitagxm/SDL_render_vita_gxm_tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 257d754

Please sign in to comment.