Changeset 7777 for trunk/src


Ignore:
Timestamp:
Jan 18, 2002, 5:23:35 PM (24 years ago)
Author:
sandervl
Message:

VP: GetDriveType fix for detection cdrom drives under certain circumstances (when cdrom is not the last drive letter)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/oslibdos.cpp

    r7744 r7777  
    1 /* $Id: oslibdos.cpp,v 1.93 2002-01-08 22:34:10 sandervl Exp $ */
     1/* $Id: oslibdos.cpp,v 1.94 2002-01-18 16:23:35 sandervl Exp $ */
    22/*
    33 * Wrappers for OS/2 Dos* API
     
    26482648        {
    26492649            // this is a CDROM/DVD drive
    2650             if(cdinfo.first <= DriveIndex && DriveIndex < cdinfo.first + cdinfo.count)
    2651                 device.fsDeviceAttr |= CDType;
     2650            // CDROM detection fix
     2651            // when cdrom is not last drive letter that sometimes
     2652            // reports wrong index, have to check that device type
     2653            // can be a CDROM one
     2654            if(device.bDeviceType == 7 || device.bDeviceType == 8) // Other or RW optical
     2655            // /CDROM detection fix
     2656                if(cdinfo.first <= DriveIndex && DriveIndex < cdinfo.first + cdinfo.count)
     2657                    device.fsDeviceAttr |= CDType;
    26522658        }
    26532659        DosClose(handle);
     
    26882694                        else device.fsDeviceAttr |= OpticalType;
    26892695                    }
     2696                    // CDROM detection fix
     2697                    else
     2698                    {
     2699                        // device is removable non-FAT, maybe it is CD?
     2700                        if (device.bDeviceType == 7 &&
     2701                            device.bMedia == 5 &&
     2702                            device.usBytesPerSector > 512)
     2703                        {
     2704                            device.fsDeviceAttr |= CDType;
     2705                        }
     2706                    }
     2707                    // CDROM detection fix
    26902708                 }
    26912709            }
Note: See TracChangeset for help on using the changeset viewer.