Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
3e254383
Commit
3e254383
authored
Sep 01, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gestures: avoid undefined negative shift
(cherry picked from commit 2051d837ea9066c4ddf388b7940652bb0c8d549c)
parent
fa601028
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
modules/control/gestures.c
modules/control/gestures.c
+5
-4
No files found.
modules/control/gestures.c
View file @
3e254383
...
@@ -47,7 +47,7 @@ struct intf_sys_t
...
@@ -47,7 +47,7 @@ struct intf_sys_t
bool
b_button_pressed
;
bool
b_button_pressed
;
int
i_last_x
,
i_last_y
;
int
i_last_x
,
i_last_y
;
unsigned
int
i_pattern
;
unsigned
int
i_pattern
;
int
i_num_gestures
;
unsigned
int
i_num_gestures
;
int
i_threshold
;
int
i_threshold
;
int
i_button_mask
;
int
i_button_mask
;
};
};
...
@@ -146,7 +146,7 @@ static int Open ( vlc_object_t *p_this )
...
@@ -146,7 +146,7 @@ static int Open ( vlc_object_t *p_this )
/*****************************************************************************
/*****************************************************************************
* gesture: return a subpattern within a pattern
* gesture: return a subpattern within a pattern
*****************************************************************************/
*****************************************************************************/
static
in
t
gesture
(
int
i_pattern
,
int
i_num
)
static
in
line
unsigned
gesture
(
unsigned
i_pattern
,
unsigned
i_num
)
{
{
return
(
i_pattern
>>
(
i_num
*
4
)
)
&
0xF
;
return
(
i_pattern
>>
(
i_num
*
4
)
)
&
0xF
;
}
}
...
@@ -382,7 +382,7 @@ static int MovedEvent( vlc_object_t *p_this, char const *psz_var,
...
@@ -382,7 +382,7 @@ static int MovedEvent( vlc_object_t *p_this, char const *psz_var,
{
{
int
i_horizontal
=
newval
.
coords
.
x
-
p_sys
->
i_last_x
;
int
i_horizontal
=
newval
.
coords
.
x
-
p_sys
->
i_last_x
;
int
i_vertical
=
newval
.
coords
.
y
-
p_sys
->
i_last_y
;
int
i_vertical
=
newval
.
coords
.
y
-
p_sys
->
i_last_y
;
int
pattern
=
0
;
unsigned
int
pattern
=
0
;
i_horizontal
=
i_horizontal
/
p_sys
->
i_threshold
;
i_horizontal
=
i_horizontal
/
p_sys
->
i_threshold
;
i_vertical
=
i_vertical
/
p_sys
->
i_threshold
;
i_vertical
=
i_vertical
/
p_sys
->
i_threshold
;
...
@@ -412,7 +412,8 @@ static int MovedEvent( vlc_object_t *p_this, char const *psz_var,
...
@@ -412,7 +412,8 @@ static int MovedEvent( vlc_object_t *p_this, char const *psz_var,
{
{
p_sys
->
i_last_x
=
newval
.
coords
.
x
;
p_sys
->
i_last_x
=
newval
.
coords
.
x
;
p_sys
->
i_last_y
=
newval
.
coords
.
y
;
p_sys
->
i_last_y
=
newval
.
coords
.
y
;
if
(
gesture
(
p_sys
->
i_pattern
,
p_sys
->
i_num_gestures
-
1
)
if
(
p_sys
->
i_num_gestures
>
0
&&
gesture
(
p_sys
->
i_pattern
,
p_sys
->
i_num_gestures
-
1
)
!=
pattern
)
!=
pattern
)
{
{
p_sys
->
i_pattern
|=
pattern
<<
(
p_sys
->
i_num_gestures
*
4
);
p_sys
->
i_pattern
|=
pattern
<<
(
p_sys
->
i_num_gestures
*
4
);
...
...
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