Oops, looks like I broke raw disc reading under Win32 with a bad call to ReadFile. Now works again.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2428 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
a65517af16
commit
0cdb2308ab
|
@ -35,13 +35,16 @@ namespace DiscIO
|
|||
// Do a test read to make sure everything is OK, since it seems you can get
|
||||
// handles to empty drives.
|
||||
DWORD not_used;
|
||||
if (!ReadFile(hDisc, 0, m_blocksize, (LPDWORD)¬_used, NULL))
|
||||
u8 *buffer = new u8[m_blocksize];
|
||||
if (!ReadFile(hDisc, buffer, m_blocksize, (LPDWORD)¬_used, NULL))
|
||||
{
|
||||
delete [] buffer;
|
||||
// OK, something is wrong.
|
||||
CloseHandle(hDisc);
|
||||
hDisc = INVALID_HANDLE_VALUE;
|
||||
return;
|
||||
}
|
||||
delete [] buffer;
|
||||
|
||||
#ifdef _LOCKDRIVE // Do we want to lock the drive?
|
||||
// Lock the compact disc in the CD-ROM drive to prevent accidental
|
||||
|
|
Loading…
Reference in New Issue