Fix PlaySound.
This commit is contained in:
parent
f28da5a844
commit
8b0b70ab50
|
@ -68,6 +68,7 @@ static HMMIO get_mmioFromProfile(UINT uFlags, LPCWSTR lpszName)
|
||||||
'S','c','h','e','m','e','s','\\',
|
'S','c','h','e','m','e','s','\\',
|
||||||
'A','p','p','s',0};
|
'A','p','p','s',0};
|
||||||
static const WCHAR wszDotDefault[] = {'.','D','e','f','a','u','l','t',0};
|
static const WCHAR wszDotDefault[] = {'.','D','e','f','a','u','l','t',0};
|
||||||
|
static const WCHAR wszDotCurrent[] = {'.','C','u','r','r','e','n','t',0};
|
||||||
static const WCHAR wszNull[] = {0};
|
static const WCHAR wszNull[] = {0};
|
||||||
|
|
||||||
TRACE("searching in SystemSound list for %s\n", debugstr_w(lpszName));
|
TRACE("searching in SystemSound list for %s\n", debugstr_w(lpszName));
|
||||||
|
@ -101,7 +102,7 @@ static HMMIO get_mmioFromProfile(UINT uFlags, LPCWSTR lpszName)
|
||||||
if (*ptr == '.') *ptr = 0;
|
if (*ptr == '.') *ptr = 0;
|
||||||
if (*ptr == '\\')
|
if (*ptr == '\\')
|
||||||
{
|
{
|
||||||
err = RegOpenKeyW(hRegSnd, str, &hRegApp);
|
err = RegOpenKeyW(hRegSnd, ptr+1, &hRegApp);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -116,9 +117,15 @@ static HMMIO get_mmioFromProfile(UINT uFlags, LPCWSTR lpszName)
|
||||||
err = RegOpenKeyW(hRegApp, lpszName, &hScheme);
|
err = RegOpenKeyW(hRegApp, lpszName, &hScheme);
|
||||||
RegCloseKey(hRegApp);
|
RegCloseKey(hRegApp);
|
||||||
if (err != 0) goto none;
|
if (err != 0) goto none;
|
||||||
|
/* what's the difference between .Current and .Default ? */
|
||||||
err = RegOpenKeyW(hScheme, wszDotDefault, &hSnd);
|
err = RegOpenKeyW(hScheme, wszDotDefault, &hSnd);
|
||||||
RegCloseKey(hScheme);
|
if (err != 0)
|
||||||
if (err != 0) goto none;
|
{
|
||||||
|
err = RegOpenKeyW(hScheme, wszDotCurrent, &hSnd);
|
||||||
|
RegCloseKey(hScheme);
|
||||||
|
if (err != 0)
|
||||||
|
goto none;
|
||||||
|
}
|
||||||
count = sizeof(str)/sizeof(str[0]);
|
count = sizeof(str)/sizeof(str[0]);
|
||||||
err = RegQueryValueExW(hSnd, NULL, 0, &type, (LPBYTE)str, &count);
|
err = RegQueryValueExW(hSnd, NULL, 0, &type, (LPBYTE)str, &count);
|
||||||
RegCloseKey(hSnd);
|
RegCloseKey(hSnd);
|
||||||
|
|
Loading…
Reference in New Issue