mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-29 09:07:17 -04:00
Init message queues in M0 event dispatcher.
This commit is contained in:
parent
7ec476cb79
commit
0681f9c5df
4 changed files with 14 additions and 14 deletions
|
@ -65,6 +65,8 @@ EventDispatcher::EventDispatcher(
|
|||
painter(painter),
|
||||
context(context)
|
||||
{
|
||||
init_message_queues();
|
||||
|
||||
thread_event_loop = chThdSelf();
|
||||
touch_manager.on_event = [this](const ui::TouchEvent event) {
|
||||
this->on_touch_event(event);
|
||||
|
@ -241,4 +243,13 @@ void EventDispatcher::event_bubble_encoder(const ui::EncoderEvent event) {
|
|||
while( (target != nullptr) && !target->on_encoder(event) ) {
|
||||
target = target->parent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EventDispatcher::init_message_queues() {
|
||||
new (&shared_memory.baseband_queue) MessageQueue(
|
||||
shared_memory.baseband_queue_data, SharedMemory::baseband_queue_k
|
||||
);
|
||||
new (&shared_memory.application_queue) MessageQueue(
|
||||
shared_memory.application_queue_data, SharedMemory::application_queue_k
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue