From abee7f8c1b171088ad7ddaff4ea379cd8d65af70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Tue, 23 May 2017 15:58:07 +0200 Subject: [PATCH] [ion] Abort suspend when the USB is plugged Change-Id: I92828ca7879bb4ff189d55660ab3e894c90ee387 --- ion/src/device/power.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ion/src/device/power.cpp b/ion/src/device/power.cpp index 1f9f22f18..948b9eb89 100644 --- a/ion/src/device/power.cpp +++ b/ion/src/device/power.cpp @@ -57,7 +57,7 @@ void Ion::Power::suspend(bool checkIfPowerKeyReleased) { Keyboard::Device::shutdown(); Ion::Keyboard::State OnlyPowerKeyDown = Keyboard::State(Keyboard::Key::B2); - if (scan == OnlyPowerKeyDown) { + if (scan == OnlyPowerKeyDown || USB::isPlugged()) { // Wake up break; }