mirror of
https://github.com/godotengine/godot.git
synced 2025-11-03 07:01:06 +00:00
Remove temporary project conversion
This project conversion should be removed before the next stable release, because it affects only projects opened during dev-builds.
This commit is contained in:
parent
dc5f1b7a28
commit
ee2930cad4
2 changed files with 0 additions and 26 deletions
|
|
@ -514,24 +514,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
|
#endif // DISABLE_DEPRECATED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,14 +103,6 @@ bool EditorSettings::_set_only(const StringName &p_name, const Variant &p_value)
|
||||||
|
|
||||||
builtin_action_overrides[action_name].clear();
|
builtin_action_overrides[action_name].clear();
|
||||||
for (int ev_idx = 0; ev_idx < events.size(); ev_idx++) {
|
for (int ev_idx = 0; ev_idx < events.size(); ev_idx++) {
|
||||||
#ifndef DISABLE_DEPRECATED
|
|
||||||
// -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 editor shortcuts.
|
|
||||||
Ref<InputEvent> x = events[ev_idx];
|
|
||||||
if (x.is_valid() && x->get_device() == -3) {
|
|
||||||
x->set_device(-1);
|
|
||||||
}
|
|
||||||
#endif // DISABLE_DEPRECATED
|
|
||||||
im->action_add_event(action_name, events[ev_idx]);
|
im->action_add_event(action_name, events[ev_idx]);
|
||||||
builtin_action_overrides[action_name].push_back(events[ev_idx]);
|
builtin_action_overrides[action_name].push_back(events[ev_idx]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue