From 22bf6420d265399d8a31d518026e39328ab15812 Mon Sep 17 00:00:00 2001 From: Colin Kinloch Date: Tue, 8 Aug 2023 22:22:22 +0100 Subject: [PATCH] Log platform info (#931) --- src/Cafe/CafeSystem.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/Cafe/CafeSystem.cpp b/src/Cafe/CafeSystem.cpp index ce46dc71..10b49c60 100644 --- a/src/Cafe/CafeSystem.cpp +++ b/src/Cafe/CafeSystem.cpp @@ -484,6 +484,28 @@ namespace CafeSystem #endif } + void logPlatformInfo() + { + const char* platform = NULL; + #if BOOST_OS_WINDOWS + platform = "Windows"; + #elif BOOST_OS_LINUX + if (getenv ("APPIMAGE")) + platform = "Linux (AppImage)"; + else if (getenv ("SNAP")) + platform = "Linux (Snap)"; + else if (platform = getenv ("container")) + if (strcmp (platform, "flatpak") == 0) + platform = "Linux (Flatpak)"; + else + platform = "Linux"; + #elif BOOST_OS_MACOS + platform = "MacOS"; + #endif + cemuLog_log(LogType::Force, "Platform: {}", platform); + + } + // initialize all subsystems which are persistent and don't depend on a game running void Initialize() { @@ -501,6 +523,7 @@ namespace CafeSystem _CheckForWine(); // CPU and RAM info logCPUAndMemoryInfo(); + logPlatformInfo(); cemuLog_log(LogType::Force, "Used CPU extensions: {}", g_CPUFeatures.GetCommaSeparatedExtensionList()); // misc systems rplSymbolStorage_init();