Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9a82c807
Commit
9a82c807
authored
Aug 18, 2008
by
Christian Costa
Committed by
Alexandre Julliard
Aug 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winealsa.drv: Improve midi port names.
parent
984bff49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
midi.c
dlls/winealsa.drv/midi.c
+24
-2
No files found.
dlls/winealsa.drv/midi.c
View file @
9a82c807
...
...
@@ -1115,6 +1115,8 @@ static DWORD modReset(WORD wDevID)
*/
static
void
ALSA_AddMidiPort
(
snd_seq_client_info_t
*
cinfo
,
snd_seq_port_info_t
*
pinfo
,
int
cap
,
int
type
)
{
char
midiPortName
[
MAXPNAMELEN
];
if
(
cap
&
SND_SEQ_PORT_CAP_WRITE
)
{
TRACE
(
"OUT (%d:%s:%s:%d:%s:%x)
\n
"
,
snd_seq_client_info_get_client
(
cinfo
),
snd_seq_client_info_get_name
(
cinfo
),
...
...
@@ -1146,7 +1148,17 @@ static void ALSA_AddMidiPort(snd_seq_client_info_t* cinfo, snd_seq_port_info_t*
* not MIDICAPS_CACHE.
*/
MidiOutDev
[
MODM_NumDevs
].
caps
.
dwSupport
=
MIDICAPS_VOLUME
|
MIDICAPS_LRVOLUME
;
MultiByteToWideChar
(
CP_ACP
,
0
,
snd_seq_client_info_get_name
(
cinfo
),
-
1
,
/* Try to use both client and port names, if this is too long take the port name only.
In the second case the port name should be explicit enough due to its big size.
*/
if
(
(
strlen
(
snd_seq_client_info_get_name
(
cinfo
))
+
strlen
(
snd_seq_port_info_get_name
(
pinfo
))
+
3
)
<
MAXPNAMELEN
)
{
sprintf
(
midiPortName
,
"%s - %s"
,
snd_seq_client_info_get_name
(
cinfo
),
snd_seq_port_info_get_name
(
pinfo
));
}
else
{
lstrcpynA
(
midiPortName
,
snd_seq_port_info_get_name
(
pinfo
),
MAXPNAMELEN
-
1
);
midiPortName
[
MAXPNAMELEN
-
1
]
=
0
;
}
MultiByteToWideChar
(
CP_ACP
,
0
,
midiPortName
,
-
1
,
MidiOutDev
[
MODM_NumDevs
].
caps
.
szPname
,
sizeof
(
MidiOutDev
[
MODM_NumDevs
].
caps
.
szPname
)
/
sizeof
(
WCHAR
));
...
...
@@ -1201,7 +1213,17 @@ static void ALSA_AddMidiPort(snd_seq_client_info_t* cinfo, snd_seq_port_info_t*
* not MIDICAPS_CACHE.
*/
MidiInDev
[
MIDM_NumDevs
].
caps
.
dwSupport
=
MIDICAPS_VOLUME
|
MIDICAPS_LRVOLUME
;
MultiByteToWideChar
(
CP_ACP
,
0
,
snd_seq_client_info_get_name
(
cinfo
),
-
1
,
/* Try to use both client and port names, if this is too long take the port name only.
In the second case the port name should be explicit enough due to its big size.
*/
if
(
(
strlen
(
snd_seq_client_info_get_name
(
cinfo
))
+
strlen
(
snd_seq_port_info_get_name
(
pinfo
))
+
3
)
<
MAXPNAMELEN
)
{
sprintf
(
midiPortName
,
"%s - %s"
,
snd_seq_client_info_get_name
(
cinfo
),
snd_seq_port_info_get_name
(
pinfo
));
}
else
{
lstrcpynA
(
midiPortName
,
snd_seq_port_info_get_name
(
pinfo
),
MAXPNAMELEN
-
1
);
midiPortName
[
MAXPNAMELEN
-
1
]
=
0
;
}
MultiByteToWideChar
(
CP_ACP
,
0
,
midiPortName
,
-
1
,
MidiInDev
[
MIDM_NumDevs
].
caps
.
szPname
,
sizeof
(
MidiInDev
[
MIDM_NumDevs
].
caps
.
szPname
)
/
sizeof
(
WCHAR
));
MidiInDev
[
MIDM_NumDevs
].
state
=
0
;
...
...
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