mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Extend GpuMode to include other modes
This commit is contained in:
@@ -5,7 +5,7 @@ use notify_rust::{Hint, Notification, NotificationHandle};
|
||||
use rog_aura::AuraEffect;
|
||||
use rog_dbus::{
|
||||
zbus_anime::AnimeProxy, zbus_charge::ChargeProxy, zbus_led::LedProxy,
|
||||
zbus_profile::ProfileProxy, zbus_platform::RogBiosProxy,
|
||||
zbus_platform::RogBiosProxy, zbus_profile::ProfileProxy,
|
||||
};
|
||||
use rog_profiles::Profile;
|
||||
use smol::{future, Executor};
|
||||
|
||||
@@ -8,7 +8,7 @@ use std::{
|
||||
|
||||
use egui::Vec2;
|
||||
use rog_aura::{layouts::KeyLayout, usb::AuraPowerDev, AuraEffect, AuraModeNum};
|
||||
use rog_platform::{platform::GpuMuxMode, supported::SupportedFunctions};
|
||||
use rog_platform::{platform::GpuMode, supported::SupportedFunctions};
|
||||
use rog_profiles::{fan_curve_set::FanCurveSet, FanCurvePU, Profile};
|
||||
|
||||
use crate::{error::Result, RogDbusClientBlocking};
|
||||
@@ -20,7 +20,7 @@ pub struct BiosState {
|
||||
/// updated, so the full state needs refresh
|
||||
pub was_notified: Arc<AtomicBool>,
|
||||
pub post_sound: bool,
|
||||
pub dedicated_gfx: GpuMuxMode,
|
||||
pub dedicated_gfx: GpuMode,
|
||||
pub panel_overdrive: bool,
|
||||
pub dgpu_disable: bool,
|
||||
pub egpu_enable: bool,
|
||||
@@ -42,7 +42,7 @@ impl BiosState {
|
||||
dedicated_gfx: if supported.rog_bios_ctrl.dgpu_only {
|
||||
dbus.proxies().rog_bios().gpu_mux_mode()?
|
||||
} else {
|
||||
GpuMuxMode::NotSupported
|
||||
GpuMode::NotSupported
|
||||
},
|
||||
panel_overdrive: if supported.rog_bios_ctrl.panel_overdrive {
|
||||
dbus.proxies().rog_bios().panel_overdrive()?
|
||||
@@ -337,7 +337,7 @@ impl Default for PageDataStates {
|
||||
bios: BiosState {
|
||||
was_notified: Default::default(),
|
||||
post_sound: Default::default(),
|
||||
dedicated_gfx: GpuMuxMode::NotSupported,
|
||||
dedicated_gfx: GpuMode::NotSupported,
|
||||
panel_overdrive: Default::default(),
|
||||
dgpu_disable: Default::default(),
|
||||
egpu_enable: Default::default(),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{page_states::PageDataStates, RogDbusClientBlocking};
|
||||
use egui::Ui;
|
||||
use rog_platform::{platform::GpuMuxMode, supported::SupportedFunctions};
|
||||
use rog_platform::{platform::GpuMode, supported::SupportedFunctions};
|
||||
use rog_profiles::Profile;
|
||||
|
||||
pub fn platform_profile(states: &mut PageDataStates, dbus: &RogDbusClientBlocking, ui: &mut Ui) {
|
||||
@@ -99,14 +99,14 @@ pub fn rog_bios_group(
|
||||
changed = ui
|
||||
.selectable_value(
|
||||
&mut states.bios.dedicated_gfx,
|
||||
GpuMuxMode::Discrete,
|
||||
GpuMode::Discrete,
|
||||
"Dedicated (Ultimate)",
|
||||
)
|
||||
.clicked()
|
||||
|| ui
|
||||
.selectable_value(
|
||||
&mut states.bios.dedicated_gfx,
|
||||
GpuMuxMode::Optimus,
|
||||
GpuMode::Optimus,
|
||||
"Optimus (Hybrid)",
|
||||
)
|
||||
.clicked();
|
||||
|
||||
Reference in New Issue
Block a user