diff --git a/openVulkanoCpp/Host/Linux/SystemInfo.cpp b/openVulkanoCpp/Host/Linux/SystemInfo.cpp index 9eb2375..7d1826f 100644 --- a/openVulkanoCpp/Host/Linux/SystemInfo.cpp +++ b/openVulkanoCpp/Host/Linux/SystemInfo.cpp @@ -99,7 +99,6 @@ namespace openVulkanoCpp rlimit limit; if (getrlimit(RLIMIT_AS, &limit) == 0) { - std::cout << "Maximum memory usage: " << limit.rlim_cur << " bytes" << std::endl; return limit.rlim_cur; } Logger::PERF->error("Failed to query max application memory"); @@ -158,7 +157,7 @@ namespace openVulkanoCpp struct OsInfo { std::string osName, osNameFormatted; - Version version; + OsVersion version; static std::string TryRead(const std::string line, std::string_view prefix) { @@ -170,7 +169,7 @@ namespace openVulkanoCpp return ""; } - static Version ParseVersionString(char* str) + static OsVersion ParseVersionString(char* str) { int ver[3]; int i = 0; @@ -252,7 +251,7 @@ namespace openVulkanoCpp return osInfo.osName; } - Version SystemInfo::GetOsVersion() + OsVersion SystemInfo::GetOsVersion() { return osInfo.version; } diff --git a/openVulkanoCpp/Host/SystemInfo.hpp b/openVulkanoCpp/Host/SystemInfo.hpp index ebd3d6d..897bab8 100644 --- a/openVulkanoCpp/Host/SystemInfo.hpp +++ b/openVulkanoCpp/Host/SystemInfo.hpp @@ -9,7 +9,7 @@ namespace openVulkanoCpp { - struct Version + struct OsVersion { int major, minor, patch, build; }; @@ -40,7 +40,7 @@ namespace openVulkanoCpp static std::string GetDeviceVendorName(); static std::string GetDeviceModelName(); static std::string GetOsName(); - static Version GetOsVersion(); + static OsVersion GetOsVersion(); static std::string GetOsNameHumanReadable(); static DeviceType GetDeviceType(); diff --git a/openVulkanoCpp/Host/iOS/OpenVulkanoAppDelegate.mm b/openVulkanoCpp/Host/iOS/OpenVulkanoAppDelegate.mm index b2aacce..3a60a1a 100644 --- a/openVulkanoCpp/Host/iOS/OpenVulkanoAppDelegate.mm +++ b/openVulkanoCpp/Host/iOS/OpenVulkanoAppDelegate.mm @@ -7,6 +7,9 @@ #import "OpenVulkanoAppDelegate.h" #include "Base/AppEvents.hpp" +#include "Base/Logger.hpp" +#include "Host/SystemInfo.hpp" +#include "Math/ByteSize.hpp" using namespace openVulkanoCpp; @@ -43,6 +46,7 @@ using namespace openVulkanoCpp; - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { + Logger::MANAGER->warn("Received Memory Warning! RAM Max {}; Available {}; Used: {}", ByteSize(SystemInfo::GetAppRamMax()), ByteSize(SystemInfo::GetAppRamAvailable()), ByteSize(SystemInfo::GetAppRamUsed())); AppEvents::OnReceivedMemoryWarning(); } diff --git a/openVulkanoCpp/Host/iOS/SystemInfo.mm b/openVulkanoCpp/Host/iOS/SystemInfo.mm index 6f13701..00c36fa 100644 --- a/openVulkanoCpp/Host/iOS/SystemInfo.mm +++ b/openVulkanoCpp/Host/iOS/SystemInfo.mm @@ -91,7 +91,7 @@ namespace openVulkanoCpp return [[[UIDevice currentDevice] systemName] UTF8String]; } - Version SystemInfo::GetOsVersion() + OsVersion SystemInfo::GetOsVersion() { NSOperatingSystemVersion osVersion = [NSProcessInfo processInfo].operatingSystemVersion; return { static_cast(osVersion.majorVersion), static_cast(osVersion.minorVersion), static_cast(osVersion.patchVersion), 0 };