Merge pull request #141 from lioncash/cdvdghz

cdvdGigaherz: Fix a few things
This commit is contained in:
David Quintana 2014-07-16 20:50:40 +02:00
commit cea03d91e4
4 changed files with 17 additions and 20 deletions

View File

@ -132,15 +132,13 @@ void __inline lba_to_msf(s32 lba, u8* m, u8* s, u8* f) {
char csrc[20];
BOOL cdvd_is_open=FALSE;
BOOL cdvdKeepAlive_is_open = false;
bool cdvd_is_open = false;
bool cdvdKeepAlive_is_open = false;
bool disc_has_changed = false;
bool weAreInNewDiskCB = false;
Source *src;
s32 disc_has_changed=0;
int weAreInNewDiskCB=0;
char bfr[2352];
char throwaway[2352];
extern s32 prefetch_last_lba;

View File

@ -160,14 +160,13 @@ void WriteSettings();
void CfgSetSettingsDir( const char* dir );
extern char csrc[];
extern BOOL cdvd_is_open;
extern BOOL cdvdKeepAlive_is_open;
extern int weAreInNewDiskCB;
extern bool cdvd_is_open;
extern bool cdvdKeepAlive_is_open;
extern bool disc_has_changed;
extern bool weAreInNewDiskCB;
extern void (*newDiscCB)();
extern s32 disc_has_changed;
s32 cdvdStartThread();
void cdvdStopThread();
s32 cdvdRequestSector(u32 sector, s32 mode);

View File

@ -35,7 +35,7 @@ void FileStream::seek(s64 offset)
void FileStream::seek(s64 offset, int ref_position)
{
int ret = _fseeki64(handle, offset, SEEK_SET);
int ret = _fseeki64(handle, offset, ref_position);
#ifdef __LINUX__
if (ret) throw "Seek offset out of bounds.";
#else

View File

@ -110,9 +110,9 @@ void cdvdCacheReset()
void cdvdCallNewDiscCB()
{
weAreInNewDiskCB=1;
weAreInNewDiskCB = true;
newDiscCB();
weAreInNewDiskCB=0;
weAreInNewDiskCB = false;
}
bool cdvdUpdateDiscStatus()
@ -140,9 +140,9 @@ bool cdvdUpdateDiscStatus()
{
if(!disc_has_changed)
{
disc_has_changed=1;
curDiskType=CDVD_TYPE_NODISC;
curTrayStatus=CDVD_TRAY_OPEN;
disc_has_changed = true;
curDiskType = CDVD_TYPE_NODISC;
curTrayStatus = CDVD_TRAY_OPEN;
cdvdCallNewDiscCB();
}
}
@ -150,13 +150,13 @@ bool cdvdUpdateDiscStatus()
{
if(disc_has_changed)
{
curDiskType=CDVD_TYPE_NODISC;
curTrayStatus=CDVD_TRAY_CLOSE;
curDiskType = CDVD_TYPE_NODISC;
curTrayStatus = CDVD_TRAY_CLOSE;
// just a test
src->Reopen();
disc_has_changed=0;
disc_has_changed = false;
cdvdRefreshData();
cdvdCallNewDiscCB();
}