From da4634770d9176c3bba95a989cc2ccb517bc2618 Mon Sep 17 00:00:00 2001 From: scorpion-26 Date: Mon, 12 Feb 2024 21:12:55 +0100 Subject: [PATCH] Add error message for battery not found --- src/System.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/System.cpp b/src/System.cpp index fb04af5..a9d8a97 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -132,6 +132,10 @@ namespace System uint32_t intCapacity = atoi(capacityStr.c_str()); return (double)intCapacity / 100.0; } + + // TODO: This is the wrong place to do this, since we don't know whether it is actually disabled. + // A RuntimeConfig would be better, but it works for now. + LOG("Couldn't open battery charge files! Disabling battery widget.") return -1; }