From 8dcb2090263920f684be7f134ccd5ad23755fbc5 Mon Sep 17 00:00:00 2001 From: "Luke D. Jones" Date: Sat, 10 Dec 2022 21:42:52 +1300 Subject: [PATCH] ROGCC: Don't notify user if changing to same mux mode --- CHANGELOG.md | 3 +++ rog-control-center/src/update_and_notify.rs | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed118427..9f0667ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- ROGCC: Don't notify user if changing to same mux mode + ## [v4.5.6] ### Changed - Fix tasks not always running correctly on boot/sleep/wake/shutdown by finishing the move to async diff --git a/rog-control-center/src/update_and_notify.rs b/rog-control-center/src/update_and_notify.rs index 22ec4bb1..8846a7da 100644 --- a/rog-control-center/src/update_and_notify.rs +++ b/rog-control-center/src/update_and_notify.rs @@ -310,10 +310,19 @@ pub fn start_notifications( e }) .unwrap(); + + let mut actual_mux_mode = GpuMode::Error; + if let Ok(mode) = proxy.gpu_mux_mode().await { + actual_mux_mode = mode; + } + if let Ok(mut p) = proxy.receive_notify_gpu_mux_mode().await { info!("Started zbus signal thread: receive_power_states"); while let Some(e) = p.next().await { if let Ok(out) = e.args() { + if out.mode == actual_mux_mode { + continue; + } if let Ok(mut lock) = page_states1.lock() { lock.bios.dedicated_gfx = out.mode; lock.set_notified();