Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
371dcf3e
Commit
371dcf3e
authored
Oct 21, 2014
by
Alexandre Perraud
Committed by
Jean-Baptiste Kempf
Oct 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VideoPlayerActivity : replace tab by space
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
3ef336c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
29 deletions
+29
-29
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
...d/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+29
-29
No files found.
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
View file @
371dcf3e
...
...
@@ -703,35 +703,35 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
@TargetApi
(
12
)
//only active for Android 3.1+
public
boolean
dispatchGenericMotionEvent
(
MotionEvent
event
){
InputDevice
mInputDevice
=
event
.
getDevice
();
float
x
=
AndroidDevices
.
getCenteredAxis
(
event
,
mInputDevice
,
MotionEvent
.
AXIS_X
);
float
y
=
AndroidDevices
.
getCenteredAxis
(
event
,
mInputDevice
,
MotionEvent
.
AXIS_Y
);
float
z
=
AndroidDevices
.
getCenteredAxis
(
event
,
mInputDevice
,
MotionEvent
.
AXIS_Z
);
float
rz
=
AndroidDevices
.
getCenteredAxis
(
event
,
mInputDevice
,
MotionEvent
.
AXIS_RZ
);
if
(
System
.
currentTimeMillis
()
-
mLastMove
>
JOYSTICK_INPUT_DELAY
){
if
(
Math
.
abs
(
x
)
>
0.3
){
seek
(
x
>
0.0f
?
10000
:
-
10000
);
mLastMove
=
System
.
currentTimeMillis
();
}
else
if
(
Math
.
abs
(
y
)
>
0.3
){
if
(
mIsFirstBrightnessGesture
)
initBrightnessTouch
();
changeBrightness
(-
y
/
10
f
);
mLastMove
=
System
.
currentTimeMillis
();
}
else
if
(
Math
.
abs
(
rz
)
>
0.3
){
mVol
=
mAudioManager
.
getStreamVolume
(
AudioManager
.
STREAM_MUSIC
);
int
delta
=
-(
int
)
((
rz
/
7
)
*
mAudioMax
);
int
vol
=
(
int
)
Math
.
min
(
Math
.
max
(
mVol
+
delta
,
0
),
mAudioMax
);
setAudioVolume
(
vol
);
mLastMove
=
System
.
currentTimeMillis
();
}
}
return
true
;
InputDevice
mInputDevice
=
event
.
getDevice
();
float
x
=
AndroidDevices
.
getCenteredAxis
(
event
,
mInputDevice
,
MotionEvent
.
AXIS_X
);
float
y
=
AndroidDevices
.
getCenteredAxis
(
event
,
mInputDevice
,
MotionEvent
.
AXIS_Y
);
float
z
=
AndroidDevices
.
getCenteredAxis
(
event
,
mInputDevice
,
MotionEvent
.
AXIS_Z
);
float
rz
=
AndroidDevices
.
getCenteredAxis
(
event
,
mInputDevice
,
MotionEvent
.
AXIS_RZ
);
if
(
System
.
currentTimeMillis
()
-
mLastMove
>
JOYSTICK_INPUT_DELAY
){
if
(
Math
.
abs
(
x
)
>
0.3
){
seek
(
x
>
0.0f
?
10000
:
-
10000
);
mLastMove
=
System
.
currentTimeMillis
();
}
else
if
(
Math
.
abs
(
y
)
>
0.3
){
if
(
mIsFirstBrightnessGesture
)
initBrightnessTouch
();
changeBrightness
(-
y
/
10
f
);
mLastMove
=
System
.
currentTimeMillis
();
}
else
if
(
Math
.
abs
(
rz
)
>
0.3
){
mVol
=
mAudioManager
.
getStreamVolume
(
AudioManager
.
STREAM_MUSIC
);
int
delta
=
-(
int
)
((
rz
/
7
)
*
mAudioMax
);
int
vol
=
(
int
)
Math
.
min
(
Math
.
max
(
mVol
+
delta
,
0
),
mAudioMax
);
setAudioVolume
(
vol
);
mLastMove
=
System
.
currentTimeMillis
();
}
}
return
true
;
}
@Override
...
...
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