File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
HMCL/src/main/java/org/jackhuang/hmcl Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,21 @@ public static void main(String[] args) {
6262 createHMCLDirectories ();
6363 LOG .start (Metadata .HMCL_CURRENT_DIRECTORY .resolve ("logs" ));
6464
65+ if ("true" .equalsIgnoreCase (System .getenv ("HMCL_FORCE_GPU" )))
66+ System .getProperties ().putIfAbsent ("prism.forceGPU" , "true" );
67+
68+ String animationFrameRate = System .getenv ("HMCL_ANIMATION_FRAME_RATE" );
69+ if (animationFrameRate != null ) {
70+ try {
71+ if (Integer .parseInt (animationFrameRate ) <= 0 )
72+ throw new NumberFormatException (animationFrameRate );
73+
74+ System .getProperties ().putIfAbsent ("javafx.animation.pulse" , animationFrameRate );
75+ } catch (NumberFormatException e ) {
76+ LOG .warning ("Invalid animation frame rate: " + animationFrameRate );
77+ }
78+ }
79+
6580 checkDirectoryPath ();
6681
6782 if (JavaRuntime .CURRENT_VERSION < 9 )
You can’t perform that action at this time.
0 commit comments