mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
[MMSYS] Load the no sound item in the shared buffer before preparing the reactos/media path for loading individual files
See issue #5436 for more details. svn path=/trunk/; revision=47446
This commit is contained in:
parent
306e2ff6f2
commit
5df0484c21
1 changed files with 9 additions and 5 deletions
|
@ -718,6 +718,14 @@ LoadSoundFiles(HWND hwndDlg)
|
|||
LRESULT lResult;
|
||||
UINT length;
|
||||
|
||||
/* Add no sound listview item */
|
||||
if (LoadString(hApplet, IDS_NO_SOUND, szPath, MAX_PATH))
|
||||
{
|
||||
szPath[(sizeof(szPath)/sizeof(WCHAR))-1] = L'\0';
|
||||
SendDlgItemMessageW(hwndDlg, IDC_SOUND_LIST, CB_ADDSTRING, (WPARAM)0, (LPARAM)szPath);
|
||||
}
|
||||
|
||||
/* Load sound files */
|
||||
length = GetWindowsDirectoryW(szPath, MAX_PATH);
|
||||
if (length == 0 || length >= MAX_PATH - 9)
|
||||
{
|
||||
|
@ -736,11 +744,6 @@ LoadSoundFiles(HWND hwndDlg)
|
|||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (LoadString(hApplet, IDS_NO_SOUND, szPath, MAX_PATH))
|
||||
{
|
||||
szPath[(sizeof(szPath)/sizeof(WCHAR))-1] = L'\0';
|
||||
SendDlgItemMessageW(hwndDlg, IDC_SOUND_LIST, CB_ADDSTRING, (WPARAM)0, (LPARAM)szPath);
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -1054,6 +1057,7 @@ SoundsDlgProc(HWND hwndDlg,
|
|||
ZeroMemory(&item, sizeof(LVITEM));
|
||||
item.mask = LVIF_PARAM;
|
||||
item.iItem = nm->iItem;
|
||||
|
||||
if (ListView_GetItem(GetDlgItem(hwndDlg, IDC_SCHEME_LIST), &item))
|
||||
{
|
||||
LRESULT lCount, lIndex, lResult;
|
||||
|
|
Loading…
Reference in a new issue