mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-10-26 14:00:08 +00:00
Correctly fetch more than one watcher event list
This commit is contained in:
1 parent
545c3397db
commit
a695b4f3e3
1 file changed
+2
@@ -90,6 +90,7 @@ public class EvdevLoader implements Runnable {
|
|||||||
WatchService watcher = evdev.getFileSystem().newWatchService();
|
WatchService watcher = evdev.getFileSystem().newWatchService();
|
||||||
evdev.register(watcher, StandardWatchEventKinds.ENTRY_CREATE);
|
evdev.register(watcher, StandardWatchEventKinds.ENTRY_CREATE);
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
WatchKey watckKey = watcher.take();
|
WatchKey watckKey = watcher.take();
|
||||||
List<WatchEvent<?>> events = watckKey.pollEvents();
|
List<WatchEvent<?>> events = watckKey.pollEvents();
|
||||||
for (WatchEvent event:events) {
|
for (WatchEvent event:events) {
|
||||||
@@ -101,6 +102,7 @@ public class EvdevLoader implements Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (IOException | InterruptedException ex) {
|
} catch (IOException | InterruptedException ex) {
|
||||||
LimeLog.severe(ex.getMessage());
|
LimeLog.severe(ex.getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user