Remove (probably) unnecessary special case for axis value = 0.

This commit is contained in:
Henrik Rydgård 2023-09-27 17:18:12 +02:00
parent 265a9021fd
commit b3be6db3ae

View file

@ -119,15 +119,7 @@ bool ScreenManager::key(const KeyInput &key) {
void ScreenManager::axis(const AxisInput &axis) {
std::lock_guard<std::recursive_mutex> guard(inputLock_);
// Send center axis to every screen layer.
// TODO: Do we still need this?
if (axis.value == 0) {
for (auto &layer : stack_) {
layer.screen->UnsyncAxis(axis);
}
} else if (!stack_.empty()) {
stack_.back().screen->UnsyncAxis(axis);
}
stack_.back().screen->UnsyncAxis(axis);
}
void ScreenManager::deviceLost() {