mirror of
https://github.com/Stremio/stremio-shell-ng.git
synced 2026-01-11 22:40:32 +00:00
Allow UI to set video output but keep gpu-next in the list
This commit is contained in:
parent
8a943c9b12
commit
e04cf5f0c4
2 changed files with 12 additions and 1 deletions
|
|
@ -185,7 +185,7 @@ pub enum StrProp {
|
|||
SubColor,
|
||||
TrackList,
|
||||
VideoParams,
|
||||
// Vo,
|
||||
Vo,
|
||||
}
|
||||
stringable!(StrProp);
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ fn create_shareable_mpv(window_handle: HWND) -> Arc<Mpv> {
|
|||
set_property!("msg-level", "all=no");
|
||||
set_property!("quiet", "yes");
|
||||
set_property!("hwdec", "auto");
|
||||
// set_property!("vo", "gpu-next,");
|
||||
Ok(())
|
||||
});
|
||||
Arc::new(mpv.expect("cannot build MPV"))
|
||||
|
|
@ -228,6 +229,16 @@ fn create_message_thread(
|
|||
set_property(name, value, &mpv);
|
||||
}
|
||||
InMsg(InMsgFn::MpvSetProp, InMsgArgs::StProp(name, PropVal::Str(value))) => {
|
||||
let value = if name.to_string() == "vo" {
|
||||
let mut value = value;
|
||||
if !value.is_empty() && !value.ends_with(',') {
|
||||
value.push(',');
|
||||
}
|
||||
value.push_str("gpu-next,");
|
||||
value
|
||||
} else {
|
||||
value
|
||||
};
|
||||
set_property(name, value, &mpv);
|
||||
}
|
||||
InMsg(InMsgFn::MpvCommand, InMsgArgs::Cmd(cmd)) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue