Commit 68f180cd authored by Geoffroy Couprie's avatar Geoffroy Couprie

Win32: add a --no-crashdump option

parent 91df399a
...@@ -120,10 +120,31 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, ...@@ -120,10 +120,31 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
return 1; return 1;
char *argv[argc + 1]; char *argv[argc + 1];
BOOL crash_handling = TRUE;
int j = 0;
for (int i = 0; i < argc; i++) for (int i = 0; i < argc; i++)
argv[i] = FromWide (wargv[i]); {
if(!wcscmp(wargv[i], L"--no-crashdump"))
{
crash_handling = FALSE;
}
else
{
argv[j] = FromWide (wargv[i]);
j++;
}
}
argc = j;
argv[argc] = NULL; argv[argc] = NULL;
LocalFree (wargv); LocalFree (wargv);
if(crash_handling)
{
check_crashdump();
SetUnhandledExceptionFilter(vlc_exception_filter);
}
#else #else
char **argv, psz_cmdline[wcslen(lpCmdLine) * 4]; char **argv, psz_cmdline[wcslen(lpCmdLine) * 4];
...@@ -137,11 +158,6 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, ...@@ -137,11 +158,6 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
libvlc_exception_init (&ex); libvlc_exception_init (&ex);
libvlc_exception_init (&dummy); libvlc_exception_init (&dummy);
#if !defined( UNDER_CE )
check_crashdump();
SetUnhandledExceptionFilter(vlc_exception_filter);
#endif
/* Initialize libvlc */ /* Initialize libvlc */
libvlc_instance_t *vlc; libvlc_instance_t *vlc;
vlc = libvlc_new (argc - 1, (const char **)argv + 1, &ex); vlc = libvlc_new (argc - 1, (const char **)argv + 1, &ex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment