Index: libdvdread/src/dvd_reader.c =================================================================== --- libdvdread/src/dvd_reader.c (revision 1217) +++ libdvdread/src/dvd_reader.c (working copy) @@ -35,6 +35,7 @@ /* misc win32 helpers */ #ifdef WIN32 +#include #ifndef HAVE_GETTIMEOFDAY /* replacement gettimeofday implementation */ #include @@ -522,17 +523,21 @@ } fclose( mntfile ); } -#elif defined(_WIN32) || defined(__OS2__) -#ifdef __OS2__ +#elif defined(_WIN32) + if( GetDriveTypeA( path_copy ) == DRIVE_CDROM ) { + path_copy[2] = '\0'; + auth_drive = DVDOpenImageFile( path_copy, have_css ); + dev_name = strdup( path_copy ); + } +#elif defined(__OS2__) /* Use DVDOpenImageFile() only if it is a drive */ if(isalpha(path[0]) && path[1] == ':' && ( !path[2] || ((path[2] == '\\' || path[2] == '/') && !path[3]))) -#endif auth_drive = DVDOpenImageFile( path, have_css ); #endif -#if !defined(_WIN32) && !defined(__OS2__) +#if !defined(__OS2__) if( !dev_name ) { fprintf( stderr, "libdvdread: Couldn't find device name.\n" ); } else if( !auth_drive ) {