From 69f5df40f90abcf8bc70bcf2a4edcaa7fc89e668 Mon Sep 17 00:00:00 2001 From: Martin Felke Date: Mon, 5 Jun 2023 00:16:24 +0200 Subject: [PATCH] compile fixes after function renaming --- src/common/settings.cpp | 4 ++-- src/common/settings.h | 2 +- src/video_core/renderer_opengl/gl_device.cpp | 2 +- src/video_core/vulkan_common/vulkan_device.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/settings.cpp b/src/common/settings.cpp index e004bcba03..7f92a97cb3 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -257,8 +257,8 @@ void RestoreGlobalState(bool is_powered_on) { // this function only makes sense with integrated devices -u64 RamPercentToByte(u8 percent) { - // total RAM in byte +u64 RamPercentToBytes(u8 percent) { + // total RAM in bytes u64 total_ram = Common::GetMemInfo().TotalPhysicalMemory; // clamp percentage between 10 and 90, so we dont run out of either RAM or VRAM diff --git a/src/common/settings.h b/src/common/settings.h index c6a31b530e..1410598937 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -615,6 +615,6 @@ void UpdateRescalingInfo(); // Restore the global state of all applicable settings in the Values struct void RestoreGlobalState(bool is_powered_on); -u64 RAM_Percent_to_Byte(u8 percent); +u64 RamPercentToBytes(u8 percent); } // namespace Settings diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index 19293b3196..021bfecd31 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp @@ -292,7 +292,7 @@ u64 Device::GetTotalDedicatedVideoMemory() const { if (Settings::values.use_vram_percentage.GetValue()) { u8 percent = Settings::values.vram_percentage.GetValue(); - return Settings::RamPercentToByte(percent); + return Settings::RamPercentToBytes(percent); } else { // this is according to both former settings in the gl_buffer_cache // and gl_texture_cache, regarding device_access_memory diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 1b231cf141..d52218e5ef 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -1042,7 +1042,7 @@ void Device::CollectPhysicalMemoryInfo() { const u8 percent = Settings::values.vram_percentage.GetValue(); const s64 available_memory = static_cast(device_access_memory - device_initial_usage); const s64 limit = Settings::values.use_vram_percentage.GetValue() - ? Settings::RamPercentToByte(percent) + ? Settings::RamPercentToBytes(percent) : 4_GiB; device_access_memory = static_cast(std::max( std::min(available_memory - 8_GiB, 4_GiB), std::min(local_memory, limit)));