FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Pass display density from PDE to sketches as a command line arg · GKFX/processing@15941f4 · GitHub

Repository navigation

Commit 15941f4

Browse files
committed
Pass display density from PDE to sketches as a command line arg
1 parent c30503f commit 15941f4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎java/src/processing/mode/java/runner/Runner.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import processing.app.*;
2626
import processing.app.exec.StreamRedirectThread;
27+
import processing.app.ui.Toolkit;
2728
import processing.core.*;
2829
import processing.data.StringList;
2930
import processing.mode.java.JavaBuild;
@@ -466,6 +467,10 @@ protected StringList getSketchParams(boolean present, String[] args) {
466467
// removed for 3.0a6 because it would break the args passed to sketches.
467468
params.append(PApplet.ARGS_SKETCH_FOLDER + "=" + build.getSketchPath());
468469

470+
if (Toolkit.zoom(100) >= 200) { // Use 100 to bypass possible rounding in zoom()
471+
params.append(PApplet.ARGS_DENSITY + "=2");
472+
}
473+
469474
params.append(build.getSketchClassName());
470475
}
471476
// Add command-line arguments to be given to the sketch itself

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL