mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 11:28:15 +00:00
VITA: fix SDL_ShowMessageBox by using different memory type
This commit is contained in:

committed by
Sam Lantinga

parent
a42c9ec5f7
commit
1f8b9a320c
@@ -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) {
|
if (type == SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW) {
|
||||||
size = ALIGN(size, 256 * 1024);
|
size = ALIGN(size, 256 * 1024);
|
||||||
|
} else if (type == SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_RW) {
|
||||||
|
size = ALIGN(size, 1024 * 1024);
|
||||||
} else {
|
} else {
|
||||||
size = ALIGN(size, 4 * 1024);
|
size = ALIGN(size, 4 * 1024);
|
||||||
}
|
}
|
||||||
|
@@ -1160,7 +1160,7 @@ void gxm_init_for_common_dialog(void)
|
|||||||
for (int i = 0; i < VITA_GXM_BUFFERS; i += 1) {
|
for (int i = 0; i < VITA_GXM_BUFFERS; i += 1) {
|
||||||
buffer_for_common_dialog[i].displayData.wait_vblank = true;
|
buffer_for_common_dialog[i].displayData.wait_vblank = true;
|
||||||
buffer_for_common_dialog[i].displayData.address = vita_mem_alloc(
|
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,
|
4 * VITA_GXM_SCREEN_STRIDE * VITA_GXM_SCREEN_HEIGHT,
|
||||||
SCE_GXM_COLOR_SURFACE_ALIGNMENT,
|
SCE_GXM_COLOR_SURFACE_ALIGNMENT,
|
||||||
SCE_GXM_MEMORY_ATTRIB_READ | SCE_GXM_MEMORY_ATTRIB_WRITE,
|
SCE_GXM_MEMORY_ATTRIB_READ | SCE_GXM_MEMORY_ATTRIB_WRITE,
|
||||||
|
Reference in New Issue
Block a user