Better control of gfx modes

This commit is contained in:
Luke D. Jones
2021-06-11 09:03:50 +12:00
parent 226620eb53
commit baebd51d99
6 changed files with 21 additions and 18 deletions

View File

@@ -10,10 +10,13 @@ use rog_anime::{AnimeDataBuffer, AnimeImage, Vec2, ANIME_DATA_LEN};
use rog_aura::{self, AuraEffect};
use rog_dbus::RogDbusClient;
use rog_profiles::profiles::Profile;
use rog_types::{gfx_vendors::{GfxRequiredUserAction, GfxVendors}, supported::{
use rog_types::{
gfx_vendors::{GfxRequiredUserAction, GfxVendors},
supported::{
FanCpuSupportedFunctions, LedSupportedFunctions, RogBiosSupportedFunctions,
SupportedFunctions,
}};
},
};
use std::{env::args, path::Path};
use yansi_term::Colour::Green;
use yansi_term::Colour::Red;
@@ -312,20 +315,17 @@ fn do_gfx(
"You must change to Integrated before you can change to {}",
<&str>::from(mode)
);
},
}
GfxRequiredUserAction::Logout | GfxRequiredUserAction::Reboot => {
println!(
"Graphics mode changed to {}. User action required is: {}",
<&str>::from(mode),
<&str>::from(&res)
);
},
}
GfxRequiredUserAction::None => {
println!(
"Graphics mode changed to {}",
<&str>::from(mode)
);
},
println!("Graphics mode changed to {}", <&str>::from(mode));
}
}
std::process::exit(0)
}