From 15e30bc0ca198103461a5ef3d2732224695d2c54 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 27 Sep 2022 17:43:27 +0200 Subject: [PATCH] Increased the minimum VRAM limit from 80 MiB to 128 MiB. --- es-app/src/guis/GuiMenu.cpp | 8 ++++---- es-core/src/resources/TextureDataManager.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 2545cd545..e9c9af7bb 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -780,7 +780,7 @@ void GuiMenu::openSoundOptions() VolumeControl volumeControl; int currentVolume {volumeControl.getVolume()}; - auto systemVolume = std::make_shared(0.f, 100.f, 1.f, "%"); + auto systemVolume = std::make_shared(0.0f, 100.0f, 1.0f, "%"); systemVolume->setValue(static_cast(currentVolume)); s->addWithLabel("SYSTEM VOLUME", systemVolume); s->addSaveFunc([systemVolume, currentVolume] { @@ -793,7 +793,7 @@ void GuiMenu::openSoundOptions() #endif // Volume for navigation sounds. - auto soundVolumeNavigation = std::make_shared(0.f, 100.f, 1.f, "%"); + auto soundVolumeNavigation = std::make_shared(0.0f, 100.0f, 1.0f, "%"); soundVolumeNavigation->setValue( static_cast(Settings::getInstance()->getInt("SoundVolumeNavigation"))); s->addWithLabel("NAVIGATION SOUNDS VOLUME", soundVolumeNavigation); @@ -807,7 +807,7 @@ void GuiMenu::openSoundOptions() }); // Volume for videos. - auto soundVolumeVideos = std::make_shared(0.f, 100.f, 1.f, "%"); + auto soundVolumeVideos = std::make_shared(0.0f, 100.0f, 1.0f, "%"); soundVolumeVideos->setValue( static_cast(Settings::getInstance()->getInt("SoundVolumeVideos"))); s->addWithLabel("VIDEO PLAYER VOLUME", soundVolumeVideos); @@ -1023,7 +1023,7 @@ void GuiMenu::openOtherOptions() s->addRow(rowMediaDir); // Maximum VRAM. - auto maxVram = std::make_shared(80.f, 1024.f, 8.f, "MiB"); + auto maxVram = std::make_shared(128.0f, 1024.0f, 8.0f, "MiB"); maxVram->setValue(static_cast(Settings::getInstance()->getInt("MaxVRAM"))); s->addWithLabel("VRAM LIMIT", maxVram); s->addSaveFunc([maxVram, s] { diff --git a/es-core/src/resources/TextureDataManager.cpp b/es-core/src/resources/TextureDataManager.cpp index aff76e7f0..f91d11319 100644 --- a/es-core/src/resources/TextureDataManager.cpp +++ b/es-core/src/resources/TextureDataManager.cpp @@ -117,11 +117,11 @@ void TextureDataManager::load(std::shared_ptr tex, bool block) size_t size {TextureResource::getTotalMemUsage()}; size_t settingVRAM {static_cast(Settings::getInstance()->getInt("MaxVRAM"))}; - if (settingVRAM < 80) { + if (settingVRAM < 128) { LOG(LogWarning) << "MaxVRAM is too low at " << settingVRAM - << " MiB, setting it to the minimum allowed value of 80 MiB"; - Settings::getInstance()->setInt("MaxVRAM", 80); - settingVRAM = 80; + << " MiB, setting it to the minimum allowed value of 128 MiB"; + Settings::getInstance()->setInt("MaxVRAM", 128); + settingVRAM = 128; } else if (settingVRAM > 1024) { LOG(LogWarning) << "MaxVRAM is too high at " << settingVRAM