Create rog-platform, refactor rogcc ipc-file handling

- Create new rog-platform crate to manage all i/o in a universal way
  + kbd-led handling
  + platform handling (asus-nb-wmi)
  + hidraw
  + usbraw
- Refactor how ROGCC handles IPC for background open, run-in-bg
This commit is contained in:
Luke D. Jones
2022-08-12 15:22:06 +12:00
parent 45268bfb2b
commit 308fba9413
31 changed files with 860 additions and 635 deletions

View File

@@ -16,20 +16,21 @@ pub fn fan_graphs(
ui.separator();
let mut item = |p: Profile, ui: &mut Ui| {
ui.group(|ui|{
ui.selectable_value(&mut curves.show_curve, p, format!("{p:?}"));
ui.add_enabled_ui(curves.show_curve == p ,|ui| {
ui.selectable_value(
&mut curves.show_graph,
FanCurvePU::CPU,
format!("{:?}", FanCurvePU::CPU),
);
ui.selectable_value(
&mut curves.show_graph,
FanCurvePU::GPU,
format!("{:?}", FanCurvePU::GPU),
);
});});
ui.group(|ui| {
ui.selectable_value(&mut curves.show_curve, p, format!("{p:?}"));
ui.add_enabled_ui(curves.show_curve == p, |ui| {
ui.selectable_value(
&mut curves.show_graph,
FanCurvePU::CPU,
format!("{:?}", FanCurvePU::CPU),
);
ui.selectable_value(
&mut curves.show_graph,
FanCurvePU::GPU,
format!("{:?}", FanCurvePU::GPU),
);
});
});
};
ui.horizontal_wrapped(|ui| {

View File

@@ -90,7 +90,7 @@ pub fn rog_bios_group(
}
}
if supported.rog_bios_ctrl.dedicated_gfx {
if supported.rog_bios_ctrl.dgpu_only {
if ui
.add(egui::Checkbox::new(
&mut states.bios.dedicated_gfx,