From: Kostya Shishkov Date: Wed, 1 Oct 2025 16:48:05 +0000 (+0200) Subject: videoplayer: allow toggling forced seek mode X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=b65cacb186954ff580e3b4c1d9367f08da74eda7;p=nihav-player.git videoplayer: allow toggling forced seek mode --- diff --git a/videoplayer/src/main.rs b/videoplayer/src/main.rs index 8d91a9f..ca407d9 100644 --- a/videoplayer/src/main.rs +++ b/videoplayer/src/main.rs @@ -625,6 +625,11 @@ impl Player { self.osd.toggle(); } }, + Keycode::S if keymod.contains(Mod::RCTRLMOD) || keymod.contains(Mod::LCTRLMOD) => { + if let Some(NAValue::Bool(force_seek)) = dmx.query_option_value(FORCE_SEEK_OPTION) { + dmx.set_options(&[NAOption{name: FORCE_SEEK_OPTION, value: NAValue::Bool(!force_seek)}]); + } + }, _ => {}, }; if !self.paused && !self.quiet {