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
edcc62d1
Commit
edcc62d1
authored
Dec 15, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hotkeys: adapt to new device selection
parent
429b94d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
36 deletions
+16
-36
modules/control/hotkeys.c
modules/control/hotkeys.c
+16
-36
No files found.
modules/control/hotkeys.c
View file @
edcc62d1
...
...
@@ -319,48 +319,28 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
if
(
p_aout
==
NULL
)
break
;
vlc_value_t
val
,
list
,
list2
;
int
i_count
,
i
;
vlc_value_t
val
,
ids
,
names
;
var_Get
(
p_aout
,
"audio-device"
,
&
val
);
var_Change
(
p_aout
,
"audio-device"
,
VLC_VAR_GETCHOICES
,
&
list
,
&
list2
);
i_count
=
list
.
p_list
->
i_count
;
var_Get
(
p_aout
,
"device"
,
&
val
);
var_Change
(
p_aout
,
"device"
,
VLC_VAR_GETCHOICES
,
&
ids
,
&
names
);
if
(
i_count
>
1
)
for
(
int
i
=
0
;
i
<
ids
.
p_list
->
i_count
;
i
++
)
{
for
(
i
=
0
;
i
<
i_count
;
i
++
)
{
if
(
val
.
i_int
==
list
.
p_list
->
p_values
[
i
].
i_int
)
{
break
;
}
}
if
(
i
==
i_count
)
if
(
!
strcmp
(
val
.
psz_string
,
ids
.
p_list
->
p_values
[
i
].
psz_string
)
)
{
msg_Warn
(
p_aout
,
"invalid current audio device, selecting 0"
);
var_Set
(
p_aout
,
"audio-device"
,
list
.
p_list
->
p_values
[
0
]
);
i
=
0
;
}
else
if
(
i
==
i_count
-
1
)
{
var_Set
(
p_aout
,
"audio-device"
,
list
.
p_list
->
p_values
[
0
]
);
i
=
0
;
}
else
{
var_Set
(
p_aout
,
"audio-device"
,
list
.
p_list
->
p_values
[
i
+
1
]
);
i
++
;
int
j
=
i
+
1
;
if
(
j
>=
ids
.
p_list
->
i_count
)
j
=
0
;
DisplayMessage
(
p_vout
,
SPU_DEFAULT_CHANNEL
,
_
(
"Audio Device: %s"
),
names
.
p_list
->
p_values
[
j
].
psz_string
);
var_Set
(
p_aout
,
"device"
,
ids
.
p_list
->
p_values
[
j
]
);
break
;
}
DisplayMessage
(
p_vout
,
SPU_DEFAULT_CHANNEL
,
_
(
"Audio Device: %s"
),
list2
.
p_list
->
p_values
[
i
].
psz_string
);
}
var_FreeList
(
&
list
,
&
list2
);
var_FreeList
(
&
ids
,
&
names
);
vlc_object_release
(
p_aout
);
break
;
}
...
...
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