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
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 )
...
@@ -319,48 +319,28 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
if
(
p_aout
==
NULL
)
if
(
p_aout
==
NULL
)
break
;
break
;
vlc_value_t
val
,
list
,
list2
;
vlc_value_t
val
,
ids
,
names
;
int
i_count
,
i
;
var_Get
(
p_aout
,
"audio-device"
,
&
val
);
var_Get
(
p_aout
,
"device"
,
&
val
);
var_Change
(
p_aout
,
"audio-device"
,
VLC_VAR_GETCHOICES
,
var_Change
(
p_aout
,
"device"
,
VLC_VAR_GETCHOICES
,
&
ids
,
&
names
);
&
list
,
&
list2
);
i_count
=
list
.
p_list
->
i_count
;
if
(
i_count
>
1
)
for
(
int
i
=
0
;
i
<
ids
.
p_list
->
i_count
;
i
++
)
{
{
for
(
i
=
0
;
i
<
i_count
;
i
++
)
if
(
!
strcmp
(
val
.
psz_string
,
{
ids
.
p_list
->
p_values
[
i
].
psz_string
)
)
if
(
val
.
i_int
==
list
.
p_list
->
p_values
[
i
].
i_int
)
{
break
;
}
}
if
(
i
==
i_count
)
{
{
msg_Warn
(
p_aout
,
int
j
=
i
+
1
;
"invalid current audio device, selecting 0"
);
if
(
j
>=
ids
.
p_list
->
i_count
)
var_Set
(
p_aout
,
"audio-device"
,
j
=
0
;
list
.
p_list
->
p_values
[
0
]
);
i
=
0
;
DisplayMessage
(
p_vout
,
SPU_DEFAULT_CHANNEL
,
}
_
(
"Audio Device: %s"
),
else
if
(
i
==
i_count
-
1
)
names
.
p_list
->
p_values
[
j
].
psz_string
);
{
var_Set
(
p_aout
,
"device"
,
ids
.
p_list
->
p_values
[
j
]
);
var_Set
(
p_aout
,
"audio-device"
,
break
;
list
.
p_list
->
p_values
[
0
]
);
i
=
0
;
}
else
{
var_Set
(
p_aout
,
"audio-device"
,
list
.
p_list
->
p_values
[
i
+
1
]
);
i
++
;
}
}
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
);
vlc_object_release
(
p_aout
);
break
;
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