Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
048ea8aa
Commit
048ea8aa
authored
Feb 03, 2015
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iOS vout 2: use simple tap instead of long touch gesture
This proved to be more natural for on-screen navigation
parent
b49f27fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
modules/video_output/ios2.m
modules/video_output/ios2.m
+11
-12
No files found.
modules/video_output/ios2.m
View file @
048ea8aa
...
...
@@ -100,7 +100,7 @@ struct vout_display_sys_t
{
VLCOpenGLES2VideoView
*
glESView
;
UIView
*
viewContainer
;
UI
LongPressGestureRecognizer
*
longTouch
Recognizer
;
UI
TapGestureRecognizer
*
tap
Recognizer
;
vlc_gl_t
gl
;
vout_display_opengl_t
*
vgl
;
...
...
@@ -159,16 +159,15 @@ static int Open(vlc_object_t *this)
waitUntilDone:
YES
];
/* add tap gesture recognizer for DVD menus and stuff */
sys
->
longTouchRecognizer
=
[[
UILongPressGestureRecognizer
alloc
]
initWithTarget
:
sys
->
glESView
action:
@selector
(
longTouchRecognized
:)];
sys
->
longTouchRecognizer
.
allowableMovement
=
20
.;
sys
->
tapRecognizer
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
sys
->
glESView
action:
@selector
(
tapRecognized
:)];
if
(
sys
->
viewContainer
.
window
)
{
if
(
sys
->
viewContainer
.
window
.
rootViewController
)
{
if
(
sys
->
viewContainer
.
window
.
rootViewController
.
view
)
[
sys
->
viewContainer
.
superview
addGestureRecognizer
:
sys
->
longTouch
Recognizer
];
[
sys
->
viewContainer
.
superview
addGestureRecognizer
:
sys
->
tap
Recognizer
];
}
}
sys
->
longTouch
Recognizer
.
cancelsTouchesInView
=
YES
;
sys
->
tap
Recognizer
.
cancelsTouchesInView
=
YES
;
/* Initialize common OpenGL video display */
sys
->
gl
.
lock
=
OpenglESClean
;
...
...
@@ -232,9 +231,9 @@ void Close (vlc_object_t *this)
vout_display_t
*
vd
=
(
vout_display_t
*
)
this
;
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
sys
->
longTouch
Recognizer
)
{
[
sys
->
longTouchRecognizer
.
view
removeGestureRecognizer
:
sys
->
longTouch
Recognizer
];
[
sys
->
longTouch
Recognizer
release
];
if
(
sys
->
tap
Recognizer
)
{
[
sys
->
tapRecognizer
.
view
removeGestureRecognizer
:
sys
->
tap
Recognizer
];
[
sys
->
tap
Recognizer
release
];
}
[
sys
->
glESView
setVoutDisplay
:
nil
];
...
...
@@ -504,10 +503,10 @@ static void OpenglESSwap(vlc_gl_t *gl)
glViewport
(
place
.
x
,
place
.
y
,
place
.
width
,
place
.
height
);
}
-
(
void
)
longTouchRecognized
:(
UITapGestureRecognizer
*
)
longTouch
Recognizer
-
(
void
)
tapRecognized
:(
UITapGestureRecognizer
*
)
tap
Recognizer
{
UIGestureRecognizerState
state
=
[
longTouch
Recognizer
state
];
CGPoint
touchPoint
=
[
longTouch
Recognizer
locationInView
:
self
];
UIGestureRecognizerState
state
=
[
tap
Recognizer
state
];
CGPoint
touchPoint
=
[
tap
Recognizer
locationInView
:
self
];
CGFloat
scaleFactor
=
self
.
contentScaleFactor
;
vout_display_SendMouseMovedDisplayCoordinates
(
_voutDisplay
,
ORIENT_NORMAL
,
(
int
)
touchPoint
.
x
*
scaleFactor
,
(
int
)
touchPoint
.
y
*
scaleFactor
,
...
...
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