Skip to content

Commit 80dc706

Browse files
committed
Fix opening from Note Block World shows running from IDE
1 parent c592e9f commit 80dc706

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

scripts/control_create/control_create.gml

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ function control_create() {
1111
lib_init()
1212

1313
// Window
14-
#macro RUN_FROM_IDE parameter_count()==3&&string_count("GMS2TEMP",parameter_string(2))
14+
#macro RUN_FROM_IDE !string_count("GMS2TEMP", get_execution_command()) // THIS CONSTANT IS A REVERSE BOOLEAN (0 is from IDE)
15+
//show_message(get_execution_command() + "IDE: " + string(RUN_FROM_IDE))
1516
p_num = parameter_count()
1617
isplayer = 0
1718
for (var i = 0; i < p_num; i += 1) {

scripts/get_execution_command/get_execution_command.gml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function get_execution_command(){
44
p_str = ""
55
if (p_num > 0) {
66
for (var i = 0; i <= p_num; i++) {
7-
p_str += parameter_string(i)
7+
p_str += parameter_string(i) + " "
88
}
99
}
1010
return p_str

scripts/register_url_protocol/register_url_protocol.gml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function register_url_protocol() {
22

33
// We don't want to register the debug executable as a handler
4-
if (RUN_FROM_IDE) return;
4+
if (!RUN_FROM_IDE) return;
55

66
// Get NBS executable filename (first command line argument)
77
var nbs_executable = string_replace_all(parameter_string(0), "/", "\\");

0 commit comments

Comments
 (0)