mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-21 23:57:44 +00:00
added usb event to not wait for the next frame (#1733)
This commit is contained in:
@@ -113,7 +113,6 @@ void EventDispatcher::run() {
|
||||
while (is_running) {
|
||||
const auto events = wait();
|
||||
dispatch(events);
|
||||
portapack::usb_serial.dispatch();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,6 +162,10 @@ void EventDispatcher::dispatch(const eventmask_t events) {
|
||||
handle_rtc_tick();
|
||||
}
|
||||
|
||||
if (events & EVT_MASK_USB) {
|
||||
handle_usb();
|
||||
}
|
||||
|
||||
if (events & EVT_MASK_SWITCHES) {
|
||||
handle_switches();
|
||||
}
|
||||
@@ -216,6 +219,10 @@ void EventDispatcher::handle_rtc_tick() {
|
||||
portapack::persistent_memory::cache::persist();
|
||||
}
|
||||
|
||||
void EventDispatcher::handle_usb() {
|
||||
portapack::usb_serial.dispatch();
|
||||
}
|
||||
|
||||
ui::Widget* EventDispatcher::touch_widget(ui::Widget* const w, ui::TouchEvent event) {
|
||||
if (!w->hidden()) {
|
||||
// To achieve reverse depth ordering (last object drawn is
|
||||
|
Reference in New Issue
Block a user