mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
(GX) Implement get_mem_total/get_mem_free
This commit is contained in:
parent
2b37c92a64
commit
040798cdb9
@ -21,12 +21,17 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <gccore.h>
|
||||
#include <ogcsys.h>
|
||||
|
||||
#if defined(HW_RVL) && !defined(IS_SALAMANDER)
|
||||
#include <ogc/mutex.h>
|
||||
#include <ogc/cond.h>
|
||||
#include "../../memory/wii/mem2_manager.h"
|
||||
#endif
|
||||
|
||||
#include "../../defines/gx_defines.h"
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#include <file/file_path.h>
|
||||
@ -481,6 +486,24 @@ static void frontend_gx_shutdown(bool unused)
|
||||
#endif
|
||||
}
|
||||
|
||||
static uint64_t frontend_gx_get_mem_total(void)
|
||||
{
|
||||
uint64_t total = SYSMEM1_SIZE;
|
||||
#if defined(HW_RVL) && !defined(IS_SALAMANDER)
|
||||
total += gx_mem2_total();
|
||||
#endif
|
||||
return total;
|
||||
}
|
||||
|
||||
static uint64_t frontend_gx_get_mem_free(void)
|
||||
{
|
||||
uint64_t total = SYSMEM1_SIZE - SYS_GetArena1Size();
|
||||
#if defined(HW_RVL) && !defined(IS_SALAMANDER)
|
||||
total += gx_mem2_used();
|
||||
#endif
|
||||
return total;
|
||||
}
|
||||
|
||||
frontend_ctx_driver_t frontend_ctx_gx = {
|
||||
frontend_gx_get_environment_settings,
|
||||
frontend_gx_init,
|
||||
@ -501,7 +524,7 @@ frontend_ctx_driver_t frontend_ctx_gx = {
|
||||
frontend_gx_get_architecture,
|
||||
NULL, /* get_powerstate */
|
||||
frontend_gx_parse_drive_list,
|
||||
NULL, /* get_mem_total */
|
||||
NULL, /* get_mem_free */
|
||||
frontend_gx_get_mem_total,
|
||||
frontend_gx_get_mem_free,
|
||||
"gx",
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user