mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
ROGCC: Minor correction to tray menu
This commit is contained in:
@@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Change how the profile/fan change task monitors changes due to TUF laptops behaving slightly different
|
- Change how the profile/fan change task monitors changes due to TUF laptops behaving slightly different
|
||||||
- ROGCC: Better handle the use of GPU MUX without supergfxd
|
- ROGCC: Better handle the use of GPU MUX without supergfxd
|
||||||
- ROGCC: Track if reboot required when not using supergfxd
|
- ROGCC: Track if reboot required when not using supergfxd
|
||||||
- Add env var for logging levels to daemon and gui (`RUST_LOG=<error|warn|info|debug|trace`)
|
- Add env var for logging levels to daemon and gui (`RUST_LOG=<error|warn|info|debug|trace>`)
|
||||||
|
|
||||||
## [v4.5.5]
|
## [v4.5.5]
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -310,6 +310,8 @@ impl ROGTray {
|
|||||||
set_mux_off1.store(true, Ordering::Relaxed);
|
set_mux_off1.store(true, Ordering::Relaxed);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let mut reboot_required = false;
|
||||||
if supported.rog_bios_ctrl.gpu_mux {
|
if supported.rog_bios_ctrl.gpu_mux {
|
||||||
let gfx_dbus = self.bios_proxy.clone();
|
let gfx_dbus = self.bios_proxy.clone();
|
||||||
gpu_menu.add("Ultimate (Reboot required)", move |_| {
|
gpu_menu.add("Ultimate (Reboot required)", move |_| {
|
||||||
@@ -341,14 +343,29 @@ impl ROGTray {
|
|||||||
})
|
})
|
||||||
.ok();
|
.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let Ok(mode) = self.bios_proxy.gpu_mux_mode() {
|
||||||
|
let mode = match mode {
|
||||||
|
GpuMode::Discrete => GfxMode::AsusMuxDiscreet,
|
||||||
|
_ => GfxMode::Hybrid,
|
||||||
|
};
|
||||||
|
reboot_required = mode != current_mode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let active = match current_mode {
|
let active = match current_mode {
|
||||||
GfxMode::AsusMuxDiscreet => "Discreet".to_owned(),
|
GfxMode::AsusMuxDiscreet => "Discreet".to_owned(),
|
||||||
_ => current_mode.to_string(),
|
_ => current_mode.to_string(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let reboot_required = if reboot_required {
|
||||||
|
"(Reboot required)"
|
||||||
|
} else {
|
||||||
|
""
|
||||||
|
};
|
||||||
|
|
||||||
self.add_radio_sub_menu(
|
self.add_radio_sub_menu(
|
||||||
&format!("GPU Mode: {current_mode}"),
|
&format!("GPU Mode: {active} {reboot_required}"),
|
||||||
active.as_str(),
|
active.as_str(),
|
||||||
&gpu_menu,
|
&gpu_menu,
|
||||||
);
|
);
|
||||||
@@ -358,8 +375,8 @@ impl ROGTray {
|
|||||||
|
|
||||||
fn menu_add_mux(&mut self, current_mode: GfxMode) {
|
fn menu_add_mux(&mut self, current_mode: GfxMode) {
|
||||||
let gfx_dbus = self.bios_proxy.clone();
|
let gfx_dbus = self.bios_proxy.clone();
|
||||||
let mut reboot_required = false;
|
|
||||||
|
|
||||||
|
let mut reboot_required = false;
|
||||||
if let Ok(mode) = gfx_dbus.gpu_mux_mode() {
|
if let Ok(mode) = gfx_dbus.gpu_mux_mode() {
|
||||||
let mode = match mode {
|
let mode = match mode {
|
||||||
GpuMode::Discrete => GfxMode::AsusMuxDiscreet,
|
GpuMode::Discrete => GfxMode::AsusMuxDiscreet,
|
||||||
|
|||||||
Reference in New Issue
Block a user