mirror of
https://github.com/izzy2lost/WeeU.git
synced 2026-07-06 00:19:59 -07:00
Merge branch 'main' into android
This commit is contained in:
+17
-1
@@ -69,7 +69,7 @@
|
||||
|
||||
#if BOOST_OS_LINUX
|
||||
#include <sys/sysinfo.h>
|
||||
#elif BOOST_OS_MACOS
|
||||
#elif BOOST_OS_MACOS || BOOST_OS_BSD
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
@@ -491,6 +491,12 @@ namespace CafeSystem
|
||||
int64_t totalRam;
|
||||
size_t size = sizeof(totalRam);
|
||||
int result = sysctlbyname("hw.memsize", &totalRam, &size, NULL, 0);
|
||||
if (result == 0)
|
||||
cemuLog_log(LogType::Force, "RAM: {}MB", (totalRam / 1024LL / 1024LL));
|
||||
#elif BOOST_OS_BSD
|
||||
int64_t totalRam;
|
||||
size_t size = sizeof(totalRam);
|
||||
int result = sysctlbyname("hw.physmem", &totalRam, &size, NULL, 0);
|
||||
if (result == 0)
|
||||
cemuLog_log(LogType::Force, "RAM: {}MB", (totalRam / 1024LL / 1024LL));
|
||||
#endif
|
||||
@@ -544,6 +550,16 @@ namespace CafeSystem
|
||||
platform = "Linux";
|
||||
#elif BOOST_OS_MACOS
|
||||
platform = "MacOS";
|
||||
#elif BOOST_OS_BSD
|
||||
#if defined(__FreeBSD__)
|
||||
platform = "FreeBSD";
|
||||
#elif defined(__OpenBSD__)
|
||||
platform = "OpenBSD";
|
||||
#elif defined(__NetBSD__)
|
||||
platform = "NetBSD";
|
||||
#else
|
||||
platform = "Unknown BSD";
|
||||
#endif
|
||||
#endif
|
||||
cemuLog_log(LogType::Force, "Platform: {}", platform);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user