[ros-diffs] [gschneider] 47446: [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.

gschneider at svn.reactos.org gschneider at svn.reactos.org
Sun May 30 17:13:05 CEST 2010


Author: gschneider
Date: Sun May 30 17:13:04 2010
New Revision: 47446

URL: http://svn.reactos.org/svn/reactos?rev=47446&view=rev
Log:
[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.

Modified:
    trunk/reactos/dll/cpl/mmsys/sounds.c

Modified: trunk/reactos/dll/cpl/mmsys/sounds.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/mmsys/sounds.c?rev=47446&r1=47445&r2=47446&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/mmsys/sounds.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/mmsys/sounds.c [iso-8859-1] Sun May 30 17:13:04 2010
@@ -718,6 +718,14 @@
     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)
     {
@@ -735,11 +743,6 @@
     if (hFile == INVALID_HANDLE_VALUE)
     {
         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 @@
                     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;




More information about the Ros-diffs mailing list