diff --git a/src/common/lru_cache.h b/src/common/lru_cache.h index 36cea5d27e..952ba0eb8b 100644 --- a/src/common/lru_cache.h +++ b/src/common/lru_cache.h @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -60,7 +63,7 @@ public: template void ForEachItemBelow(TickType tick, Func&& func) { static constexpr bool RETURNS_BOOL = - std::is_same_v, bool>; + std::is_same_v, bool>; Item* iterator = first_item; while (iterator) { if (static_cast(tick) - static_cast(iterator->tick) < 0) { diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 5a1c680830..cb6b5b0a94 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -128,6 +128,7 @@ void TextureCache

::RunGarbageCollector() { if (num_iterations == 0) { return true; } + --num_iterations; auto& image = slot_images[image_id]; if (True(image.flags & ImageFlagBits::IsDecoding)) { return false; @@ -136,7 +137,6 @@ void TextureCache

::RunGarbageCollector() { if ((!aggressive_mode && True(image.flags & ImageFlagBits::CostlyLoad)) || (!high_priority_mode && must_download)) { return false; } - --num_iterations; if (must_download) { auto map = runtime.DownloadStagingBuffer(image.unswizzled_size_bytes); const auto copies = FixSmallVectorADL(FullDownloadCopies(image.info));