Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
ef7f3b08
Commit
ef7f3b08
authored
Dec 01, 2012
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffplay: hide cursor on no mouse movement
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
0ca4e9f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
ffplay.c
ffplay.c
+13
-0
No files found.
ffplay.c
View file @
ef7f3b08
...
...
@@ -90,6 +90,8 @@ const int program_birth_year = 2003;
/* TODO: We assume that a decoded and resampled frame fits into this buffer */
#define SAMPLE_ARRAY_SIZE (8 * 65536)
#define CURSOR_HIDE_DELAY 1000000
static
int64_t
sws_flags
=
SWS_BICUBIC
;
typedef
struct
MyAVPacketList
{
...
...
@@ -303,6 +305,8 @@ static const char *audio_codec_name;
static
const
char
*
subtitle_codec_name
;
static
const
char
*
video_codec_name
;
static
int
rdftspeed
=
20
;
static
int64_t
cursor_last_shown
;
static
int
cursor_hidden
=
0
;
#if CONFIG_AVFILTER
static
char
*
vfilters
=
NULL
;
#endif
...
...
@@ -3038,6 +3042,11 @@ static void event_loop(VideoState *cur_stream)
break
;
}
case
SDL_MOUSEMOTION
:
if
(
cursor_hidden
)
{
SDL_ShowCursor
(
1
);
cursor_hidden
=
0
;
}
cursor_last_shown
=
av_gettime
();
if
(
event
.
type
==
SDL_MOUSEBUTTONDOWN
)
{
x
=
event
.
button
.
x
;
}
else
{
...
...
@@ -3084,6 +3093,10 @@ static void event_loop(VideoState *cur_stream)
alloc_picture
(
event
.
user
.
data1
);
break
;
case
FF_REFRESH_EVENT
:
if
(
!
cursor_hidden
&&
av_gettime
()
-
cursor_last_shown
>
CURSOR_HIDE_DELAY
)
{
SDL_ShowCursor
(
0
);
cursor_hidden
=
1
;
}
video_refresh
(
event
.
user
.
data1
);
cur_stream
->
refresh
=
0
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment