mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 11:52:32 +01:00
- warn about CdSearchFile called doring CdlReadS
This commit is contained in:
parent
54ab7236f8
commit
8a9b42ee2c
@ -51,6 +51,8 @@ int g_cdCurrentTrack = 1; // default
|
||||
int g_cdNumFrames = 0;
|
||||
int g_CD_com = 0;
|
||||
|
||||
bool g_cdReadDoneFlag = true;
|
||||
|
||||
char g_cdImageBinaryFileName[2048] = { 0 };
|
||||
int g_UseCDImage = 0;
|
||||
|
||||
@ -156,6 +158,15 @@ CdlFILE* CdSearchFile(CdlFILE* fp, char* name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
assert(g_cdReadDoneFlag == true);
|
||||
|
||||
if (!g_cdReadDoneFlag)
|
||||
{
|
||||
// deny request
|
||||
eprintwarn("CdSearchFile called while in 'CdlReadS'\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
eprintf("CdSearchFile: %s\n", name);
|
||||
#endif
|
||||
@ -725,7 +736,6 @@ CdlCB g_readyCallback = NULL;
|
||||
Sector g_cdSectorData;
|
||||
|
||||
bool g_isCdSectorDataRead = false;
|
||||
bool g_cdReadDoneFlag = false;
|
||||
|
||||
SDL_Thread* g_cdSpoolerPCThread = NULL;
|
||||
SDL_mutex* g_cdSpoolerMutex = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user