Compare commits

..

1 Commits

Author SHA1 Message Date
lizzie cabccad296 2026-09-05 17:39:32
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2026-09-28 08:07:42 +00:00
3 changed files with 21 additions and 16 deletions
@@ -23,7 +23,6 @@ import org.yuzu.yuzu_emu.model.Driver.Companion.toDriver
import org.yuzu.yuzu_emu.utils.GpuDriverHelper
import org.yuzu.yuzu_emu.NativeLibrary
import org.yuzu.yuzu_emu.utils.GpuDriverMetadata
import org.yuzu.yuzu_emu.utils.DirectoryInitialization
import org.yuzu.yuzu_emu.utils.NativeConfig
import java.io.File
@@ -147,11 +146,11 @@ class DriverViewModel : ViewModel() {
private fun wipeGameShaders(game: Game) {
viewModelScope.launch {
withContext(Dispatchers.IO) {
val userDirectory = DirectoryInitialization.userDirectory
val externalFilesDir = YuzuApplication.appContext.getExternalFilesDir(null)
?: return@withContext
val shaderDir = File(
userDirectory +
"/cache/shader/" + game.settingsName.lowercase()
externalFilesDir.absolutePath +
"/shader/" + game.settingsName.lowercase()
)
if (shaderDir.exists()) {
shaderDir.deleteRecursively()
@@ -28,13 +28,13 @@ object NativeConfig {
* Reads values in the global config file and saves them.
*/
@Synchronized
external fun reloadGlobalConfig()
external fun reloadGlobalConfig(): Boolean
/**
* Saves global settings values in memory to disk.
*/
@Synchronized
external fun saveGlobalConfig()
external fun saveGlobalConfig(): Boolean
/**
* Creates per-game config for the specified parameters. Must be unloaded once per-game config
@@ -54,7 +54,7 @@ object NativeConfig {
* Saves per-game settings values in memory to disk.
*/
@Synchronized
external fun savePerGameConfig()
external fun savePerGameConfig(): Boolean
/**
* Destroys the stored per-game config object. This does not save the config.
+15 -9
View File
@@ -58,13 +58,18 @@ void Java_org_yuzu_yuzu_1emu_utils_NativeConfig_unloadGlobalConfig(JNIEnv* env,
global_config.reset();
}
void Java_org_yuzu_yuzu_1emu_utils_NativeConfig_reloadGlobalConfig(JNIEnv* env, jobject obj) {
global_config->AndroidConfig::ReloadAllValues();
ResetFxChainToGlobal();
jboolean Java_org_yuzu_yuzu_1emu_utils_NativeConfig_reloadGlobalConfig(JNIEnv* env, jobject obj) {
if (global_config) {
global_config->AndroidConfig::ReloadAllValues();
ResetFxChainToGlobal();
}
return global_config != nullptr;
}
void Java_org_yuzu_yuzu_1emu_utils_NativeConfig_saveGlobalConfig(JNIEnv* env, jobject obj) {
global_config->AndroidConfig::SaveAllValues();
jboolean Java_org_yuzu_yuzu_1emu_utils_NativeConfig_saveGlobalConfig(JNIEnv* env, jobject obj) {
if (global_config)
global_config->AndroidConfig::SaveAllValues();
return global_config != nullptr;
}
void Java_org_yuzu_yuzu_1emu_utils_NativeConfig_initializePerGameConfig(JNIEnv* env, jobject obj,
@@ -77,13 +82,14 @@ void Java_org_yuzu_yuzu_1emu_utils_NativeConfig_initializePerGameConfig(JNIEnv*
std::make_unique<AndroidConfig>(config_file_name, Config::ConfigType::PerGameConfig);
}
jboolean Java_org_yuzu_yuzu_1emu_utils_NativeConfig_isPerGameConfigLoaded(JNIEnv* env,
jobject obj) {
jboolean Java_org_yuzu_yuzu_1emu_utils_NativeConfig_isPerGameConfigLoaded(JNIEnv* env, jobject obj) {
return per_game_config != nullptr;
}
void Java_org_yuzu_yuzu_1emu_utils_NativeConfig_savePerGameConfig(JNIEnv* env, jobject obj) {
per_game_config->AndroidConfig::SaveAllValues();
jboolean Java_org_yuzu_yuzu_1emu_utils_NativeConfig_savePerGameConfig(JNIEnv* env, jobject obj) {
if (per_game_config)
per_game_config->AndroidConfig::SaveAllValues();
return per_game_config != nullptr;
}
void Java_org_yuzu_yuzu_1emu_utils_NativeConfig_unloadPerGameConfig(JNIEnv* env, jobject obj) {