From 5c98e52e544cb0b3a8669ddc399426c9e012044d Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 15 Oct 2006 15:34:50 +0000 Subject: Set SetErrorMode to make sure no dialog box will pop up when no disk in CD/DVD drive. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20241 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Gui/win32/gui.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Gui') diff --git a/Gui/win32/gui.c b/Gui/win32/gui.c index 3435e2a3c3..0863c6631a 100644 --- a/Gui/win32/gui.c +++ b/Gui/win32/gui.c @@ -838,9 +838,11 @@ static LRESULT CALLBACK EventProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM 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 @@ static LRESULT CALLBACK EventProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM } pos += strlen(device + pos) + 1; } + SetErrorMode(errmode); TrackPopupMenu(gui->menu, 0, point.x, point.y, 0, hWnd, NULL); return 0; } -- cgit v1.2.3