Commit dcc36eb2 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Win32: move MessageBox error from libVLC to vlc.exe

One might want to handle libvlc creation errors in a different way
parent c51906de
......@@ -154,6 +154,12 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
libvlc_wait (vlc);
libvlc_release (vlc);
}
else
MessageBox (NULL, TEXT("VLC media player could not start.\n"
"Either the command line options were invalid or no plugins were found.\n"),
TEXT("VLC media player"),
MB_OK|MB_ICONERROR);
for (int i = 0; i < argc; i++)
free (argv[i]);
......
......@@ -201,11 +201,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
int vlc_optind;
if( config_LoadCmdLine( p_libvlc, i_argc, ppsz_argv, &vlc_optind ) )
{
#ifdef WIN32
MessageBox (NULL, TEXT("The command line options could not be parsed.\n"
"Make sure they are valid."), TEXT("VLC media player"),
MB_OK|MB_ICONERROR);
#endif
module_EndBank (true);
return VLC_EGENERIC;
}
......
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