diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2025-03-01 14:34:25 -0500 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2025-03-01 14:34:25 -0500 |
commit | e603acd4828053fdfdaf245992322b8533f667d8 (patch) | |
tree | a7fa7fcf00e3f1bfdfc9f7e4fe442725cde3e915 /patches/xow | |
parent | f043102d16a32a845501eda0b536feebad72db4a (diff) |
Delete old config
Diffstat (limited to 'patches/xow')
-rw-r--r-- | patches/xow/0001-Single-controller-patch.patch | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/patches/xow/0001-Single-controller-patch.patch b/patches/xow/0001-Single-controller-patch.patch deleted file mode 100644 index b56270a..0000000 --- a/patches/xow/0001-Single-controller-patch.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 8937ae5e05e64c884b9f8d0736628a596bba6728 Mon Sep 17 00:00:00 2001 -From: Kjetil Orbekk <kj@orbekk.com> -Date: Mon, 22 Feb 2021 08:17:49 -0500 -Subject: [PATCH] Single controller patch - ---- - controller/controller.cpp | 6 ++++++ - controller/controller.h | 1 + - dongle/dongle.cpp | 13 +++++++++---- - 3 files changed, 16 insertions(+), 4 deletions(-) - -diff --git a/controller/controller.cpp b/controller/controller.cpp -index d138e0c..83640ea 100644 ---- a/controller/controller.cpp -+++ b/controller/controller.cpp -@@ -171,6 +171,12 @@ void Controller::initInput(const AnnounceData *announce) - return; - } - -+ if (initialized) { -+ Log::info("HACK: Skip initialization because of reute"); -+ return; -+ } -+ initialized = true; -+ - InputDevice::AxisConfig stickConfig = {}; - - // 16 bits (signed) for the sticks -diff --git a/controller/controller.h b/controller/controller.h -index 5486895..cd11853 100644 ---- a/controller/controller.h -+++ b/controller/controller.h -@@ -52,4 +52,5 @@ private: - InputDevice inputDevice; - - uint8_t batteryLevel = 0xff; -+ bool initialized = false; - }; -diff --git a/dongle/dongle.cpp b/dongle/dongle.cpp -index b931ff8..5c5305e 100644 ---- a/dongle/dongle.cpp -+++ b/dongle/dongle.cpp -@@ -72,9 +72,13 @@ void Dongle::handleControllerConnect(Bytes address) - std::placeholders::_1 - ); - -- controllers[wcid - 1].reset(new Controller(sendPacket)); -- -- Log::info("Controller '%d' connected", wcid); -+ if (controllers[wcid - 1] == nullptr) -+ { -+ controllers[wcid - 1].reset(new Controller(sendPacket)); -+ Log::info("Controller '%d' connected", wcid); -+ } else { -+ Log::info("Controller '%d' connected (re-attached)", wcid); -+ } - } - - void Dongle::handleControllerDisconnect(uint8_t wcid) -@@ -93,7 +97,8 @@ void Dongle::handleControllerDisconnect(uint8_t wcid) - return; - } - -- controllers[wcid - 1].reset(); -+ // QQQ: Figure out how to flag protect this. -+ // controllers[wcid - 1].reset(); - - if (!removeClient(wcid)) - { --- -2.29.2 - |