diff options
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | 5 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_disk_cache.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp index a87bb1f9e..4d02a800d 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp @@ -156,6 +156,11 @@ std::vector<ShaderDiskCachePrecompiledEntry> ShaderDiskCacheOpenGL::LoadPrecompi return precompiled; } +void ShaderDiskCacheOpenGL::InvalidateTransferable() const { + FileUtil::Delete(GetTransferablePath()); + InvalidatePrecompiled(); +} + void ShaderDiskCacheOpenGL::InvalidatePrecompiled() const { FileUtil::Delete(GetPrecompiledPath()); } diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.h b/src/video_core/renderer_opengl/gl_shader_disk_cache.h index e68aea694..6c4c7bd5c 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.h +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.h @@ -147,6 +147,9 @@ public: /// Loads current game's precompiled cache. Invalidates if emulator's version has changed. std::vector<ShaderDiskCachePrecompiledEntry> LoadPrecompiled(); + /// Removes the transferable (and precompiled) cache file. + void InvalidateTransferable() const; + /// Removes the precompiled cache file. void InvalidatePrecompiled() const; |