Sfoglia il codice sorgente

get-graphics-offsets: Set error mode to SEM_FAILCRITICALERRORS

This prevents spurious dialog boxes appearing, such as "No disk is in the
drive" if the application attempts to access an invalid drive.
Richard Stanway 8 anni fa
parent
commit
8ad8e18d04

+ 2 - 0
plugins/win-capture/get-graphics-offsets/get-graphics-offsets.c

@@ -15,6 +15,8 @@ int main(int argc, char *argv[])
 	wc.lpfnWndProc   = (WNDPROC)DefWindowProcA;
 	wc.lpszClassName = DUMMY_WNDCLASS;
 
+	SetErrorMode(SEM_FAILCRITICALERRORS);
+
 	if (!RegisterClassA(&wc)) {
 		printf("failed to register '%s'\n", DUMMY_WNDCLASS);
 		return -1;