Skip to content

Commit da852b4

Browse files
committed
Fullscreen support
1 parent 44ab816 commit da852b4

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

core/src/processing/core/PApplet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9938,8 +9938,8 @@ static public void runSketch(final String[] args,
99389938
boolean hideStop = false;
99399939

99409940
int displayNum = -1; // use default
9941-
boolean present = false;
9942-
boolean fullScreen = false;
9941+
boolean present = System.getProperty("processing.present", "false").equals("true");
9942+
boolean fullScreen = System.getProperty("processing.fullscreen", "false").equals("true");
99439943
float uiScale = 0;
99449944

99459945
String param, value;

java/gradle/src/main/kotlin/ProcessingPlugin.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import org.gradle.api.internal.tasks.TaskDependencyFactory
88
import org.gradle.api.model.ObjectFactory
99
import org.gradle.api.plugins.JavaPlugin
1010
import org.gradle.api.plugins.JavaPluginExtension
11+
import org.gradle.api.tasks.JavaExec
1112
import org.jetbrains.compose.ComposeExtension
1213
import org.jetbrains.compose.ComposePlugin
1314
import org.jetbrains.compose.desktop.DesktopExtension
@@ -76,10 +77,14 @@ class ProcessingPlugin @Inject constructor(private val objectFactory: ObjectFact
7677
dependsOn("run")
7778
}
7879
project.tasks.create("present").apply {
79-
// TODO: Implement dynamic fullscreen by adding an argument to the task. This will require a change to core
8080
group = "processing"
8181
description = "Presents the Processing sketch"
82-
dependsOn("run")
82+
doFirst{
83+
project.tasks.withType(JavaExec::class.java).configureEach{ task ->
84+
task.systemProperty("processing.fullscreen", "true")
85+
}
86+
}
87+
finalizedBy("run")
8388
}
8489
project.tasks.create("export").apply {
8590
group = "processing"

0 commit comments

Comments
 (0)