diff --git a/razer_control_gui/src/device.rs b/razer_control_gui/src/device.rs index 9a351f2..419cce8 100644 --- a/razer_control_gui/src/device.rs +++ b/razer_control_gui/src/device.rs @@ -261,8 +261,7 @@ impl DeviceManager { } if let Some(laptop) = self.get_device() { let state = laptop.get_ac_state(); - if state != ac && pwr != 0 && pwr != 3 { - eprintln!("Unsupported mode"); + if state != ac { res = true; } else { res = laptop.set_power_mode(pwr, cpu, gpu); @@ -412,7 +411,13 @@ impl DeviceManager { pub fn get_power_mode(&mut self, _ac:usize) -> u8 { if let Some(laptop) = self.get_device() { - return laptop.get_power_mode(0x01); + if laptop.ac_state as usize == ac { + return laptop.get_power_mode(0x01); + } + } + + if let Some(config) = self.get_ac_config(ac) { + return config.power_mode; } return 0;