mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-10-27 14:30:18 +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();
|
||||
evdev.register(watcher, StandardWatchEventKinds.ENTRY_CREATE);
|
||||
|
||||
for (;;) {
|
||||
WatchKey watckKey = watcher.take();
|
||||
List<WatchEvent<?>> events = watckKey.pollEvents();
|
||||
for (WatchEvent event:events) {
|
||||
@@ -101,6 +102,7 @@ public class EvdevLoader implements Runnable {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException | InterruptedException ex) {
|
||||
LimeLog.severe(ex.getMessage());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user