Commit dbf3b3b6 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

midimap: Introduce XP form and prefer it.

Since XP form doesn't support channel mappings, old form is remained for compatiblity. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51505Signed-off-by: 's avatarAkihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 1e02ef40
......@@ -36,7 +36,15 @@
/*
* Here's how Windows stores the midiOut mapping information.
*
* Full form (in HKU) is:
* Windows XP form (in HKU) is:
*
* [Software\\Microsoft\\Windows\\CurrentVersion\\Multimedia\\MIDIMap]
* "szPname"="TiMidity port 0"
* (incomplete)
*
* szPname: name of midiOut device to use.
*
* If szPname isn't defined, we use Windows 2000 form (also in HKU):
*
* [Software\\Microsoft\\Windows\\CurrentVersion\\Multimedia\\MIDIMap] 988836060
* "AutoScheme"=dword:00000000
......@@ -216,6 +224,13 @@ static BOOL MIDIMAP_LoadSettings(MIDIMAPDATA* mom)
DWORD type, size, out;
WCHAR buffer[256];
size = sizeof(buffer);
if (!RegQueryValueExW(hKey, L"szPname", 0, &type, (void*)buffer, &size))
{
ret = MIDIMAP_LoadSettingsDefault(mom, buffer);
}
else
{
ret = 2;
size = sizeof(out);
if (!RegQueryValueExA(hKey, "UseScheme", 0, &type, (void*)&out, &size) && out)
......@@ -244,6 +259,7 @@ static BOOL MIDIMAP_LoadSettings(MIDIMAPDATA* mom)
}
}
}
}
RegCloseKey(hKey);
if (ret && TRACE_ON(midi))
......
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