From 24b12d763d55a91a075181f6930b3b97bc1912df Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Sat, 11 Jul 2026 02:15:46 +0200 Subject: [PATCH] Update launcher for power kernel driver --- Tactility/Source/app/launcher/Launcher.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Tactility/Source/app/launcher/Launcher.cpp b/Tactility/Source/app/launcher/Launcher.cpp index ee510b033..425496339 100644 --- a/Tactility/Source/app/launcher/Launcher.cpp +++ b/Tactility/Source/app/launcher/Launcher.cpp @@ -4,13 +4,14 @@ #include #include #include -#include #include #include #include #include +#include +#include #include #include #include @@ -73,9 +74,9 @@ class LauncherApp final : public App { static bool shouldShowPowerButton() { bool show_power_button = false; - hal::findDevices(hal::Device::Type::Power, [&show_power_button](const auto& device) { - if (device->supportsPowerOff()) { - show_power_button = true; + device_for_each_of_type(&POWER_SUPPLY_TYPE, &show_power_button, [](Device* device, void* context) { + if (device_is_ready(device) && power_supply_supports_power_off(device)) { + *static_cast(context) = true; return false; // stop iterating } else { return true; // continue iterating