changeset 13011:5dc4583b1901

mpdvdkit now accepts X:\ as a device name, as well as X:
author joey
date Thu, 12 Aug 2004 22:37:08 +0000
parents 047bbb973011
children 2d188ebe0f3b
files libmpdvdkit2/device.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdvdkit2/device.c	Thu Aug 12 22:33:21 2004 +0000
+++ b/libmpdvdkit2/device.c	Thu Aug 12 22:37:08 2004 +0000
@@ -134,8 +134,11 @@
     _dvdcss_debug( dvdcss, psz_debug );
 
 #if defined( WIN32 )
-    /* If device is not "X:", we are actually opening a file. */
-    dvdcss->b_file = !psz_device[0] || psz_device[1] != ':' || psz_device[2];
+    dvdcss->b_file = 1;
+    /* If device is "X:" or "X:\", we are not actually opening a file. */
+    if (psz_device[0] && psz_device[1] == ':' &&
+       (!psz_device[2] || (psz_device[2] == '\\' && !psz_device[3])))
+        dvdcss->b_file = 0;
 
     /* Initialize readv temporary buffer */
     dvdcss->p_readv_buffer   = NULL;