Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
45aef3e0
Commit
45aef3e0
authored
Jan 02, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Limit mouse-x and mouse-y in sdl video_output module.\nSame than [24031] but for sdl
parent
7a5570dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
modules/video_output/sdl.c
modules/video_output/sdl.c
+23
-4
No files found.
modules/video_output/sdl.c
View file @
45aef3e0
...
...
@@ -376,11 +376,30 @@ static int Manage( vout_thread_t *p_vout )
p_vout
->
p_sys
->
i_height
,
&
i_x
,
&
i_y
,
&
i_width
,
&
i_height
);
val
.
i_int
=
(
event
.
motion
.
x
-
i_x
)
*
p_vout
->
render
.
i_width
/
i_width
;
/* Compute the x coordinate and check if the value is
in [0,p_vout->fmt_in.i_visible_width] */
val
.
i_int
=
(
event
.
motion
.
x
-
i_x
)
*
p_vout
->
fmt_in
.
i_visible_width
/
i_width
+
p_vout
->
fmt_in
.
i_x_offset
;
if
(
(
int
)(
event
.
motion
.
x
-
i_x
)
<
0
)
val
.
i_int
=
0
;
else
if
(
(
unsigned
int
)
val
.
i_int
>
p_vout
->
fmt_in
.
i_visible_width
)
val
.
i_int
=
p_vout
->
fmt_in
.
i_visible_width
;
var_Set
(
p_vout
,
"mouse-x"
,
val
);
val
.
i_int
=
(
event
.
motion
.
y
-
i_y
)
*
p_vout
->
render
.
i_height
/
i_height
;
/* compute the y coordinate and check if the value is
in [0,p_vout->fmt_in.i_visible_height] */
val
.
i_int
=
(
event
.
motion
.
y
-
i_y
)
*
p_vout
->
fmt_in
.
i_visible_height
/
i_height
+
p_vout
->
fmt_in
.
i_y_offset
;
if
(
(
int
)(
event
.
motion
.
y
-
i_y
)
<
0
)
val
.
i_int
=
0
;
else
if
(
(
unsigned
int
)
val
.
i_int
>
p_vout
->
fmt_in
.
i_visible_height
)
val
.
i_int
=
p_vout
->
fmt_in
.
i_visible_height
;
var_Set
(
p_vout
,
"mouse-y"
,
val
);
val
.
b_bool
=
VLC_TRUE
;
...
...
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