From 20dad44d84e6b317d057c3b32dc8930b7913c940 Mon Sep 17 00:00:00 2001 From: ABeltramo Date: Thu, 28 Mar 2024 16:11:08 +0000 Subject: [PATCH] fix: extra warnings --- src/platform/linux/inputtino.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/platform/linux/inputtino.cpp b/src/platform/linux/inputtino.cpp index 644ef565336..df97cacc8a5 100644 --- a/src/platform/linux/inputtino.cpp +++ b/src/platform/linux/inputtino.cpp @@ -603,7 +603,7 @@ namespace platf { } // Only the PS5 controller supports motion if (std::holds_alternative(*gamepad->joypad)) { - inputtino::PS5Joypad::BATTERY_STATE state; + inputtino::PS5Joypad::BATTERY_STATE state = inputtino::PS5Joypad::CHARGHING_ERROR; switch (battery.state) { case LI_BATTERY_STATE_CHARGING: state = inputtino::PS5Joypad::BATTERY_CHARGHING; @@ -614,12 +614,6 @@ namespace platf { case LI_BATTERY_STATE_FULL: state = inputtino::PS5Joypad::BATTERY_FULL; break; - case LI_BATTERY_STATE_NOT_CHARGING: - case LI_BATTERY_PERCENTAGE_UNKNOWN: - case LI_BATTERY_STATE_UNKNOWN: - case LI_BATTERY_STATE_NOT_PRESENT: - state = inputtino::PS5Joypad::CHARGHING_ERROR; - break; } std::get(*gamepad->joypad).set_battery(state, battery.percentage / 2.55); // TODO: 255 (0xFF) is 100%? }