mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2025-07-01 23:35:47 +00:00
Cleanup udev code a bit
This commit is contained in:
parent
b1d111b5f7
commit
74714e6fb1
@ -91,10 +91,11 @@ void udev_init(bool autoload, struct mapping* mappings, bool verbose, int rotate
|
|||||||
defaultMappings = mappings;
|
defaultMappings = mappings;
|
||||||
inputRotate = rotate;
|
inputRotate = rotate;
|
||||||
|
|
||||||
int udev_fd = udev_monitor_get_fd(udev_mon);
|
loop_add_fd(udev_monitor_get_fd(udev_mon), &udev_handle, POLLIN);
|
||||||
loop_add_fd(udev_fd, &udev_handle, POLLIN);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void evdev_destroy() {
|
void udev_destroy() {
|
||||||
|
loop_remove_fd(udev_monitor_get_fd(udev_mon));
|
||||||
|
udev_monitor_unref(udev_mon);
|
||||||
udev_unref(udev);
|
udev_unref(udev);
|
||||||
}
|
}
|
||||||
|
@ -20,4 +20,4 @@
|
|||||||
#include "mapping.h"
|
#include "mapping.h"
|
||||||
|
|
||||||
void udev_init(bool autoload, struct mapping* mappings, bool verbose, int rotate);
|
void udev_init(bool autoload, struct mapping* mappings, bool verbose, int rotate);
|
||||||
void evdev_destroy();
|
void udev_destroy();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user