VERY experimental Nintendo Switch 2 emulator
C++
shader: Adhere to disk shader cache setting
ameerj6bb1f54fbbd5
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cppindex d72ca5acc8..25b658b2a9 100644--- a/src/yuzu/bootmanager.cpp+++ b/src/yuzu/bootmanager.cpp@@ -64,12 +64,13 @@ void EmuThread::run() {emit LoadProgress(VideoCore::LoadCallbackStage::Prepare, 0, 0);- system.Renderer().ReadRasterizer()->LoadDiskResources(- system.CurrentProcess()->GetTitleID(), stop_token,- [this](VideoCore::LoadCallbackStage stage, std::size_t value, std::size_t total) {- emit LoadProgress(stage, value, total);- });-+ if (Settings::values.use_disk_shader_cache.GetValue()) {+ system.Renderer().ReadRasterizer()->LoadDiskResources(+ system.CurrentProcess()->GetTitleID(), stop_token,+ [this](VideoCore::LoadCallbackStage stage, std::size_t value, std::size_t total) {+ emit LoadProgress(stage, value, total);+ });+ }emit LoadProgress(VideoCore::LoadCallbackStage::Complete, 0, 0);gpu.ReleaseContext();diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cppindex ac4ea88d3d..35ce23696a 100644--- a/src/yuzu_cmd/yuzu.cpp+++ b/src/yuzu_cmd/yuzu.cpp@@ -218,9 +218,11 @@ int main(int argc, char** argv) {// Core is loaded, start the GPU (makes the GPU contexts current to this thread)system.GPU().Start();- system.Renderer().ReadRasterizer()->LoadDiskResources(- system.CurrentProcess()->GetTitleID(), std::stop_token{},- [](VideoCore::LoadCallbackStage, size_t value, size_t total) {});+ if (Settings::values.use_disk_shader_cache.GetValue()) {+ system.Renderer().ReadRasterizer()->LoadDiskResources(+ system.CurrentProcess()->GetTitleID(), std::stop_token{},+ [](VideoCore::LoadCallbackStage, size_t value, size_t total) {});+ }void(system.Run());while (emu_window->IsOpen()) {