mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-13 05:46:59 -04:00
* #1998: Log prism pipeline name * update * update
This commit is contained in:
parent
41620dcd70
commit
bbe0a3f567
@ -125,6 +125,7 @@ tasks.getByName<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("sha
|
|||||||
"javafx.base/com.sun.javafx.runtime",
|
"javafx.base/com.sun.javafx.runtime",
|
||||||
"javafx.graphics/javafx.css",
|
"javafx.graphics/javafx.css",
|
||||||
"javafx.graphics/com.sun.javafx.stage",
|
"javafx.graphics/com.sun.javafx.stage",
|
||||||
|
"javafx.graphics/com.sun.prism",
|
||||||
"javafx.controls/com.sun.javafx.scene.control",
|
"javafx.controls/com.sun.javafx.scene.control",
|
||||||
"javafx.controls/com.sun.javafx.scene.control.behavior",
|
"javafx.controls/com.sun.javafx.scene.control.behavior",
|
||||||
"javafx.controls/javafx.scene.control.skin"
|
"javafx.controls/javafx.scene.control.skin"
|
||||||
|
@ -65,6 +65,13 @@ public final class Launcher extends Application {
|
|||||||
|
|
||||||
CookieHandler.setDefault(COOKIE_MANAGER);
|
CookieHandler.setDefault(COOKIE_MANAGER);
|
||||||
|
|
||||||
|
try {
|
||||||
|
Object pipeline = Class.forName("com.sun.prism.GraphicsPipeline").getMethod("getPipeline").invoke(null);
|
||||||
|
LOG.info("Prism pipeline: " + (pipeline == null ? "null" : pipeline.getClass().getName()));
|
||||||
|
} catch (Throwable e) {
|
||||||
|
LOG.log(Level.WARNING, "Failed to get prism pipeline", e);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
try {
|
try {
|
||||||
ConfigHolder.init();
|
ConfigHolder.init();
|
||||||
@ -218,8 +225,11 @@ public final class Launcher extends Application {
|
|||||||
LOG.info("HMCL Directory: " + Metadata.HMCL_DIRECTORY);
|
LOG.info("HMCL Directory: " + Metadata.HMCL_DIRECTORY);
|
||||||
LOG.info("HMCL Jar Path: " + JarUtils.thisJar().map(it -> it.toAbsolutePath().toString()).orElse("Not Found"));
|
LOG.info("HMCL Jar Path: " + JarUtils.thisJar().map(it -> it.toAbsolutePath().toString()).orElse("Not Found"));
|
||||||
LOG.info("Memory: " + Runtime.getRuntime().maxMemory() / 1024 / 1024 + "MB");
|
LOG.info("Memory: " + Runtime.getRuntime().maxMemory() / 1024 / 1024 + "MB");
|
||||||
ManagementFactory.getMemoryPoolMXBeans().stream().filter(bean -> bean.getName().equals("Metaspace")).findAny()
|
LOG.info("Metaspace: " + ManagementFactory.getMemoryPoolMXBeans().stream()
|
||||||
.ifPresent(bean -> LOG.info("Metaspace: " + bean.getUsage().getUsed() / 1024 / 1024 + "MB"));
|
.filter(bean -> bean.getName().equals("Metaspace"))
|
||||||
|
.findAny()
|
||||||
|
.map(bean -> bean.getUsage().getUsed() / 1024 / 1024 + "MB")
|
||||||
|
.orElse("Unknown"));
|
||||||
|
|
||||||
launch(Launcher.class, args);
|
launch(Launcher.class, args);
|
||||||
} catch (Throwable e) { // Fucking JavaFX will suppress the exception and will break our crash reporter.
|
} catch (Throwable e) { // Fucking JavaFX will suppress the exception and will break our crash reporter.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user