mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-10 04:16:02 -04:00
fix: override options.txt
This commit is contained in:
parent
1d66ebef58
commit
94b2cafa7a
@ -58,10 +58,13 @@ public final class HMCLGameLauncher extends DefaultLauncher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void generateOptionsTxt() {
|
private void generateOptionsTxt() {
|
||||||
|
File optionsFile = new File(repository.getRunDirectory(version.getId()), "options.txt");
|
||||||
|
if (optionsFile.exists())
|
||||||
|
return;
|
||||||
try {
|
try {
|
||||||
// TODO: Dirty implementation here
|
// TODO: Dirty implementation here
|
||||||
if (I18n.getCurrentLocale().getLocale() == Locale.CHINA)
|
if (I18n.getCurrentLocale().getLocale() == Locale.CHINA)
|
||||||
FileUtils.writeText(new File(repository.getRunDirectory(version.getId()), "options.txt"), "lang:zh_cn\nforceUnicodeFont:true\n");
|
FileUtils.writeText(optionsFile, "lang:zh_cn\nforceUnicodeFont:true\n");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Logging.LOG.log(Level.WARNING, "Unable to generate options.txt", e);
|
Logging.LOG.log(Level.WARNING, "Unable to generate options.txt", e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user