@@ -161,15 +161,6 @@ static private void createAndShowGUI(String[] args) {
161
161
// call after Platform.init() because we need the settings folder
162
162
Console .startup ();
163
163
164
- /*
165
- // working on https://github.com/processing/processing4/issues/231
166
- // and https://github.com/processing/processing4/issues/226
167
- System.out.println("retina is " + Toolkit.isRetina());
168
- System.out.println("system zoom " + Platform.getSystemZoom());
169
- System.out.println("java2d param is " + System.getProperty("sun.java2d.uiScale.enabled"));
170
- System.out.println("toolkit res is " + java.awt.Toolkit.getDefaultToolkit().getScreenResolution());
171
- */
172
-
173
164
// Set the debug flag based on a file being present in the settings folder
174
165
File debugFile = getSettingsFile ("debug" );
175
166
@@ -241,6 +232,7 @@ static private void createAndShowGUI(String[] args) {
241
232
SingleInstance .startServer (base );
242
233
243
234
handleWelcomeScreen (base );
235
+ handleCrustyDisplay ();
244
236
//checkDriverBug(); // that was 2017, right?
245
237
246
238
} catch (Throwable t ) {
@@ -337,6 +329,31 @@ static private void checkDriverBug() {
337
329
*/
338
330
339
331
332
+ /**
333
+ * Temporary workaround as we try to sort out
334
+ * https://github.com/processing/processing4/issues/231
335
+ * and https://github.com/processing/processing4/issues/226
336
+ */
337
+ static private void handleCrustyDisplay () {
338
+ /*
339
+ System.out.println("retina is " + Toolkit.isRetina());
340
+ System.out.println("system zoom " + Platform.getSystemZoom());
341
+ System.out.println("java2d param is " + System.getProperty("sun.java2d.uiScale.enabled"));
342
+ System.out.println("toolkit res is " + java.awt.Toolkit.getDefaultToolkit().getScreenResolution());
343
+ */
344
+ if (Platform .isWindows ()) { // only an issue on Windows
345
+ if (!Toolkit .isRetina () && !Splash .getDisableHiDPI ()) {
346
+ int res = java .awt .Toolkit .getDefaultToolkit ().getScreenResolution ();
347
+ if (res % 96 != 0 ) {
348
+ // fractional dpi scaling on a low-res screen
349
+ System .out .println ("If the editor cursor is in the wrong place or the interface is blocky or fuzzy," );
350
+ System .out .println ("open Preferences and select the “Disable HiDPI Scaling” option to fix it." );
351
+ }
352
+ }
353
+ }
354
+ }
355
+
356
+
340
357
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
341
358
342
359
0 commit comments