diff options
| author | 2023-01-08 21:37:13 -0600 | |
|---|---|---|
| committer | 2023-01-19 18:05:22 -0600 | |
| commit | b40aefb39ea8b4259acdbe0616790c2234d9b9ef (patch) | |
| tree | 00f11d49e134a345c93ef8e4d31b03198282c516 /src/input_common/drivers/joycon.cpp | |
| parent | input_common: Fix issue where ring and irs are enabled at the same time (diff) | |
| download | yuzu-b40aefb39ea8b4259acdbe0616790c2234d9b9ef.tar.gz yuzu-b40aefb39ea8b4259acdbe0616790c2234d9b9ef.tar.xz yuzu-b40aefb39ea8b4259acdbe0616790c2234d9b9ef.zip | |
input_common: Drop Pro controller support from custom driver
Diffstat (limited to 'src/input_common/drivers/joycon.cpp')
| -rw-r--r-- | src/input_common/drivers/joycon.cpp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/input_common/drivers/joycon.cpp b/src/input_common/drivers/joycon.cpp index 6c03e0953..fff886ca8 100644 --- a/src/input_common/drivers/joycon.cpp +++ b/src/input_common/drivers/joycon.cpp | |||
| @@ -44,12 +44,6 @@ void Joycons::Reset() { | |||
| 44 | } | 44 | } |
| 45 | device->Stop(); | 45 | device->Stop(); |
| 46 | } | 46 | } |
| 47 | for (const auto& device : pro_joycons) { | ||
| 48 | if (!device) { | ||
| 49 | continue; | ||
| 50 | } | ||
| 51 | device->Stop(); | ||
| 52 | } | ||
| 53 | SDL_hid_exit(); | 47 | SDL_hid_exit(); |
| 54 | } | 48 | } |
| 55 | 49 | ||
| @@ -65,11 +59,6 @@ void Joycons::Setup() { | |||
| 65 | PreSetController(GetIdentifier(port, Joycon::ControllerType::Right)); | 59 | PreSetController(GetIdentifier(port, Joycon::ControllerType::Right)); |
| 66 | device = std::make_shared<Joycon::JoyconDriver>(port++); | 60 | device = std::make_shared<Joycon::JoyconDriver>(port++); |
| 67 | } | 61 | } |
| 68 | port = 0; | ||
| 69 | for (auto& device : pro_joycons) { | ||
| 70 | PreSetController(GetIdentifier(port, Joycon::ControllerType::Pro)); | ||
| 71 | device = std::make_shared<Joycon::JoyconDriver>(port++); | ||
| 72 | } | ||
| 73 | 62 | ||
| 74 | if (!scan_thread_running) { | 63 | if (!scan_thread_running) { |
| 75 | scan_thread = std::jthread([this](std::stop_token stop_token) { ScanThread(stop_token); }); | 64 | scan_thread = std::jthread([this](std::stop_token stop_token) { ScanThread(stop_token); }); |
| @@ -141,14 +130,6 @@ bool Joycons::IsDeviceNew(SDL_hid_device_info* device_info) const { | |||
| 141 | } | 130 | } |
| 142 | } | 131 | } |
| 143 | break; | 132 | break; |
| 144 | case Joycon::ControllerType::Pro: | ||
| 145 | case Joycon::ControllerType::Grip: | ||
| 146 | for (const auto& device : pro_joycons) { | ||
| 147 | if (is_handle_identical(device)) { | ||
| 148 | return false; | ||
| 149 | } | ||
| 150 | } | ||
| 151 | break; | ||
| 152 | default: | 133 | default: |
| 153 | return false; | 134 | return false; |
| 154 | } | 135 | } |
| @@ -219,13 +200,6 @@ std::shared_ptr<Joycon::JoyconDriver> Joycons::GetNextFreeHandle( | |||
| 219 | } | 200 | } |
| 220 | } | 201 | } |
| 221 | } | 202 | } |
| 222 | if (type == Joycon::ControllerType::Pro || type == Joycon::ControllerType::Grip) { | ||
| 223 | for (const auto& device : pro_joycons) { | ||
| 224 | if (!device->IsConnected()) { | ||
| 225 | return device; | ||
| 226 | } | ||
| 227 | } | ||
| 228 | } | ||
| 229 | return nullptr; | 203 | return nullptr; |
| 230 | } | 204 | } |
| 231 | 205 | ||
| @@ -431,13 +405,6 @@ std::shared_ptr<Joycon::JoyconDriver> Joycons::GetHandle(PadIdentifier identifie | |||
| 431 | } | 405 | } |
| 432 | } | 406 | } |
| 433 | } | 407 | } |
| 434 | if (type == Joycon::ControllerType::Pro || type == Joycon::ControllerType::Grip) { | ||
| 435 | for (const auto& device : pro_joycons) { | ||
| 436 | if (is_handle_active(device)) { | ||
| 437 | return device; | ||
| 438 | } | ||
| 439 | } | ||
| 440 | } | ||
| 441 | return nullptr; | 408 | return nullptr; |
| 442 | } | 409 | } |
| 443 | 410 | ||
| @@ -475,9 +442,6 @@ std::vector<Common::ParamPackage> Joycons::GetInputDevices() const { | |||
| 475 | for (const auto& controller : right_joycons) { | 442 | for (const auto& controller : right_joycons) { |
| 476 | add_entry(controller); | 443 | add_entry(controller); |
| 477 | } | 444 | } |
| 478 | for (const auto& controller : pro_joycons) { | ||
| 479 | add_entry(controller); | ||
| 480 | } | ||
| 481 | 445 | ||
| 482 | // List dual joycon pairs | 446 | // List dual joycon pairs |
| 483 | for (std::size_t i = 0; i < MaxSupportedControllers; i++) { | 447 | for (std::size_t i = 0; i < MaxSupportedControllers; i++) { |