win32.c: wasn't passing along mode2 form1 when requested.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: ioctl.c,v 1.2 2004/03/06 11:07:02 rocky Exp $
|
$Id: ioctl.c,v 1.3 2004/03/06 18:05:37 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: ioctl.c,v 1.2 2004/03/06 11:07:02 rocky Exp $";
|
static const char _rcsid[] = "$Id: ioctl.c,v 1.3 2004/03/06 18:05:37 rocky Exp $";
|
||||||
|
|
||||||
#include <cdio/cdio.h>
|
#include <cdio/cdio.h>
|
||||||
#include <cdio/sector.h>
|
#include <cdio/sector.h>
|
||||||
@@ -176,8 +176,7 @@ win32ioctl_is_cdrom(const char c_drive_letter)
|
|||||||
{
|
{
|
||||||
|
|
||||||
UINT uDriveType;
|
UINT uDriveType;
|
||||||
char sz_win32_drive[5];
|
char sz_win32_drive[4];
|
||||||
DWORD dwAccessFlags;
|
|
||||||
|
|
||||||
sz_win32_drive[0]= c_drive_letter;
|
sz_win32_drive[0]= c_drive_letter;
|
||||||
sz_win32_drive[1]=':';
|
sz_win32_drive[1]=':';
|
||||||
@@ -187,9 +186,11 @@ win32ioctl_is_cdrom(const char c_drive_letter)
|
|||||||
uDriveType = GetDriveType(sz_win32_drive);
|
uDriveType = GetDriveType(sz_win32_drive);
|
||||||
|
|
||||||
switch(uDriveType) {
|
switch(uDriveType) {
|
||||||
case DRIVE_CDROM:
|
case DRIVE_CDROM: {
|
||||||
dwAccessFlags = GENERIC_READ | GENERIC_WRITE;
|
char sz_win32_drive_full[] = "\\\\.\\X:";
|
||||||
return strdup(sz_win32_drive);
|
sz_win32_drive_full[4] = c_drive_letter;
|
||||||
|
return strdup(sz_win32_drive_full);
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
cdio_debug("Drive %c is not a CD-ROM", c_drive_letter);
|
cdio_debug("Drive %c is not a CD-ROM", c_drive_letter);
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -431,6 +432,7 @@ win32ioctl_get_mcn (_img_private_t *env) {
|
|||||||
memset( &mcn, 0, sizeof(mcn) );
|
memset( &mcn, 0, sizeof(mcn) );
|
||||||
|
|
||||||
q_data_format.Format = IOCTL_CDROM_MEDIA_CATALOG;
|
q_data_format.Format = IOCTL_CDROM_MEDIA_CATALOG;
|
||||||
|
|
||||||
q_data_format.Track=1;
|
q_data_format.Track=1;
|
||||||
|
|
||||||
if( DeviceIoControl( env->h_device_handle,
|
if( DeviceIoControl( env->h_device_handle,
|
||||||
@@ -438,7 +440,7 @@ win32ioctl_get_mcn (_img_private_t *env) {
|
|||||||
&q_data_format, sizeof(q_data_format),
|
&q_data_format, sizeof(q_data_format),
|
||||||
&mcn, sizeof(mcn),
|
&mcn, sizeof(mcn),
|
||||||
&dwBytesReturned, NULL ) == 0 ) {
|
&dwBytesReturned, NULL ) == 0 ) {
|
||||||
cdio_warn( "could not read Q Channel at track 1");
|
cdio_warn( "could not read Q Channel at track %d", 1);
|
||||||
} else if (mcn.Mcval)
|
} else if (mcn.Mcval)
|
||||||
return strdup(mcn.MediaCatalog);
|
return strdup(mcn.MediaCatalog);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: win32.c,v 1.1 2004/03/05 12:32:45 rocky Exp $
|
$Id: win32.c,v 1.2 2004/03/06 18:05:37 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: win32.c,v 1.1 2004/03/05 12:32:45 rocky Exp $";
|
static const char _rcsid[] = "$Id: win32.c,v 1.2 2004/03/06 18:05:37 rocky Exp $";
|
||||||
|
|
||||||
#include <cdio/cdio.h>
|
#include <cdio/cdio.h>
|
||||||
#include <cdio/sector.h>
|
#include <cdio/sector.h>
|
||||||
@@ -268,7 +268,7 @@ _cdio_read_mode2_sectors (void *user_data, void *data, lsn_t lsn,
|
|||||||
return retval;
|
return retval;
|
||||||
} else {
|
} else {
|
||||||
char buf[M2RAW_SECTOR_SIZE] = { 0, };
|
char buf[M2RAW_SECTOR_SIZE] = { 0, };
|
||||||
if ( (retval = _cdio_read_mode2_sector (env, buf, lsn + i, true)) )
|
if ( (retval = _cdio_read_mode2_sector (env, buf, lsn + i, false)) )
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
memcpy (((char *)data) + (CDIO_CD_FRAMESIZE * i),
|
memcpy (((char *)data) + (CDIO_CD_FRAMESIZE * i),
|
||||||
|
|||||||
Reference in New Issue
Block a user