mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-2305 jcef: jb/java/jcef/JCEFStartupTest.java throws java.lang.ExceptionInInitializerError
(cherry picked from commit f0385f01ec)
This commit is contained in:
committed by
alexey.ushakov@jetbrains.com
parent
30ab20a3e1
commit
d6d9106a41
@@ -129,8 +129,10 @@ public abstract class JBCefApp {
|
||||
settings.resources_dir_path = JCEF_PATH;
|
||||
settings.locales_dir_path = JCEF_PATH + "/locales";
|
||||
settings.browser_subprocess_path = JCEF_PATH + "/jcef_helper";
|
||||
double scale = sysScale();
|
||||
System.setProperty("jcef.forceDeviceScaleFactor", Double.toString(scale));
|
||||
return new String[] {
|
||||
"--force-device-scale-factor=" + sysScale()
|
||||
"--force-device-scale-factor=" + scale
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -152,7 +154,7 @@ public abstract class JBCefApp {
|
||||
|
||||
public static double sysScale() {
|
||||
try {
|
||||
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration().getDefaultTransform().getScaleX();
|
||||
return GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration().getDefaultTransform().getScaleX();
|
||||
} catch (NullPointerException ignore) {}
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user