1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 20:06:18 +00:00

midimap: Add warning for user in case midi won't work.

Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Fabian Maurer 2017-09-30 22:07:08 +02:00 committed by Alexandre Julliard
parent f9a5ad1348
commit e9d25b834c

View File

@ -77,6 +77,7 @@
*/
WINE_DEFAULT_DEBUG_CHANNEL(msacm);
WINE_DECLARE_DEBUG_CHANNEL(winediag);
typedef struct tagMIDIOUTPORT
{
@ -553,6 +554,8 @@ static LRESULT MIDIMAP_drvOpen(void)
{
MIDIOUTCAPSW moc;
unsigned dev, i;
WCHAR throughportW[] = {'M','i','d','i',' ','T','h','r','o','u','g','h',0};
BOOL found_valid_port = FALSE;
if (midiOutPorts)
return 0;
@ -571,6 +574,8 @@ static LRESULT MIDIMAP_drvOpen(void)
midiOutPorts[dev].lpbPatch = NULL;
for (i = 0; i < 16; i++)
midiOutPorts[dev].aChn[i] = i;
if (strncmpW(midiOutPorts[0].name, throughportW, strlenW(throughportW)) != 0)
found_valid_port = TRUE;
}
else
{
@ -578,6 +583,9 @@ static LRESULT MIDIMAP_drvOpen(void)
}
}
if (!found_valid_port)
ERR_(winediag)("No software synthesizer midi port found, Midi sound output probably won't work.\n");
return 1;
}