[MPlayer-cvslog] r20241 - trunk/Gui/win32/gui.c

reimar subversion at mplayerhq.hu
Sun Oct 15 17:34:50 CEST 2006


Author: reimar
Date: Sun Oct 15 17:34:50 2006
New Revision: 20241

Modified:
   trunk/Gui/win32/gui.c

Log:
Set SetErrorMode to make sure no dialog box will pop up when no disk in CD/DVD drive.


Modified: trunk/Gui/win32/gui.c
==============================================================================
--- trunk/Gui/win32/gui.c	(original)
+++ trunk/Gui/win32/gui.c	Sun Oct 15 17:34:50 2006
@@ -838,9 +838,11 @@
             char searchpath3[MAX_PATH];
 #endif
             int len, pos = 0, cdromdrive = 0;
+            UINT errmode;
             point.x = GET_X_LPARAM(lParam);
             point.y = GET_Y_LPARAM(lParam);
             ClientToScreen(hWnd, &point);
+            errmode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
             len = GetLogicalDriveStrings(MAX_PATH, device);
             while(pos < len)
             {
@@ -865,6 +867,7 @@
                 }
                 pos += strlen(device + pos) + 1;
             }
+            SetErrorMode(errmode);
             TrackPopupMenu(gui->menu, 0, point.x, point.y, 0, hWnd, NULL);
             return 0;
         }



More information about the MPlayer-cvslog mailing list