This commit is contained in:
Denis 2023-11-06 02:19:04 +01:00
parent a84e4cf872
commit 232c2a9e4b
No known key found for this signature in database
GPG key ID: DD9B63F805CF5C03
2 changed files with 3 additions and 1 deletions

View file

@ -215,7 +215,7 @@ void *input_dev_thread_func(void *ptr) {
pthread_t incoming_events_thread;
const int incoming_events_thread_creation = pthread_create(&incoming_events_thread, NULL, input_read_thread_func, (void*)ctx.dev);
const int incoming_events_thread_creation = pthread_create(&incoming_events_thread, NULL, input_read_thread_func, (void*)&ctx);
if (incoming_events_thread_creation != 0) {
fprintf(stderr, "Error creating the input thread for device %s: %d\n", libevdev_get_name(ctx.dev), incoming_events_thread_creation);
}

View file

@ -164,6 +164,8 @@ void *output_dev_thread_func(void *ptr) {
msg->ev.value
);
// from now on it's forbidden to use this memory
msg->flags |= MESSAGE_FLAGS_HANDLE_DONE;
} else if (pop_res == -1) {
// timed out read
} else {