]> git.sesse.net Git - vlc/commitdiff
* modules/demux/dvdnav.c, modules/access/dvdplay/tools.c: on win32, remove trailing...
authorGildas Bazin <gbazin@videolan.org>
Sat, 15 May 2004 12:22:03 +0000 (12:22 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sat, 15 May 2004 12:22:03 +0000 (12:22 +0000)
* vlc.win32.nsi: DVD and AudioCD handlers.

modules/access/dvdplay/tools.c
modules/demux/dvdnav.c
vlc.win32.nsi

index 06f3cc9a85a1227ed9f40493bc4eda61797db9f1..bd49d8f0acf5cadf9d140ff95710448aa6c3d262 100644 (file)
@@ -2,7 +2,7 @@
  * tools.c: tools for dvd plugin.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: tools.c,v 1.4 2003/01/28 15:05:52 massiot Exp $
+ * $Id$
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -107,6 +107,12 @@ char * dvdplay_ParseCL( input_thread_t * p_input,
     {
         /* Don't try to stat the file */
     }
+    else if( psz_source[0] && psz_source[1] == ':' &&
+             psz_source[2] == '\\' && psz_source[3] == '\0' )
+    {
+        /* Don't try to stat the file */
+        psz_source[2] = '\0';
+    }
     else
 #endif
     {
index 60a9688f0673a1b5d83e8ca925572ddded7a2297..fdd1cddf33b411901a8693aa4b1c9e51f4678312 100644 (file)
@@ -291,6 +291,14 @@ static char *ParseCL( vlc_object_t *p_this, char *psz_name, vlc_bool_t b_force,
         if( !psz_source ) return NULL;
     }
 
+#ifdef WIN32
+    if( psz_source[0] && psz_source[1] == ':' &&
+        psz_source[2] == '\\' && psz_source[3] == '\0' )
+    {
+        psz_source[2] = '\0';
+    }
+#endif
+
     msg_Dbg( p_this, "dvdroot=%s title=%d chapter=%d angle=%d",
              psz_source, *i_title, *i_chapter, *i_angle );
 
index eaa46b2c636b6863ff1894a08c3bc571b34c3f30..aba1f0afffd4304c7b1598a0f89823f43f075214 100644 (file)
@@ -142,6 +142,13 @@ Section "Media player (required)" SEC01
   WriteRegStr HKCR Applications\vlc.exe\shell\Play\command "" \\r
     '$INSTDIR\vlc.exe "%1"'\r
 \r
+  WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" "Play with VLC media player"\r
+  WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \\r
+    '$INSTDIR\vlc.exe cdda:%1'\r
+  WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" "Play with VLC media player"\r
+  WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \\r
+    '$INSTDIR\vlc.exe dvd:%1'\r
+\r
 SectionEnd\r
 \r
 Section "Start Menu + Desktop Shortcut" SEC02\r
@@ -299,6 +306,8 @@ Section Uninstall
   DeleteRegKey HKLM Software\VideoLAN\r
 \r
   DeleteRegKey HKCR Applications\vlc.exe\r
+  DeleteRegKey HKCR AudioCD\shell\PlayWithVLC\r
+  DeleteRegKey HKCR DVD\shell\PlayWithVLC\r
 \r
   DeleteRegKey HKLM \\r
     SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}\r