mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 07:43: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;
|
if (!await cfgFile.exists()) return false;
|
||||||
final str = (await cfgFile.readAsString()).replaceAll(" ", "");
|
final str = (await cfgFile.readAsString()).replaceAll(" ", "");
|
||||||
return str.contains("sys_languages=$lang") &&
|
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 {
|
Future<String> getInstalledIniVersion() async {
|
||||||
@ -228,10 +229,12 @@ class LocalizationUIModel extends BaseUIModel {
|
|||||||
if (enable) {
|
if (enable) {
|
||||||
if (exists) {
|
if (exists) {
|
||||||
for (var value in str) {
|
for (var value in str) {
|
||||||
if (value.contains("sys_languages=")) {
|
if (value.contains("sys_languages")) {
|
||||||
value = "sys_languages=$selectedLanguage";
|
value = "sys_languages=$selectedLanguage";
|
||||||
} else if (value.contains("g_language")) {
|
} else if (value.contains("g_language")) {
|
||||||
value = "g_language=$selectedLanguage";
|
value = "g_language=$selectedLanguage";
|
||||||
|
} else if (value.contains("g_languageAudio")) {
|
||||||
|
value = "g_language=english";
|
||||||
}
|
}
|
||||||
if (value.trim().isNotEmpty) newStr.writeln(value);
|
if (value.trim().isNotEmpty) newStr.writeln(value);
|
||||||
}
|
}
|
||||||
@ -242,6 +245,9 @@ class LocalizationUIModel extends BaseUIModel {
|
|||||||
if (!newStr.toString().contains("g_language=$selectedLanguage")) {
|
if (!newStr.toString().contains("g_language=$selectedLanguage")) {
|
||||||
newStr.writeln("g_language=$selectedLanguage");
|
newStr.writeln("g_language=$selectedLanguage");
|
||||||
}
|
}
|
||||||
|
if (!newStr.toString().contains("g_languageAudio")) {
|
||||||
|
newStr.writeln("g_languageAudio=english");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (exists) {
|
if (exists) {
|
||||||
for (var value in str) {
|
for (var value in str) {
|
||||||
|
Loading…
Reference in New Issue
Block a user