Commit e9d25b83 authored by Fabian Maurer's avatar Fabian Maurer Committed by Alexandre Julliard

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

parent f9a5ad13
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment