[VITA] Fix vitagl clash with function names

This commit is contained in:
Francisco José García García 2020-06-01 14:15:53 +02:00
parent 5644bd43b1
commit ba0d5705fc
3 changed files with 6 additions and 6 deletions

View File

@ -256,7 +256,7 @@ static void heap_free(void *addr) {
heap_blk_free((uintptr_t)addr);
}
void mem_term(void) {
void vgl_mem_term(void) {
heap_destroy();
if (mempool_addr[0] != NULL) {
sceKernelFreeMemBlock(mempool_id[0]);
@ -268,9 +268,9 @@ void mem_term(void) {
}
}
int mem_init(size_t size_ram, size_t size_cdram, size_t size_phycont) {
int vgl_mem_init(size_t size_ram, size_t size_cdram, size_t size_phycont) {
if (mempool_addr[0] != NULL)
mem_term();
vgl_mem_term();
mempool_size[0] = ALIGN(size_cdram, 256 * 1024);
mempool_size[1] = ALIGN(size_ram, 4 * 1024);

View File

@ -24,8 +24,8 @@
#ifndef _MEM_UTILS_H_
#define _MEM_UTILS_H_
int mem_init(size_t size_ram, size_t size_cdram, size_t size_phycont); // Initialize mempools
void mem_term(void); // Terminate both CDRAM and RAM mempools
int vgl_mem_init(size_t size_ram, size_t size_cdram, size_t size_phycont); // Initialize mempools
void vgl_mem_term(void); // Terminate both CDRAM and RAM mempools
size_t mempool_get_free_space(vglMemType type); // Return free space in bytes for a mempool
void *mempool_alloc(size_t size, vglMemType type); // Allocate a memory block on a mempool
void mempool_free(void *ptr, vglMemType type); // Free a memory block on a mempool

View File

@ -237,7 +237,7 @@ void vglInitExtended(uint32_t gpu_pool_size, int width, int height, int ram_thre
sceKernelGetFreeMemorySize(&info);
// Initializing memory heap for CDRAM and RAM memory
mem_init(info.size_user > ram_threshold ? info.size_user - ram_threshold : info.size_user, info.size_cdram - 256 * 1024, info.size_phycont - 1 * 1024 * 1024); // leave some just in case
vgl_mem_init(info.size_user > ram_threshold ? info.size_user - ram_threshold : info.size_user, info.size_cdram - 256 * 1024, info.size_phycont - 1 * 1024 * 1024); // leave some just in case
// Initializing sceGxm context
initGxmContext();