Fix Input::remove_joy_mapping
#98792
Open
+31
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Erasing a joypad mapping can invalidate other attached joypads and the fallback mapping guid
Fixes #91257 (cannot confirm crash on Linux. Untested on Windows where it was observed)
If this PR is merged, it needs to be cherry-picked/backported to all supported Godot versions, afaik.
NOTE
I'm not sure if I handledfallback_mapping
correctly, because according toInput::is_joy_known
the fallback does not count as a known device… Therefore, feedback on this would be niceIf it's only meant as an internal fallback, a more minimal change of this PR to the fallback logic would be to deny removing the mapping for that one. Then I could remove the setter and getter for the fallback.-> Removed bindingsI renamed some members in windows joypad file to differentiate between direct INPUT and direct X. I found-> Renaming is done in another PRd_joypads
, and it feels like thed_
prefix was meant as a direct input abbreviation. So I used that. I'm open to alternative naming convention, though. Some renaming should happen to untangle INPUT and X.