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=51505
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit dbf3b3b6bf
)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
parent
8cc412b90c
commit
c55a6b6407
|
@ -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(msacm))
|
||||
|
|
Loading…
Reference in New Issue