mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-29 20:03:26 +00:00
[android,ui] fixed shader cache clearing when changing drivers
This commit is contained in:
@@ -23,6 +23,7 @@ import org.yuzu.yuzu_emu.model.Driver.Companion.toDriver
|
|||||||
import org.yuzu.yuzu_emu.utils.GpuDriverHelper
|
import org.yuzu.yuzu_emu.utils.GpuDriverHelper
|
||||||
import org.yuzu.yuzu_emu.NativeLibrary
|
import org.yuzu.yuzu_emu.NativeLibrary
|
||||||
import org.yuzu.yuzu_emu.utils.GpuDriverMetadata
|
import org.yuzu.yuzu_emu.utils.GpuDriverMetadata
|
||||||
|
import org.yuzu.yuzu_emu.utils.DirectoryInitialization
|
||||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
@@ -146,11 +147,11 @@ class DriverViewModel : ViewModel() {
|
|||||||
private fun wipeGameShaders(game: Game) {
|
private fun wipeGameShaders(game: Game) {
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
val externalFilesDir = YuzuApplication.appContext.getExternalFilesDir(null)
|
val userDirectory = DirectoryInitialization.userDirectory
|
||||||
?: return@withContext
|
?: return@withContext
|
||||||
val shaderDir = File(
|
val shaderDir = File(
|
||||||
externalFilesDir.absolutePath +
|
userDirectory +
|
||||||
"/shader/" + game.settingsName.lowercase()
|
"/cache/shader/" + game.settingsName.lowercase()
|
||||||
)
|
)
|
||||||
if (shaderDir.exists()) {
|
if (shaderDir.exists()) {
|
||||||
shaderDir.deleteRecursively()
|
shaderDir.deleteRecursively()
|
||||||
|
|||||||
Reference in New Issue
Block a user