Remove return value from axis functions in API

This commit is contained in:
Henrik Rydgård committed 2023-01-10 10:12:37 +01:00
1 parent a3a949f5e6
commit 07114c6aaf
18 files changed
+52 -72

No files matched your search

+1 -5
View File
@@ -117,20 +117,16 @@ bool ControlMapper::Key(const KeyInput &key, bool *pauseTrigger) {
return pspKeys.size() > 0;
}
bool ControlMapper::Axis(const AxisInput &axis) {
void ControlMapper::Axis(const AxisInput &axis) {
if (axis.value > 0) {
processAxis(axis, 1);
return true;
} else if (axis.value < 0) {
processAxis(axis, -1);
return true;
} else if (axis.value == 0) {
// Both directions! Prevents sticking for digital input devices that are axises (like HAT)
processAxis(axis, 1);
processAxis(axis, -1);
return true;
}
return false;
}
void ControlMapper::Update() {