mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-08 11:25:46 -04:00
update
This commit is contained in:
parent
4e88ff4a56
commit
a69f86a248
@ -44,15 +44,23 @@ public final class EntryPoint {
|
|||||||
System.getProperties().putIfAbsent("javafx.autoproxy.disable", "true");
|
System.getProperties().putIfAbsent("javafx.autoproxy.disable", "true");
|
||||||
System.getProperties().putIfAbsent("http.agent", "HMCL/" + Metadata.VERSION);
|
System.getProperties().putIfAbsent("http.agent", "HMCL/" + Metadata.VERSION);
|
||||||
|
|
||||||
|
createHMCLDirectories();
|
||||||
|
LOG.start(Metadata.HMCL_CURRENT_DIRECTORY.resolve("logs"));
|
||||||
|
|
||||||
if ("true".equalsIgnoreCase(System.getenv("HMCL_FORCE_GPU")))
|
if ("true".equalsIgnoreCase(System.getenv("HMCL_FORCE_GPU")))
|
||||||
System.getProperties().putIfAbsent("prism.forceGPU", "true");
|
System.getProperties().putIfAbsent("prism.forceGPU", "true");
|
||||||
|
|
||||||
String animationFrameRate = System.getenv("HMCL_ANIMATION_FRAME_RATE");
|
String animationFrameRate = System.getenv("HMCL_ANIMATION_FRAME_RATE");
|
||||||
if (animationFrameRate != null)
|
if (animationFrameRate != null) {
|
||||||
System.getProperties().putIfAbsent("javafx.animation.pulse", animationFrameRate);
|
try {
|
||||||
|
if (Integer.parseInt(animationFrameRate) <= 0)
|
||||||
|
throw new NumberFormatException(animationFrameRate);
|
||||||
|
|
||||||
createHMCLDirectories();
|
System.getProperties().putIfAbsent("javafx.animation.pulse", animationFrameRate);
|
||||||
LOG.start(Metadata.HMCL_CURRENT_DIRECTORY.resolve("logs"));
|
} catch (NumberFormatException e) {
|
||||||
|
LOG.warning("Invalid animation frame rate: " + animationFrameRate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
checkDirectoryPath();
|
checkDirectoryPath();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user