From 6bc2733c1796788590c9f0114013d2e4b555e31e Mon Sep 17 00:00:00 2001
From: Mary <me@thog.eu>
Date: Sun, 13 Dec 2020 08:46:07 +0100
Subject: salieri: Support read-only mode if archive is already opened (#1807)

This improves shader cache resilience when people opens another program that touch the cache.zip.
---
 Ryujinx.Graphics.Gpu/Shader/Cache/CacheManager.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'Ryujinx.Graphics.Gpu/Shader/Cache/CacheManager.cs')

diff --git a/Ryujinx.Graphics.Gpu/Shader/Cache/CacheManager.cs b/Ryujinx.Graphics.Gpu/Shader/Cache/CacheManager.cs
index ca0070fd..1ac37704 100644
--- a/Ryujinx.Graphics.Gpu/Shader/Cache/CacheManager.cs
+++ b/Ryujinx.Graphics.Gpu/Shader/Cache/CacheManager.cs
@@ -1,9 +1,7 @@
 using Ryujinx.Common;
-using Ryujinx.Common.Configuration;
 using Ryujinx.Graphics.Gpu.Shader.Cache.Definition;
 using System;
 using System.Collections.Generic;
-using System.IO;
 
 namespace Ryujinx.Graphics.Gpu.Shader.Cache
 {
@@ -31,6 +29,8 @@ namespace Ryujinx.Graphics.Gpu.Shader.Cache
         /// </summary>
         private const ulong GuestCacheVersion = 1759;
 
+        public bool IsReadOnly => _guestProgramCache.IsReadOnly || _hostProgramCache.IsReadOnly;
+
         /// <summary>
         /// Create a new cache manager instance
         /// </summary>
-- 
cgit v1.2.3-70-g09d2