Browse Source

Win32: move MessageBox error from libVLC to vlc.exe

One might want to handle libvlc creation errors in a different way
pull/7/head
Jean-Baptiste Kempf 13 years ago
parent
commit
dcc36eb2ef
  1. 6
      bin/winvlc.c
  2. 5
      src/libvlc.c

6
bin/winvlc.c

@ -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]);

5
src/libvlc.c

@ -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;
}

Loading…
Cancel
Save