mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge pull request #4220 from JakubValtar/fix-args-settings
Initialize sketch args before calling settings()
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user