From: Kostya Shishkov Date: Thu, 29 Jun 2023 16:52:17 +0000 (+0200) Subject: show time with middle button click X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=86da77091a6bb3eca31d5b8066cd95e981e4f8f7;p=nihav-player.git show time with middle button click --- diff --git a/videoplayer/src/main.rs b/videoplayer/src/main.rs index 6becffd..674a243 100644 --- a/videoplayer/src/main.rs +++ b/videoplayer/src/main.rs @@ -473,8 +473,12 @@ impl Player { canvas.copy(disp_queue.get_last_texture(&self.osd), None, None).expect("blitting failure"); canvas.present(); } - if let Event::MouseButtonDown {mouse_btn: MouseButton::Right, ..} = event { - self.toggle_pause(); + if let Event::MouseButtonDown {mouse_btn, ..} = event { + match mouse_btn { + MouseButton::Right => self.toggle_pause(), + MouseButton::Middle => self.osd.toggle(), + _ => {}, + }; } if let Event::KeyDown {keycode: Some(keycode), keymod, ..} = event { match keycode {