Check inotify paths are valid. Add dgu/egpu/ac_online checks

This commit is contained in:
Luke D. Jones
2022-09-24 14:34:15 +12:00
parent 30550aaa91
commit 7939b00aa3
17 changed files with 210 additions and 43 deletions

View File

@@ -65,7 +65,7 @@ impl Bios {
pub fn gpu_mux_mode(&self) -> Result<i16> {
Ok(1)
}
pub fn panel_overdrive(&self) -> Result<i16> {
pub fn panel_od(&self) -> Result<i16> {
Ok(1)
}
pub fn set_post_boot_sound(&self, _b: bool) -> Result<()> {
@@ -74,7 +74,7 @@ impl Bios {
pub fn set_gpu_mux_mode(&self, _b: bool) -> Result<()> {
Ok(())
}
pub fn set_panel_overdrive(&self, _b: bool) -> Result<()> {
pub fn set_panel_od(&self, _b: bool) -> Result<()> {
Ok(())
}
}
@@ -217,7 +217,7 @@ impl Supported {
rog_bios_ctrl: RogBiosSupportedFunctions {
post_sound: true,
dedicated_gfx: true,
panel_overdrive: true,
panel_od: true,
dgpu_disable: true,
egpu_enable: true,
},

View File

@@ -70,7 +70,7 @@ pub fn start_notifications(
if let Ok(out) = e.args() {
if notifs_enabled1.load(Ordering::SeqCst) {
if let Ok(ref mut lock) = last_notif.try_lock() {
notify!(do_post_sound_notif, lock, &out.sound());
notify!(do_post_sound_notif, lock, &out.on());
}
}
bios_notified1.store(true, Ordering::SeqCst);