diff --git a/src/main.cpp b/src/main.cpp index 8258a57c..80602529 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -381,7 +381,9 @@ void loop() { } static bool screenshotButtonsReleased = true; + static bool screenshotComboActive = false; if (gpio.isPressed(HalGPIO::BTN_POWER) && gpio.isPressed(HalGPIO::BTN_DOWN)) { + screenshotComboActive = true; if (screenshotButtonsReleased) { screenshotButtonsReleased = false; { @@ -390,8 +392,16 @@ void loop() { } } return; - } else { + } + if (screenshotComboActive) { + if (gpio.isPressed(HalGPIO::BTN_POWER)) return; + if (gpio.wasReleased(HalGPIO::BTN_POWER)) { + screenshotButtonsReleased = true; + screenshotComboActive = false; + return; + } screenshotButtonsReleased = true; + screenshotComboActive = false; } const unsigned long sleepTimeoutMs = SETTINGS.getSleepTimeoutMs();