Skip to content

Commit

Permalink
src: fix keep-open handling
Browse files Browse the repository at this point in the history
  • Loading branch information
eNV25 committed Aug 30, 2023
1 parent 3bb984a commit 61f7a2a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub extern "C" fn mpv_open_cplugin(ctx: *mut mpv_handle) -> ffi::c_int {
"fullscreen\0",
);

let mut keep_open;
let mut keep_open = false;
let mut seeking = false;
loop {
let mut shutdown = false;
Expand Down Expand Up @@ -144,10 +144,8 @@ pub extern "C" fn mpv_open_cplugin(ctx: *mut mpv_handle) -> ffi::c_int {
};
}

if let Some(&"no") = changed.get("keep-open") {
keep_open = false;
} else {
keep_open = true;
if let Some(&value) = changed.get("keep-open") {
keep_open = value != "no";
}

if keep_open && changed.contains_key("eof-reached") {
Expand Down

0 comments on commit 61f7a2a

Please sign in to comment.