Wii/GC: free memory instead of used memory

This commit is contained in:
benoa 2019-09-23 16:09:53 +02:00
parent c78dcbd382
commit 2bd71b55bc
2 changed files with 3 additions and 8 deletions

View File

@ -527,10 +527,9 @@ static uint64_t frontend_gx_get_mem_total(void)
static uint64_t frontend_gx_get_mem_free(void) static uint64_t frontend_gx_get_mem_free(void)
{ {
uint64_t total = SYSMEM1_SIZE - SYS_GetArena1Size(); uint64_t total = SYSMEM1_SIZE - (SYSMEM1_SIZE - SYS_GetArena1Size());
#if defined(HW_RVL) && !defined(IS_SALAMANDER) #if defined(HW_RVL) && !defined(IS_SALAMANDER)
/* TODO/FIXME - this needs to change */ total += (gx_mem2_total() - gx_mem2_used());
total += gx_mem2_used();
#endif #endif
return total; return total;
} }

View File

@ -11365,15 +11365,11 @@ static void retroarch_overlay_init(void)
{ {
settings_t *settings = configuration_settings; settings_t *settings = configuration_settings;
#if 0
#if defined(GEKKO) #if defined(GEKKO)
/* TODO/FIXME - Wiimpathy - behavior here has changed - can you
* rewrite this? */
/* Avoid a crash at startup or even when toggling overlay in rgui */ /* Avoid a crash at startup or even when toggling overlay in rgui */
uint64_t memory_free = frontend_driver_get_free_memory(); uint64_t memory_free = frontend_driver_get_free_memory();
if (memory_free > (72 * 1024 * 1024)) if (memory_free < (3 * 1024 * 1024))
return; return;
#endif
#endif #endif
retroarch_overlay_deinit(); retroarch_overlay_deinit();