metal: allow configuring framebuffer formats
This commit is contained in:
parent
9bab4f7ce1
commit
b4ca15fec0
24 changed files with 713 additions and 58 deletions
13
src/cli.rs
13
src/cli.rs
|
|
@ -17,10 +17,11 @@ use {
|
|||
crate::{
|
||||
cli::{damage_tracking::DamageTrackingArgs, input::InputArgs, randr::RandrArgs},
|
||||
compositor::start_compositor,
|
||||
format::{ref_formats, Format},
|
||||
portal,
|
||||
},
|
||||
::log::Level,
|
||||
clap::{Args, Parser, Subcommand, ValueEnum},
|
||||
clap::{builder::PossibleValue, Args, Parser, Subcommand, ValueEnum},
|
||||
clap_complete::Shell,
|
||||
};
|
||||
|
||||
|
|
@ -231,6 +232,16 @@ pub struct GenerateArgs {
|
|||
shell: Shell,
|
||||
}
|
||||
|
||||
impl ValueEnum for &'static Format {
|
||||
fn value_variants<'a>() -> &'a [Self] {
|
||||
ref_formats()
|
||||
}
|
||||
|
||||
fn to_possible_value(&self) -> Option<PossibleValue> {
|
||||
Some(PossibleValue::new(self.name))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn main() {
|
||||
let cli = Jay::parse();
|
||||
match cli.command {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue