Merge pull request #99479 from Sauermann/fix-remove-project-conversion

Remove temporary project conversion
This commit is contained in:
Thaddeus Crews
2025-02-18 07:55:56 -06:00
2 changed files with 0 additions and 26 deletions

View File

@@ -532,24 +532,6 @@ void ProjectSettings::_convert_to_last_version(int p_from_version) {
}
}
}
if (p_from_version == 5) {
// Converts the device in events from -3 to -1.
// -3 was introduced in GH-97707 as a way to prevent a clash in device IDs, but as reported in GH-99243, this leads to problems.
// -3 was used during dev-releases, so this conversion helps to revert such affected projects.
// This conversion doesn't affect any other projects, since -3 is not used otherwise.
for (KeyValue<StringName, ProjectSettings::VariantContainer> &E : props) {
if (String(E.key).begins_with("input/")) {
Dictionary action = E.value.variant;
Array events = action["events"];
for (int i = 0; i < events.size(); i++) {
Ref<InputEvent> ev = events[i];
if (ev.is_valid() && ev->get_device() == -3) {
ev->set_device(-1);
}
}
}
}
}
#endif // DISABLE_DEPRECATED
}