mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 20:02:33 +01:00
- [Psy-X] fix CD warnings
This commit is contained in:
parent
176b096a65
commit
f787df5d5d
@ -1658,8 +1658,6 @@ void DrawGame(void)
|
||||
return;
|
||||
}
|
||||
|
||||
static int frame = 0;
|
||||
|
||||
if (NumPlayers == 1 || NoPlayerControl)
|
||||
{
|
||||
ObjectDrawnValue = FrameCnt;
|
||||
|
@ -140,6 +140,19 @@ void _eCdControlF_Pause();
|
||||
|
||||
//----------------------------------------------------------
|
||||
|
||||
int PsyX_CD_CheckImageAvailable()
|
||||
{
|
||||
if (g_UseCDImage)
|
||||
{
|
||||
if (g_imageFp == NULL)
|
||||
eprintwarn("WARNING - CD subsystem is not initialized yet!\n");
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
CdlFILE* CdSearchFile(CdlFILE* fp, char* name)
|
||||
{
|
||||
char pathPart[16];
|
||||
@ -152,11 +165,8 @@ CdlFILE* CdSearchFile(CdlFILE* fp, char* name)
|
||||
|
||||
memset(fp, 0, sizeof(CdlFILE));
|
||||
|
||||
if (g_imageFp == NULL)
|
||||
{
|
||||
eprintwarn("WARNING - CD subsystem is not initialized yet!\n");
|
||||
if (!PsyX_CD_CheckImageAvailable())
|
||||
return NULL;
|
||||
}
|
||||
|
||||
assert(g_cdReadDoneFlag == true);
|
||||
|
||||
@ -276,7 +286,7 @@ int CdControl(u_char com, u_char * param, u_char * result)
|
||||
|
||||
g_CD_com = com;
|
||||
|
||||
if (g_imageFp == NULL)
|
||||
if (!PsyX_CD_CheckImageAvailable())
|
||||
return 0;
|
||||
|
||||
switch (com)
|
||||
@ -312,6 +322,9 @@ int CdControlB(u_char com, u_char* param, u_char* result)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!PsyX_CD_CheckImageAvailable())
|
||||
return 0;
|
||||
|
||||
ret = 0;
|
||||
|
||||
switch (com)
|
||||
@ -356,6 +369,9 @@ int CdControlF(u_char com, u_char * param)
|
||||
|
||||
g_CD_com = com;
|
||||
|
||||
if (!PsyX_CD_CheckImageAvailable())
|
||||
return 0;
|
||||
|
||||
switch (com)
|
||||
{
|
||||
case CdlSetloc:
|
||||
|
Loading…
Reference in New Issue
Block a user