Skip to content

Commit

Permalink
UWP: Keep upstream names for capabilities preset settings to avoid mi…
Browse files Browse the repository at this point in the history
…smatch

The previous code used `camelcase_to_underscore` to prettify the names for
display in the export preset, but it leads to inconsistencies if we don't make
sure to do the reverse operation when writing to the `AppxManifest.xml`.

It's simpler to keep the same names as in the manifest, which is also what
users will see referenced in MS documentation.

Fixes godotengine#47900.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
(cherry picked from commit c87e49d)
  • Loading branch information
Gromph authored and akien-mga committed Jun 29, 2021
1 parent 898d404 commit 565d205
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions platform/uwp/export/export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1056,19 +1056,19 @@ class EditorExportPlatformUWP : public EditorExportPlatform {
// Capabilities
const char **basic = uwp_capabilities;
while (*basic) {
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/" + String(*basic).camelcase_to_underscore(false)), false));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/" + String(*basic)), false));
basic++;
}

const char **uap = uwp_uap_capabilities;
while (*uap) {
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/" + String(*uap).camelcase_to_underscore(false)), false));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/" + String(*uap)), false));
uap++;
}

const char **device = uwp_device_capabilities;
while (*device) {
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/" + String(*device).camelcase_to_underscore(false)), false));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/" + String(*device)), false));
device++;
}
}
Expand Down

0 comments on commit 565d205

Please sign in to comment.