diff --git a/core/src/config.rs b/core/src/config.rs index 30fdd3eeb..d7e43b542 100644 --- a/core/src/config.rs +++ b/core/src/config.rs @@ -6,6 +6,7 @@ use serde::{Deserialize, Serialize}; /// /// When letterboxed, black bars will be rendered around the exterior /// margins of the content. +#[cfg_attr(feature = "clap", derive(clap::ValueEnum))] #[derive(Debug, Clone, Copy, PartialEq, Eq, Collect, Serialize, Deserialize)] #[collect(require_static)] #[serde(rename = "letterbox")] diff --git a/desktop/src/main.rs b/desktop/src/main.rs index 0922ae73c..5945f48d5 100644 --- a/desktop/src/main.rs +++ b/desktop/src/main.rs @@ -122,6 +122,10 @@ struct Opt { #[clap(long, default_value = "streaming")] load_behavior: LoadBehavior, + /// Specify how Ruffle should handle areas outside the movie stage. + #[clap(long, default_value = "on")] + letterbox: Letterbox, + /// Spoofs the root SWF URL provided to ActionScript. #[clap(long, value_parser)] spoof_url: Option, @@ -296,7 +300,7 @@ impl App { .with_storage(storage::DiskStorageBackend::new()?) .with_ui(ui::DesktopUiBackend::new(window.clone())?) .with_autoplay(true) - .with_letterbox(Letterbox::On) + .with_letterbox(opt.letterbox) .with_warn_on_unsupported_content(!opt.dont_warn_on_unsupported_content) .with_fullscreen(opt.fullscreen) .with_load_behavior(opt.load_behavior)