diff --git a/src/interprocess.cpp b/src/interprocess.cpp index 9d6e86e2..0b08137b 100644 --- a/src/interprocess.cpp +++ b/src/interprocess.cpp @@ -77,5 +77,6 @@ peek_event(Queue* memory, EventType type){ Event pop_event(Queue* queue, EventType type){ queue->events[type].read = true; + BOOST_LOG(info) << "Receive event " << type << ", value: "<< queue->events[type].value_number; return queue->events[type]; } \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 11438c66..7017fae2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -220,8 +220,10 @@ main(int argc, char *argv[]) { framerate->raise(pop_event(queue,EventType::Framerate).value_number); if(peek_event(queue,EventType::Pointer)) display_cursor = pop_event(queue,EventType::Pointer).value_number; - if(peek_event(queue,EventType::Idr)) - idr->raise(pop_event(queue,EventType::Idr).value_number > 0); + if(peek_event(queue,EventType::Idr)) { + pop_event(queue,EventType::Idr); + idr->raise(1); + } std::this_thread::sleep_for(1ms); }