Skip to content

Commit

Permalink
Log platform info (#931)
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinKinloch authored Aug 8, 2023
1 parent a17111e commit 22bf642
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/Cafe/CafeSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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();
Expand Down

0 comments on commit 22bf642

Please sign in to comment.