From d6f71eefbcba4cf7424f39f303c1e8466e2e6688 Mon Sep 17 00:00:00 2001 From: Archomeda Date: Mon, 4 Jan 2016 02:56:49 +0100 Subject: [PATCH] Fix Corsair and Lightpack loading issues Corsair devices were loading when they were not supposed to, and were not loading when they were supposed to. Lightpack devices were loading when they were not supposed to. --- src/Devices/DeviceCorsair.cpp | 2 +- src/Devices/DeviceLightpack.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Devices/DeviceCorsair.cpp b/src/Devices/DeviceCorsair.cpp index 464097f..bb7cf90 100644 --- a/src/Devices/DeviceCorsair.cpp +++ b/src/Devices/DeviceCorsair.cpp @@ -67,9 +67,9 @@ namespace lightfx { this->library->CorsairPerformProtocolHandshake(); if (const auto error = this->library->CorsairGetLastError()) { LOG_ERROR(L"Handshake with Corsair failed: " + this->library->CorsairErrorToString(error)); - } else { this->SetEnabled(false); return false; + } else { this->Reset(); this->ledPositions = this->library->CorsairGetLedPositions(); } diff --git a/src/Devices/DeviceLightpack.cpp b/src/Devices/DeviceLightpack.cpp index 9271248..0c51649 100644 --- a/src/Devices/DeviceLightpack.cpp +++ b/src/Devices/DeviceLightpack.cpp @@ -56,6 +56,8 @@ namespace lightfx { this->Reset(); this->DisconnectAPI(); + } else { + return false; } } else { return false;