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
c69ad41a
Commit
c69ad41a
authored
Feb 01, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hotkeys: use only one channel for sliders
We don't display both sliders at once anyway.
parent
00760708
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
modules/control/hotkeys.c
modules/control/hotkeys.c
+6
-13
No files found.
modules/control/hotkeys.c
View file @
c69ad41a
...
@@ -41,18 +41,13 @@
...
@@ -41,18 +41,13 @@
#include <vlc_keys.h>
#include <vlc_keys.h>
#include "math.h"
#include "math.h"
#define CHANNELS_NUMBER 2
#define VOLUME_WIDGET_CHAN p_intf->p_sys->p_channels[ 0 ]
#define POSITION_WIDGET_CHAN p_intf->p_sys->p_channels[ 1 ]
/*****************************************************************************
/*****************************************************************************
* intf_sys_t: description and status of FB interface
* intf_sys_t: description and status of FB interface
*****************************************************************************/
*****************************************************************************/
struct
intf_sys_t
struct
intf_sys_t
{
{
vout_thread_t
*
p_last_vout
;
vout_thread_t
*
p_last_vout
;
int
p_channels
[
CHANNELS_NUMBER
];
/* contains registered
int
slider_chan
;
* channel IDs */
};
};
/*****************************************************************************
/*****************************************************************************
...
@@ -141,8 +136,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
...
@@ -141,8 +136,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
* address as the old one... We should rather listen to vout events.
* address as the old one... We should rather listen to vout events.
* Alternatively, we should keep a reference to the vout thread. */
* Alternatively, we should keep a reference to the vout thread. */
if
(
p_vout
&&
p_vout
!=
p_sys
->
p_last_vout
)
if
(
p_vout
&&
p_vout
!=
p_sys
->
p_last_vout
)
for
(
unsigned
i
=
0
;
i
<
CHANNELS_NUMBER
;
i
++
)
p_sys
->
slider_chan
=
vout_RegisterSubpictureChannel
(
p_vout
);
p_intf
->
p_sys
->
p_channels
[
i
]
=
vout_RegisterSubpictureChannel
(
p_vout
);
p_sys
->
p_last_vout
=
p_vout
;
p_sys
->
p_last_vout
=
p_vout
;
/* Quit */
/* Quit */
...
@@ -1007,7 +1001,7 @@ static void DisplayPosition( intf_thread_t *p_intf, vout_thread_t *p_vout,
...
@@ -1007,7 +1001,7 @@ static void DisplayPosition( intf_thread_t *p_intf, vout_thread_t *p_vout,
if
(
var_GetBool
(
p_vout
,
"fullscreen"
)
)
if
(
var_GetBool
(
p_vout
,
"fullscreen"
)
)
{
{
var_Get
(
p_input
,
"position"
,
&
pos
);
var_Get
(
p_input
,
"position"
,
&
pos
);
vout_OSDSlider
(
p_vout
,
POSITION_WIDGET_CHAN
,
vout_OSDSlider
(
p_vout
,
p_intf
->
p_sys
->
slider_chan
,
pos
.
f_float
*
100
,
OSD_HOR_SLIDER
);
pos
.
f_float
*
100
,
OSD_HOR_SLIDER
);
}
}
}
}
...
@@ -1020,8 +1014,8 @@ static void DisplayVolume( intf_thread_t *p_intf, vout_thread_t *p_vout,
...
@@ -1020,8 +1014,8 @@ static void DisplayVolume( intf_thread_t *p_intf, vout_thread_t *p_vout,
ClearChannels
(
p_intf
,
p_vout
);
ClearChannels
(
p_intf
,
p_vout
);
if
(
var_GetBool
(
p_vout
,
"fullscreen"
)
)
if
(
var_GetBool
(
p_vout
,
"fullscreen"
)
)
vout_OSDSlider
(
p_vout
,
VOLUME_WIDGET_CHAN
,
lroundf
(
vol
*
100
.
f
)
,
vout_OSDSlider
(
p_vout
,
p_intf
->
p_sys
->
slider_chan
,
OSD_VERT_SLIDER
);
lroundf
(
vol
*
100
.
f
),
OSD_VERT_SLIDER
);
DisplayMessage
(
p_vout
,
_
(
"Volume %ld%%"
),
lroundf
(
vol
*
100
.
f
)
);
DisplayMessage
(
p_vout
,
_
(
"Volume %ld%%"
),
lroundf
(
vol
*
100
.
f
)
);
}
}
...
@@ -1054,7 +1048,6 @@ static void ClearChannels( intf_thread_t *p_intf, vout_thread_t *p_vout )
...
@@ -1054,7 +1048,6 @@ static void ClearChannels( intf_thread_t *p_intf, vout_thread_t *p_vout )
if
(
p_vout
)
if
(
p_vout
)
{
{
vout_FlushSubpictureChannel
(
p_vout
,
SPU_DEFAULT_CHANNEL
);
vout_FlushSubpictureChannel
(
p_vout
,
SPU_DEFAULT_CHANNEL
);
for
(
int
i
=
0
;
i
<
CHANNELS_NUMBER
;
i
++
)
vout_FlushSubpictureChannel
(
p_vout
,
p_intf
->
p_sys
->
slider_chan
);
vout_FlushSubpictureChannel
(
p_vout
,
p_intf
->
p_sys
->
p_channels
[
i
]
);
}
}
}
}
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