]> git.sesse.net Git - vlc/commitdiff
Win32: move MessageBox error from libVLC to vlc.exe
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 14 Mar 2013 15:57:37 +0000 (16:57 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 14 Mar 2013 15:57:37 +0000 (16:57 +0100)
One might want to handle libvlc creation errors in a different way

bin/winvlc.c
src/libvlc.c

index 59e64fa12915741ccc94a84aba5628fa722130d9..db97bae35cf4465b2bf546fd612dbdef9724e3e8 100644 (file)
@@ -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]);
index 5a68f329474eeba3dac0476c2f68147252b1e212..16b08655eba438000fb0f8de4df216ae53db9163 100644 (file)
@@ -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;
     }