diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 88ef59d16..a60718a3e 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -10231,6 +10231,13 @@ public class PApplet implements PConstants { // } sketch.sketchPath = folder; + // Don't set 'args' to a zero-length array if it should be null [3.0a8] + if (args.length != argIndex + 1) { + // pass everything after the class name in as args to the sketch itself + // (fixed for 2.0a5, this was just subsetting by 1, which didn't skip opts) + sketch.args = PApplet.subset(args, argIndex + 1); + } + // Call the settings() method which will give us our size() call // try { sketch.handleSettings(); @@ -10252,13 +10259,6 @@ public class PApplet implements PConstants { // //fullScreen |= sketch.sketchFullScreen(); // sketch.fullScreen |= fullScreen; - // Don't set 'args' to a zero-length array if it should be null [3.0a8] - if (args.length != argIndex + 1) { - // pass everything after the class name in as args to the sketch itself - // (fixed for 2.0a5, this was just subsetting by 1, which didn't skip opts) - sketch.args = PApplet.subset(args, argIndex + 1); - } - sketch.external = external; if (windowColor != 0) {