mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-10-14 19:27:09 -04:00
fix: the Steam Controller's hidraw node reaches the input shim again (#557)
This commit is contained in:
1 parent
3dd14dd625
commit
910fb47692
1 file changed
+2
@@ -1697,6 +1697,7 @@ __attribute__((visibility("hidden"))) static int open_triton_hidraw(int flags) {
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> guard(controller_mutex());
|
||||
deck_map()[pair[0]] = triton;
|
||||
watch_fd(pair[0]);
|
||||
}
|
||||
pthread_t thread;
|
||||
auto *thread_arg = new std::shared_ptr<DeckHidraw>(triton);
|
||||
@@ -1704,6 +1705,7 @@ __attribute__((visibility("hidden"))) static int open_triton_hidraw(int flags) {
|
||||
delete thread_arg;
|
||||
std::lock_guard<std::recursive_mutex> guard(controller_mutex());
|
||||
deck_map().erase(pair[0]);
|
||||
unwatch_fd(pair[0]);
|
||||
syscall(SYS_close, pair[0]);
|
||||
syscall(SYS_close, pair[1]);
|
||||
munmap(mapping, mapping_size);
|
||||
|
||||
Reference in new issue
Block a user