refactor(main): inline flatscreen display mode
This commit is contained in:
14
src/main.rs
14
src/main.rs
@@ -29,14 +29,16 @@ struct CliArgs {
|
|||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
let cli_args = Arc::new(CliArgs::parse());
|
let cli_args = Arc::new(CliArgs::parse());
|
||||||
|
|
||||||
let mut init_settings = Settings::default()
|
let stereokit = Settings::default()
|
||||||
.app_name("Stardust XR")
|
.app_name("Stardust XR")
|
||||||
.overlay_app(cli_args.overlay)
|
.overlay_app(cli_args.overlay)
|
||||||
.overlay_priority(u32::MAX);
|
.overlay_priority(u32::MAX)
|
||||||
if cli_args.flatscreen {
|
.disable_desktop_input_window(true)
|
||||||
init_settings = init_settings.display_preference(DisplayMode::Flatscreen);
|
.display_preference(if cli_args.flatscreen {
|
||||||
}
|
DisplayMode::Flatscreen
|
||||||
let stereokit = init_settings
|
} else {
|
||||||
|
DisplayMode::MixedReality
|
||||||
|
})
|
||||||
.init()
|
.init()
|
||||||
.expect("StereoKit failed to initialize");
|
.expect("StereoKit failed to initialize");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user