Browse Source

Naming project files and using default application paths to find all SDK example executables without having to parse the project files.

David Piuva 3 years ago
parent
commit
1002e70e40

+ 0 - 1
Source/SDK/cube/main.DsrProj → Source/SDK/cube/Cube.DsrProj

@@ -3,7 +3,6 @@ Graphics
 #Sound
 #Sound
 Crawl "main.cpp"
 Crawl "main.cpp"
 Import "../../DFPSR/DFPSR.DsrHead"
 Import "../../DFPSR/DFPSR.DsrHead"
-ProgramPath = "application"
 
 
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 #   Recommended for making an installer for another application or programs that should not need an installer.
 #   Recommended for making an installer for another application or programs that should not need an installer.

+ 2 - 2
Source/SDK/cube/build_linux.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# Launch the build system with main.DsrProj and Linux selected as the platform.
+# Launch the build system with Cube.DsrProj and Linux selected as the platform.
 echo "Running build_linux.sh $@"
 echo "Running build_linux.sh $@"
 chmod +x ../../tools/builder/buildProject.sh;
 chmod +x ../../tools/builder/buildProject.sh;
-../../tools/builder/buildProject.sh main.DsrProj Linux $@;
+../../tools/builder/buildProject.sh Cube.DsrProj Linux $@;

+ 2 - 2
Source/SDK/cube/build_windows.bat

@@ -1,6 +1,6 @@
 @echo off
 @echo off
 
 
-rem Launch the build system with main.DsrProj and Windows selected as the platform.
+rem Launch the build system with Cube.DsrProj and Windows selected as the platform.
 
 
 echo "Running build_windows.bat %@%
 echo "Running build_windows.bat %@%
-../../tools/builder/buildProject.bat main.DsrProj Windows %@%
+../../tools/builder/buildProject.bat Cube.DsrProj Windows %@%

+ 0 - 1
Source/templates/basicCLI/main.DsrProj → Source/SDK/fileFinder/FileFinder.DsrProj

@@ -1,7 +1,6 @@
 # No need to import DFPSR.DsrHead with stub backends when only including essential headers.
 # No need to import DFPSR.DsrHead with stub backends when only including essential headers.
 CompilerFlag "-std=c++14"
 CompilerFlag "-std=c++14"
 Crawl "main.cpp"
 Crawl "main.cpp"
-ProgramPath = "application"
 
 
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 #   Recommended for making an installer for another application or programs that should not need an installer.
 #   Recommended for making an installer for another application or programs that should not need an installer.

+ 2 - 2
Source/SDK/fileFinder/build_linux.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# Launch the build system with main.DsrProj and Linux selected as the platform.
+# Launch the build system with FileFinder.DsrProj and Linux selected as the platform.
 echo "Running build_linux.sh $@"
 echo "Running build_linux.sh $@"
 chmod +x ../../tools/builder/buildProject.sh;
 chmod +x ../../tools/builder/buildProject.sh;
-../../tools/builder/buildProject.sh main.DsrProj Linux $@;
+../../tools/builder/buildProject.sh FileFinder.DsrProj Linux $@;

+ 2 - 2
Source/SDK/fileFinder/build_windows.bat

@@ -1,6 +1,6 @@
 @echo off
 @echo off
 
 
-rem Launch the build system with main.DsrProj and Windows selected as the platform.
+rem Launch the build system with FileFinder.DsrProj and Windows selected as the platform.
 
 
 echo "Running build_windows.bat %@%
 echo "Running build_windows.bat %@%
-../../tools/builder/buildProject.bat main.DsrProj Windows %@%
+../../tools/builder/buildProject.bat FileFinder.DsrProj Windows %@%

+ 0 - 1
Source/SDK/guiExample/main.DsrProj → Source/SDK/guiExample/GuiExample.DsrProj

@@ -3,7 +3,6 @@ Graphics
 #Sound
 #Sound
 Crawl "main.cpp"
 Crawl "main.cpp"
 Import "../../DFPSR/DFPSR.DsrHead"
 Import "../../DFPSR/DFPSR.DsrHead"
-ProgramPath = "application"
 
 
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 #   Recommended for making an installer for another application or programs that should not need an installer.
 #   Recommended for making an installer for another application or programs that should not need an installer.

+ 2 - 2
Source/SDK/guiExample/build_linux.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# Launch the build system with main.DsrProj and Linux selected as the platform.
+# Launch the build system with GuiExample.DsrProj and Linux selected as the platform.
 echo "Running build_linux.sh $@"
 echo "Running build_linux.sh $@"
 chmod +x ../../tools/builder/buildProject.sh;
 chmod +x ../../tools/builder/buildProject.sh;
-../../tools/builder/buildProject.sh main.DsrProj Linux $@;
+../../tools/builder/buildProject.sh GuiExample.DsrProj Linux $@;

+ 2 - 2
Source/SDK/guiExample/build_windows.bat

@@ -1,6 +1,6 @@
 @echo off
 @echo off
 
 
-rem Launch the build system with main.DsrProj and Windows selected as the platform.
+rem Launch the build system with GuiExample.DsrProj and Windows selected as the platform.
 
 
 echo "Running build_windows.bat %@%
 echo "Running build_windows.bat %@%
-../../tools/builder/buildProject.bat main.DsrProj Windows %@%
+../../tools/builder/buildProject.bat GuiExample.DsrProj Windows %@%

+ 0 - 1
Source/SDK/sandbox/main.DsrProj → Source/SDK/sandbox/Sandbox.DsrProj

@@ -11,7 +11,6 @@ Crawl "sandbox.cpp"
 Crawl "tool.cpp"
 Crawl "tool.cpp"
 
 
 Import "../../DFPSR/DFPSR.DsrHead"
 Import "../../DFPSR/DFPSR.DsrHead"
-ProgramPath = "application"
 
 
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 #   Recommended for making an installer for another application or programs that should not need an installer.
 #   Recommended for making an installer for another application or programs that should not need an installer.

+ 2 - 2
Source/SDK/sandbox/build_linux.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# Launch the build system with main.DsrProj and Linux selected as the platform.
+# Launch the build system with Sandbox.DsrProj and Linux selected as the platform.
 echo "Running build_linux.sh $@"
 echo "Running build_linux.sh $@"
 chmod +x ../../tools/builder/buildProject.sh;
 chmod +x ../../tools/builder/buildProject.sh;
-../../tools/builder/buildProject.sh main.DsrProj Linux $@;
+../../tools/builder/buildProject.sh Sandbox.DsrProj Linux $@;

+ 2 - 2
Source/SDK/sandbox/build_windows.bat

@@ -1,6 +1,6 @@
 @echo off
 @echo off
 
 
-rem Launch the build system with main.DsrProj and Windows selected as the platform.
+rem Launch the build system with Sandbox.DsrProj and Windows selected as the platform.
 
 
 echo "Running build_windows.bat %@%
 echo "Running build_windows.bat %@%
-../../tools/builder/buildProject.bat main.DsrProj Windows %@%
+../../tools/builder/buildProject.bat Sandbox.DsrProj Windows %@%

+ 0 - 1
Source/SDK/terrain/main.DsrProj → Source/SDK/terrain/Terrain.DsrProj

@@ -3,7 +3,6 @@ Graphics
 #Sound
 #Sound
 Crawl "main.cpp"
 Crawl "main.cpp"
 Import "../../DFPSR/DFPSR.DsrHead"
 Import "../../DFPSR/DFPSR.DsrHead"
-ProgramPath = "application"
 
 
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 #   Recommended for making an installer for another application or programs that should not need an installer.
 #   Recommended for making an installer for another application or programs that should not need an installer.

+ 2 - 2
Source/SDK/terrain/build_linux.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# Launch the build system with main.DsrProj and Linux selected as the platform.
+# Launch the build system with Terrain.DsrProj and Linux selected as the platform.
 echo "Running build_linux.sh $@"
 echo "Running build_linux.sh $@"
 chmod +x ../../tools/builder/buildProject.sh;
 chmod +x ../../tools/builder/buildProject.sh;
-../../tools/builder/buildProject.sh main.DsrProj Linux $@;
+../../tools/builder/buildProject.sh Terrain.DsrProj Linux $@;

+ 2 - 2
Source/SDK/terrain/build_windows.bat

@@ -1,6 +1,6 @@
 @echo off
 @echo off
 
 
-rem Launch the build system with main.DsrProj and Windows selected as the platform.
+rem Launch the build system with Terrain.DsrProj and Windows selected as the platform.
 
 
 echo "Running build_windows.bat %@%
 echo "Running build_windows.bat %@%
-../../tools/builder/buildProject.bat main.DsrProj Windows %@%
+../../tools/builder/buildProject.bat Terrain.DsrProj Windows %@%

+ 0 - 1
Source/templates/basicGUI/main.DsrProj → Source/templates/basic3D/Basic3D.DsrProj

@@ -3,7 +3,6 @@ Graphics
 Sound
 Sound
 Crawl "main.cpp"
 Crawl "main.cpp"
 Import "../../DFPSR/DFPSR.DsrHead"
 Import "../../DFPSR/DFPSR.DsrHead"
-ProgramPath = "application"
 
 
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 #   Recommended for making an installer for another application or programs that should not need an installer.
 #   Recommended for making an installer for another application or programs that should not need an installer.

+ 2 - 2
Source/templates/basic3D/build_linux.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# Launch the build system with main.DsrProj and Linux selected as the platform.
+# Launch the build system with Basic3D.DsrProj and Linux selected as the platform.
 echo "Running build_linux.sh $@"
 echo "Running build_linux.sh $@"
 chmod +x ../../tools/builder/buildProject.sh;
 chmod +x ../../tools/builder/buildProject.sh;
-../../tools/builder/buildProject.sh main.DsrProj Linux $@;
+../../tools/builder/buildProject.sh Basic3D.DsrProj Linux $@;

+ 2 - 2
Source/templates/basic3D/build_windows.bat

@@ -1,6 +1,6 @@
 @echo off
 @echo off
 
 
-rem Launch the build system with main.DsrProj and Windows selected as the platform.
+rem Launch the build system with Basic3D.DsrProj and Windows selected as the platform.
 
 
 echo "Running build_windows.bat %@%
 echo "Running build_windows.bat %@%
-../../tools/builder/buildProject.bat main.DsrProj Windows %@%
+../../tools/builder/buildProject.bat Basic3D.DsrProj Windows %@%

+ 0 - 1
Source/SDK/fileFinder/main.DsrProj → Source/templates/basicCLI/BasicCLI.DsrProj

@@ -1,7 +1,6 @@
 # No need to import DFPSR.DsrHead with stub backends when only including essential headers.
 # No need to import DFPSR.DsrHead with stub backends when only including essential headers.
 CompilerFlag "-std=c++14"
 CompilerFlag "-std=c++14"
 Crawl "main.cpp"
 Crawl "main.cpp"
-ProgramPath = "application"
 
 
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 #   Recommended for making an installer for another application or programs that should not need an installer.
 #   Recommended for making an installer for another application or programs that should not need an installer.

+ 2 - 2
Source/templates/basicCLI/build_linux.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# Launch the build system with main.DsrProj and Linux selected as the platform.
+# Launch the build system with BasicCLI.DsrProj and Linux selected as the platform.
 echo "Running build_linux.sh $@"
 echo "Running build_linux.sh $@"
 chmod +x ../../tools/builder/buildProject.sh;
 chmod +x ../../tools/builder/buildProject.sh;
-../../tools/builder/buildProject.sh main.DsrProj Linux $@;
+../../tools/builder/buildProject.sh BasicCLI.DsrProj Linux $@;

+ 2 - 2
Source/templates/basicCLI/build_windows.bat

@@ -1,6 +1,6 @@
 @echo off
 @echo off
 
 
-rem Launch the build system with main.DsrProj and Windows selected as the platform.
+rem Launch the build system with BasicCLI.DsrProj and Windows selected as the platform.
 
 
 echo "Running build_windows.bat %@%
 echo "Running build_windows.bat %@%
-../../tools/builder/buildProject.bat main.DsrProj Windows %@%
+../../tools/builder/buildProject.bat BasicCLI.DsrProj Windows %@%

+ 0 - 1
Source/templates/basic3D/main.DsrProj → Source/templates/basicGUI/BasicGUI.DsrProj

@@ -3,7 +3,6 @@ Graphics
 Sound
 Sound
 Crawl "main.cpp"
 Crawl "main.cpp"
 Import "../../DFPSR/DFPSR.DsrHead"
 Import "../../DFPSR/DFPSR.DsrHead"
-ProgramPath = "application"
 
 
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 # Linking statically to standard C/C++ libraries allow running the program without installing them.
 #   Recommended for making an installer for another application or programs that should not need an installer.
 #   Recommended for making an installer for another application or programs that should not need an installer.

+ 2 - 2
Source/templates/basicGUI/build_linux.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# Launch the build system with main.DsrProj and Linux selected as the platform.
+# Launch the build system with BasicGUI.DsrProj and Linux selected as the platform.
 echo "Running build_linux.sh $@"
 echo "Running build_linux.sh $@"
 chmod +x ../../tools/builder/buildProject.sh;
 chmod +x ../../tools/builder/buildProject.sh;
-../../tools/builder/buildProject.sh main.DsrProj Linux $@;
+../../tools/builder/buildProject.sh BasicGUI.DsrProj Linux $@;

+ 2 - 2
Source/templates/basicGUI/build_windows.bat

@@ -1,6 +1,6 @@
 @echo off
 @echo off
 
 
-rem Launch the build system with main.DsrProj and Windows selected as the platform.
+rem Launch the build system with BasicGUI.DsrProj and Windows selected as the platform.
 
 
 echo "Running build_windows.bat %@%
 echo "Running build_windows.bat %@%
-../../tools/builder/buildProject.bat main.DsrProj Windows %@%
+../../tools/builder/buildProject.bat BasicGUI.DsrProj Windows %@%

+ 6 - 7
Source/tools/wizard/main.DsrProj → Source/tools/wizard/Wizard.DsrProj

@@ -2,9 +2,12 @@
 # The caller should provide the operating system's name (Windows, Linux)
 # The caller should provide the operating system's name (Windows, Linux)
 Message "Starting main.DsrProj\n"
 Message "Starting main.DsrProj\n"
 
 
-# The wizard application is used to launch applications, so make sure that they are built before launching the selection menu.
-Build "../../SDK" SkipIfBinaryExists Supressed
-Build "../../templates" SkipIfBinaryExists Supressed
+# Give the Skip flag when compiling to only compile the wizard program itself.
+if !(Skip)
+	# The wizard application is used to launch applications, so make sure that they are built before launching the selection menu.
+	Build "../../SDK" SkipIfBinaryExists Supressed
+	Build "../../templates" SkipIfBinaryExists Supressed
+end if
 
 
 Message "Done with building the examples and continuing with building main.DsrProj\n"
 Message "Done with building the examples and continuing with building main.DsrProj\n"
 
 
@@ -30,8 +33,4 @@ Crawl "main.cpp"
 # Enable to compile a debug version
 # Enable to compile a debug version
 # Debug
 # Debug
 
 
-# Extensionless path to the generated binary for this project.
-# Will automatically be named on each operating system.
-ProgramPath = "wizard"
-
 Message "Ending main.DsrProj\n"
 Message "Ending main.DsrProj\n"

+ 2 - 2
Source/tools/wizard/build_linux.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# Launch the build system with main.DsrProj and Linux selected as the platform.
+# Launch the build system with Wizard.DsrProj and Linux selected as the platform.
 echo "Running build_linux.sh $@"
 echo "Running build_linux.sh $@"
 chmod +x ../builder/buildProject.sh;
 chmod +x ../builder/buildProject.sh;
-../builder/buildProject.sh main.DsrProj Linux $@;
+../builder/buildProject.sh Wizard.DsrProj Linux $@;

+ 2 - 2
Source/tools/wizard/build_windows.bat

@@ -1,7 +1,7 @@
 @echo off
 @echo off
 
 
-rem Launch the build system with main.DsrProj and Windows selected as the platform.
+rem Launch the build system with Wizard.DsrProj and Windows selected as the platform.
 
 
 echo "Running build_windows.bat %@%
 echo "Running build_windows.bat %@%
 
 
-../builder/buildProject.bat main.DsrProj Windows %@%
+../builder/buildProject.bat Wizard.DsrProj Windows %@%

+ 65 - 15
Source/tools/wizard/main.cpp

@@ -80,18 +80,31 @@ Component previewPicture;
 int boomSound;
 int boomSound;
 
 
 struct Project {
 struct Project {
-	String buildScript; // To execute
+	String projectFilePath;
+	String executableFilePath;
 	String title; // To display
 	String title; // To display
 	String description; // To show when selected
 	String description; // To show when selected
+	DsrProcess programHandle;
+	DsrProcessStatus lastStatus = DsrProcessStatus::NotStarted;
 	OrderedImageRgbaU8 preview;
 	OrderedImageRgbaU8 preview;
-	Project(const ReadableString &buildScript);
+	Project(const ReadableString &projectFilePath);
 };
 };
 List<Project> projects;
 List<Project> projects;
 
 
-Project::Project(const ReadableString &buildScript)
-: buildScript(buildScript) {
-	String projectFolderPath = file_getRelativeParentFolder(buildScript);
-	this->title = file_getPathlessName(projectFolderPath);
+Project::Project(const ReadableString &projectFilePath)
+: projectFilePath(projectFilePath) {
+	String projectFolderPath = file_getRelativeParentFolder(projectFilePath);
+	String extensionlessProjectPath = file_getExtensionless(projectFilePath);
+	this->title = file_getPathlessName(extensionlessProjectPath);
+	// TODO: Get the native extension for each type of file? .exe, .dll, .so...
+	#ifdef USE_MICROSOFT_WINDOWS
+		this->executableFilePath = string_combine(extensionlessProjectPath, U".exe");
+	#else
+		this->executableFilePath = extensionlessProjectPath;
+	#endif
+	if (file_getEntryType(this->executableFilePath) != EntryType::File) {
+		this->executableFilePath = U"";
+	}
 	String descriptionPath = file_combinePaths(projectFolderPath, U"Description.txt");
 	String descriptionPath = file_combinePaths(projectFolderPath, U"Description.txt");
 	if (file_getEntryType(descriptionPath) == EntryType::File) {
 	if (file_getEntryType(descriptionPath) == EntryType::File) {
 		this->description = string_load(descriptionPath);
 		this->description = string_load(descriptionPath);
@@ -136,7 +149,7 @@ static void findProjects(const ReadableString& folderPath) {
 			// If we find a project within folderPath...
 			// If we find a project within folderPath...
 			if (string_match(extension, U"DSRPROJ")) {
 			if (string_match(extension, U"DSRPROJ")) {
 				// ...and the folder is not namned wizard...
 				// ...and the folder is not namned wizard...
-				if (!string_match(newProject.title, U"wizard")) {
+				if (!string_match(newProject.title, U"Wizard")) {
 					// ...then add it to the list of projects.
 					// ...then add it to the list of projects.
 					projects.push(newProject);
 					projects.push(newProject);
 				}
 				}
@@ -145,14 +158,40 @@ static void findProjects(const ReadableString& folderPath) {
 	});
 	});
 }
 }
 
 
-static void selectProject(int64_t index) {
-	int oldIndex = component_getProperty_integer(projectList, U"SelectedIndex", true);
+// Returns true iff the interface needs to be redrawn.
+static bool updateInterface(bool forceUpdate) {
+	bool needToDraw = false;
+	int projectIndex = component_getProperty_integer(projectList, U"SelectedIndex", true);
+	//Application name from project name?
+	if (projectIndex >= 0 && projectIndex < projects.length()) {
+		DsrProcessStatus newStatus = process_getStatus(projects[projectIndex].programHandle);
+		DsrProcessStatus lastStatus = projects[projectIndex].lastStatus;
+		if (newStatus != lastStatus || forceUpdate) {
+			if (newStatus == DsrProcessStatus::Running) {
+				component_setProperty_string(descriptionLabel, U"Text", string_combine(projects[projectIndex].title, U" is running."));
+			} else if (newStatus == DsrProcessStatus::Crashed) {
+				component_setProperty_string(descriptionLabel, U"Text", string_combine(projects[projectIndex].title, U" crashed."));
+			} else if (newStatus == DsrProcessStatus::Completed) {
+				component_setProperty_string(descriptionLabel, U"Text", string_combine(projects[projectIndex].title, U" terminated safely."));
+			} else if (newStatus == DsrProcessStatus::NotStarted) {
+				component_setProperty_string(descriptionLabel, U"Text", projects[projectIndex].description);
+			}
+			needToDraw = true;
+			projects[projectIndex].lastStatus = newStatus;
+		}
+		component_setProperty_image(previewPicture, U"Image", projects[projectIndex].preview, false);
+		bool foundExecutable = string_length(projects[projectIndex].executableFilePath) > 0;
+		component_setProperty_integer(launchButton, U"Visible", foundExecutable);
+	}
+	return needToDraw;
+}
+
+static void selectProject(int64_t projectIndex) {
 	// Don't trigger new events if the selected index is already updated manually.
 	// Don't trigger new events if the selected index is already updated manually.
-	if (index != oldIndex) {
-		component_setProperty_integer(projectList, U"SelectedIndex", index, false);
+	if (projectIndex != component_getProperty_integer(projectList, U"SelectedIndex", true)) {
+		component_setProperty_integer(projectList, U"SelectedIndex", projectIndex, false);
 	}
 	}
-	component_setProperty_string(descriptionLabel, U"Text", projects[index].description);
-	component_setProperty_image(previewPicture, U"Image", projects[index].preview, false);
+	updateInterface(true);
 }
 }
 
 
 static void populateInterface(const ReadableString& folderPath) {
 static void populateInterface(const ReadableString& folderPath) {
@@ -197,7 +236,18 @@ void dsrMain(List<String> args) {
 	component_setPressedEvent(launchButton, []() {
 	component_setPressedEvent(launchButton, []() {
 		// TODO: Implement building and running of the selected project.
 		// TODO: Implement building and running of the selected project.
 		playSound(boomSound, false, 1.0, 1.0, 0.7);
 		playSound(boomSound, false, 1.0, 1.0, 0.7);
-		component_setProperty_string(descriptionLabel, U"Text", U"Running projects from the wizard application is not yet implemented.");
+		int projectIndex = component_getProperty_integer(projectList, U"SelectedIndex", true);
+		//Application name from project name?
+		if (projectIndex >= 0 && projectIndex < projects.length()) {
+			if (file_getEntryType(projects[projectIndex].executableFilePath) != EntryType::File) {
+				// Could not find the application.
+				component_setProperty_string(descriptionLabel, U"Text", string_combine(U"Could not find the executable at ", projects[projectIndex].executableFilePath, U"!\n"), true);
+			} else if (process_getStatus(projects[projectIndex].programHandle) != DsrProcessStatus::Running) {
+				// Launch the application.
+				projects[projectIndex].programHandle = process_execute(projects[projectIndex].executableFilePath, List<String>());
+				updateInterface(true);
+			}
+		}
 	});
 	});
 	component_setSelectEvent(projectList, [](int64_t index) {
 	component_setSelectEvent(projectList, [](int64_t index) {
 		playSound(boomSound, false, 0.5, 0.5, 0.5);
 		playSound(boomSound, false, 0.5, 0.5, 0.5);
@@ -212,7 +262,7 @@ void dsrMain(List<String> args) {
 	while(running) {
 	while(running) {
 		// Wait for actions so that we don't render until an action has been recieved
 		// Wait for actions so that we don't render until an action has been recieved
 		// This will save battery on laptops for applications that don't require animation
 		// This will save battery on laptops for applications that don't require animation
-		while (!window_executeEvents(window)) {
+		while (!(window_executeEvents(window) || updateInterface(false))) {
 			time_sleepSeconds(0.01);
 			time_sleepSeconds(0.01);
 		}
 		}
 		// Fill the background
 		// Fill the background