summaryrefslogtreecommitdiffstats
path: root/src/skel/glfw
diff options
context:
space:
mode:
authorAdrian Graber <adrian@adriangraber.com>2021-07-12 20:58:34 +0200
committerAdrian Graber <adrian@adriangraber.com>2021-07-13 00:50:49 +0200
commita7b38e1b34210c9c78c16a32140ba40e47152fa8 (patch)
treefd2750a932c0bdb673f44c5613fb5ec5cd762680 /src/skel/glfw
parentFinish cmake stuff for Switch build (diff)
downloadre3-a7b38e1b34210c9c78c16a32140ba40e47152fa8.tar
re3-a7b38e1b34210c9c78c16a32140ba40e47152fa8.tar.gz
re3-a7b38e1b34210c9c78c16a32140ba40e47152fa8.tar.bz2
re3-a7b38e1b34210c9c78c16a32140ba40e47152fa8.tar.lz
re3-a7b38e1b34210c9c78c16a32140ba40e47152fa8.tar.xz
re3-a7b38e1b34210c9c78c16a32140ba40e47152fa8.tar.zst
re3-a7b38e1b34210c9c78c16a32140ba40e47152fa8.zip
Diffstat (limited to 'src/skel/glfw')
-rw-r--r--src/skel/glfw/glfw.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp
index 767d1bbd..6d4cade9 100644
--- a/src/skel/glfw/glfw.cpp
+++ b/src/skel/glfw/glfw.cpp
@@ -560,15 +560,16 @@ psInitialize(void)
_dwMemAvailPhys = (uint64_t)(vm_stat.free_count * page_size);
debug("Physical memory size %llu\n", _dwMemAvailPhys);
debug("Available physical memory %llu\n", size);
+#elif defined (__SWITCH__)
+ svcGetInfo(&_dwMemAvailPhys, 7, 0xffff8001, 0);
+ debug("Physical memory size %llu\n", _dwMemAvailPhys);
#else
-#ifndef __SWITCH__
struct sysinfo systemInfo;
sysinfo(&systemInfo);
_dwMemAvailPhys = systemInfo.freeram;
debug("Physical memory size %u\n", systemInfo.totalram);
debug("Available physical memory %u\n", systemInfo.freeram);
#endif
-#endif
TheText.Unload();