From 473400902c466a91e30c068cb5c848e3cd1a539d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 25 Sep 2019 00:08:28 +0200 Subject: [PATCH] Buildfix - apparently Switch memory reporting cannot be implemented correctly --- frontend/drivers/platform_switch.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/frontend/drivers/platform_switch.c b/frontend/drivers/platform_switch.c index e95708b978..675bfd4531 100644 --- a/frontend/drivers/platform_switch.c +++ b/frontend/drivers/platform_switch.c @@ -816,17 +816,6 @@ static int frontend_switch_parse_drive_list(void *data, bool load_content) return 0; } -static uint64_t frontend_switch_get_mem_total(void) -{ - uint64_t memoryTotal = 0; - svcGetInfo(&memoryTotal, 6, 0xffff8001, 0); - /* TODO/FIXME - is now 'free memory', perhaps logic - * here needs to change */ - memoryTotal += frontend_switch_get_mem_free(); - - return memoryTotal; -} - static uint64_t frontend_switch_get_mem_free(void) { /* TODO/FIXME - should become 'free memory' */ @@ -836,6 +825,14 @@ static uint64_t frontend_switch_get_mem_free(void) return memoryUsed; } +static uint64_t frontend_switch_get_mem_total(void) +{ + uint64_t memoryTotal = 0; + svcGetInfo(&memoryTotal, 6, 0xffff8001, 0); + return memoryTotal; +} + + static enum frontend_powerstate frontend_switch_get_powerstate(int *seconds, int *percent) {