From 118abc58a96d6e7c265fd95d2293f4727a194365 Mon Sep 17 00:00:00 2001 From: "Frederik P." Date: Sat, 7 Sep 2024 23:56:32 +0200 Subject: [PATCH] tiny refactor + updated todo --- TODO.md | 2 +- src/services/power_service.rs | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/TODO.md b/TODO.md index e3f067c..60db99e 100644 --- a/TODO.md +++ b/TODO.md @@ -1,3 +1,3 @@ # TODO -- Consider either moving completely to a normal background process, or running the proxy from the service. +- Rewrite as a normal background process. The current way is too limiting due to session 0 isolation, and strange behaviour with some APIs. diff --git a/src/services/power_service.rs b/src/services/power_service.rs index 9389d68..de74443 100644 --- a/src/services/power_service.rs +++ b/src/services/power_service.rs @@ -219,18 +219,6 @@ impl WindowsService for PowerService { } }); - /* LOGGER.debug("Registering power setting notification handling..."); - if let Err(e) = RegisterPowerSettingNotification( - HANDLE(me.status_handle.unwrap().0), - &GUID_ACDC_POWER_SOURCE, - WindowsAndMessaging::REGISTER_NOTIFICATION_FLAGS(1), - ) { - LOGGER.error(format!( - "Could not register power settings notification!\n{}", - e - )); - } */ - LOGGER.debug("Creating stop event..."); me.stop_event = Some(match CreateEventW(None, TRUE, FALSE, None) { Ok(x) => x,