Преглед изворни кода

ffmpeg-mux: 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 година
родитељ
комит
cef0689a36
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c

+ 2 - 0
plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c

@@ -646,6 +646,8 @@ int main(int argc, char *argv[])
 #ifdef _WIN32
 	char **argv;
 
+	SetErrorMode(SEM_FAILCRITICALERRORS);
+
 	argv = malloc(argc * sizeof(char*));
 	for (int i = 0; i < argc; i++) {
 		size_t len = wcslen(argv_w[i]);