[Input] Handle invalid input/ settings correctly

This prefix is reserved for events
This commit is contained in:
A Thousand Ships
2026-01-30 14:37:46 +01:00
parent f4f0679a2d
commit d3924468a4
2 changed files with 10 additions and 0 deletions

View File

@@ -317,6 +317,11 @@ void InputMap::load_from_project_settings() {
String name = pi.name.substr(pi.name.find_char('/') + 1);
Dictionary action = GLOBAL_GET(pi.name);
if (!action.has("events")) {
continue;
}
float deadzone = action.has("deadzone") ? (float)action["deadzone"] : DEFAULT_DEADZONE;
Array events = action["events"];