mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-25 15:56:01 +00: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());
|
std::lock_guard<std::recursive_mutex> guard(controller_mutex());
|
||||||
deck_map()[pair[0]] = triton;
|
deck_map()[pair[0]] = triton;
|
||||||
|
watch_fd(pair[0]);
|
||||||
}
|
}
|
||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
auto *thread_arg = new std::shared_ptr<DeckHidraw>(triton);
|
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;
|
delete thread_arg;
|
||||||
std::lock_guard<std::recursive_mutex> guard(controller_mutex());
|
std::lock_guard<std::recursive_mutex> guard(controller_mutex());
|
||||||
deck_map().erase(pair[0]);
|
deck_map().erase(pair[0]);
|
||||||
|
unwatch_fd(pair[0]);
|
||||||
syscall(SYS_close, pair[0]);
|
syscall(SYS_close, pair[0]);
|
||||||
syscall(SYS_close, pair[1]);
|
syscall(SYS_close, pair[1]);
|
||||||
munmap(mapping, mapping_size);
|
munmap(mapping, mapping_size);
|
||||||
|
|||||||
Reference in new issue
Block a user