Batch axis events all the way into ControlMapper

This commit is contained in:
Henrik Rydgård committed 2023-09-29 11:14:19 +02:00
1 parent b3a2b7a35c
commit ee93e4a2ca
9 files changed
+37 -33

No files matched your search

+5 -3
View File
@@ -99,12 +99,14 @@ bool UIScreen::UnsyncTouch(const TouchInput &touch) {
return false;
}
void UIScreen::UnsyncAxis(const AxisInput &axis) {
void UIScreen::UnsyncAxis(const AxisInput *axes, size_t count) {
QueuedEvent ev{};
ev.type = QueuedEventType::AXIS;
ev.axis = axis;
std::lock_guard<std::mutex> guard(eventQueueLock_);
eventQueue_.push_back(ev);
for (size_t i = 0; i < count; i++) {
ev.axis = axes[i];
eventQueue_.push_back(ev);
}
}
bool UIScreen::UnsyncKey(const KeyInput &key) {