desktop: Add --letterbox option
This commit is contained in:
parent
e7612f571d
commit
1a65a0942c
|
@ -6,6 +6,7 @@ use serde::{Deserialize, Serialize};
|
||||||
///
|
///
|
||||||
/// When letterboxed, black bars will be rendered around the exterior
|
/// When letterboxed, black bars will be rendered around the exterior
|
||||||
/// margins of the content.
|
/// margins of the content.
|
||||||
|
#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Collect, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Collect, Serialize, Deserialize)]
|
||||||
#[collect(require_static)]
|
#[collect(require_static)]
|
||||||
#[serde(rename = "letterbox")]
|
#[serde(rename = "letterbox")]
|
||||||
|
|
|
@ -122,6 +122,10 @@ struct Opt {
|
||||||
#[clap(long, default_value = "streaming")]
|
#[clap(long, default_value = "streaming")]
|
||||||
load_behavior: LoadBehavior,
|
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.
|
/// Spoofs the root SWF URL provided to ActionScript.
|
||||||
#[clap(long, value_parser)]
|
#[clap(long, value_parser)]
|
||||||
spoof_url: Option<Url>,
|
spoof_url: Option<Url>,
|
||||||
|
@ -296,7 +300,7 @@ impl App {
|
||||||
.with_storage(storage::DiskStorageBackend::new()?)
|
.with_storage(storage::DiskStorageBackend::new()?)
|
||||||
.with_ui(ui::DesktopUiBackend::new(window.clone())?)
|
.with_ui(ui::DesktopUiBackend::new(window.clone())?)
|
||||||
.with_autoplay(true)
|
.with_autoplay(true)
|
||||||
.with_letterbox(Letterbox::On)
|
.with_letterbox(opt.letterbox)
|
||||||
.with_warn_on_unsupported_content(!opt.dont_warn_on_unsupported_content)
|
.with_warn_on_unsupported_content(!opt.dont_warn_on_unsupported_content)
|
||||||
.with_fullscreen(opt.fullscreen)
|
.with_fullscreen(opt.fullscreen)
|
||||||
.with_load_behavior(opt.load_behavior)
|
.with_load_behavior(opt.load_behavior)
|
||||||
|
|
Loading…
Reference in New Issue