Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVittorio Gambaletta (VittGam) <ffmpeg-dev@vittgam.net>2016-01-19 02:57:38 +0300
committerMarton Balint <cus@passwd.hu>2016-01-20 01:15:30 +0300
commitacd37069aec2058821c73b85ccac2d879949f0ff (patch)
tree0cd42a5d02a7192913b7d52c869ca4c569cf50fa /ffplay.c
parentcde4b99f476875f53aa1596e937691de952ab457 (diff)
ffplay: toggle full screen when double-clicking the video window with the left mouse button
Now that the seek only happens with the right mouse button, it makes sense to toggle full screen when double-clicking with the left mouse button, like other video players do. Signed-off-by: Vittorio Gambaletta <ffmpeg-dev@vittgam.net> Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ffplay.c b/ffplay.c
index 2fa7165dee..5b473e9955 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -3473,6 +3473,16 @@ static void event_loop(VideoState *cur_stream)
do_exit(cur_stream);
break;
}
+ if (event.button.button == SDL_BUTTON_LEFT) {
+ static int64_t last_mouse_left_click = 0;
+ if (av_gettime_relative() - last_mouse_left_click <= 500000) {
+ toggle_full_screen(cur_stream);
+ cur_stream->force_refresh = 1;
+ last_mouse_left_click = 0;
+ } else {
+ last_mouse_left_click = av_gettime_relative();
+ }
+ }
case SDL_MOUSEMOTION:
if (cursor_hidden) {
SDL_ShowCursor(1);