mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-22 21:03:42 +08:00
修复音频
This commit is contained in:
parent
ed8425a632
commit
6978e2ab87
@ -162,7 +162,8 @@ class LocalizationUIModel extends BaseUIModel {
|
||||
if (!await cfgFile.exists()) return false;
|
||||
final str = (await cfgFile.readAsString()).replaceAll(" ", "");
|
||||
return str.contains("sys_languages=$lang") &&
|
||||
str.contains("g_language=$lang");
|
||||
str.contains("g_language=$lang") &&
|
||||
str.contains("g_languageAudio=english");
|
||||
}
|
||||
|
||||
Future<String> getInstalledIniVersion() async {
|
||||
@ -228,10 +229,12 @@ class LocalizationUIModel extends BaseUIModel {
|
||||
if (enable) {
|
||||
if (exists) {
|
||||
for (var value in str) {
|
||||
if (value.contains("sys_languages=")) {
|
||||
if (value.contains("sys_languages")) {
|
||||
value = "sys_languages=$selectedLanguage";
|
||||
} else if (value.contains("g_language")) {
|
||||
value = "g_language=$selectedLanguage";
|
||||
} else if (value.contains("g_languageAudio")) {
|
||||
value = "g_language=english";
|
||||
}
|
||||
if (value.trim().isNotEmpty) newStr.writeln(value);
|
||||
}
|
||||
@ -242,6 +245,9 @@ class LocalizationUIModel extends BaseUIModel {
|
||||
if (!newStr.toString().contains("g_language=$selectedLanguage")) {
|
||||
newStr.writeln("g_language=$selectedLanguage");
|
||||
}
|
||||
if (!newStr.toString().contains("g_languageAudio")) {
|
||||
newStr.writeln("g_languageAudio=english");
|
||||
}
|
||||
} else {
|
||||
if (exists) {
|
||||
for (var value in str) {
|
||||
|
Loading…
Reference in New Issue
Block a user