vlc | branch: master | Jean-Baptiste Kempf <[email protected]> | Thu Mar 14 16:57:37 2013 +0100| [dcc36eb2efb8a4870b15bbbf48bd15302c9478fb] | committer: Jean-Baptiste Kempf
Win32: move MessageBox error from libVLC to vlc.exe One might want to handle libvlc creation errors in a different way > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dcc36eb2efb8a4870b15bbbf48bd15302c9478fb --- bin/winvlc.c | 6 ++++++ src/libvlc.c | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/winvlc.c b/bin/winvlc.c index 59e64fa..db97bae 100644 --- a/bin/winvlc.c +++ b/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]); diff --git a/src/libvlc.c b/src/libvlc.c index 5a68f32..16b0865 100644 --- a/src/libvlc.c +++ b/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; } _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
