summaryrefslogtreecommitdiffstats
path: root/platform/web/export/export_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-05-17 11:14:15 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-05-17 11:14:15 +0200
commit375e5be340c9e37ff1993964d03853ef1657bc43 (patch)
treee34caf45e35b86c51b2df026a4e21f9320b6b568 /platform/web/export/export_plugin.cpp
parente1f72c7ca63e194302a65019affb302c4546e760 (diff)
parent04aaa860391a8d874cbe17abf983f362be06f019 (diff)
downloadredot-engine-375e5be340c9e37ff1993964d03853ef1657bc43.tar.gz
Merge pull request #92032 from hakro/fix-oneclick-web-always-on
Disable remote debug button when there are no runnable presets
Diffstat (limited to 'platform/web/export/export_plugin.cpp')
-rw-r--r--platform/web/export/export_plugin.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/web/export/export_plugin.cpp b/platform/web/export/export_plugin.cpp
index 0bf3927e14..06dfe7d646 100644
--- a/platform/web/export/export_plugin.cpp
+++ b/platform/web/export/export_plugin.cpp
@@ -585,17 +585,20 @@ bool EditorExportPlatformWeb::poll_export() {
}
}
+ int prev = menu_options;
+ menu_options = preset.is_valid();
HTTPServerState prev_server_state = server_state;
server_state = HTTP_SERVER_STATE_OFF;
if (server->is_listening()) {
- if (preset.is_null()) {
+ if (preset.is_null() || menu_options == 0) {
server->stop();
} else {
server_state = HTTP_SERVER_STATE_ON;
+ menu_options += 1;
}
}
- return server_state != prev_server_state;
+ return server_state != prev_server_state || menu_options != prev;
}
Ref<ImageTexture> EditorExportPlatformWeb::get_option_icon(int p_index) const {