winmm: Add .wav extension when searching for PlaySound.

This commit is contained in:
Akihiro Sagawa 2015-02-25 01:38:47 +09:00 committed by Alexandre Julliard
parent e808fb1962
commit 563a4ff08b
2 changed files with 3 additions and 2 deletions

View File

@ -55,11 +55,12 @@ static HMMIO get_mmioFromFile(LPCWSTR lpszName)
HMMIO ret;
WCHAR buf[256];
LPWSTR dummy;
static const WCHAR dotwav[] = {'.','w','a','v',0};
ret = mmioOpenW((LPWSTR)lpszName, NULL,
MMIO_ALLOCBUF | MMIO_READ | MMIO_DENYWRITE);
if (ret != 0) return ret;
if (SearchPathW(NULL, lpszName, NULL, sizeof(buf)/sizeof(buf[0]), buf, &dummy))
if (SearchPathW(NULL, lpszName, dotwav, sizeof(buf)/sizeof(buf[0]), buf, &dummy))
{
return mmioOpenW(buf, NULL,
MMIO_ALLOCBUF | MMIO_READ | MMIO_DENYWRITE);

View File

@ -1676,7 +1676,7 @@ static void test_PlaySound(void)
/* no extensions */
*exts = '\0';
br = PlaySoundA(temp, NULL, SND_FILENAME | SND_NODEFAULT);
todo_wine ok(br, "PlaySound failed, got %d\n", br);
ok(br, "PlaySound failed, got %d\n", br);
/* ends with a dot */
strcpy(exts, ".");