summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-03-24 10:55:33 +0100
committerGitHub <noreply@github.com>2022-03-24 10:55:33 +0100
commitac2a19cf240f5e9bbc59725a013df0cd2f7f3215 (patch)
treef7f2d23fb202674b5ce71bda9559b2a8594892dc
parent476b8a2249681d8b35bd2bf8ec661db523d5d34b (diff)
parentd8d73cdd023253d778acf0e826b38be4046a6e1f (diff)
Merge pull request #59447 from taigi100/Feature-4244-Add-proper-filters-for-picking-export-template
-rw-r--r--editor/editor_export.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index ad77f4641d..a1081fcbfb 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -1760,8 +1760,9 @@ void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &
}
void EditorExportPlatformPC::get_export_options(List<ExportOption> *r_options) {
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE), ""));
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE), ""));
+ String ext_filter = (get_os_name() == "Windows") ? "*.exe" : "";
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, ext_filter), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, ext_filter), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "debug/export_console_script", PROPERTY_HINT_ENUM, "No,Debug Only,Debug and Release"), 1));