mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
fix displaying the screenshot even for old-version savegames.
git-svn-id: https://svn.eduke32.com/eduke32@2210 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a3a80467a7
commit
5ef480ad7a
1 changed files with 6 additions and 2 deletions
|
@ -221,7 +221,7 @@ void ReadSaveGameHeaders(void)
|
|||
int32_t G_LoadSaveHeaderNew(int32_t spot, savehead_t *saveh)
|
||||
{
|
||||
char fn[16];
|
||||
int32_t fil, screenshotofs;
|
||||
int32_t fil, screenshotofs, i;
|
||||
|
||||
Bstrcpy(fn, "dukesav0.esv");
|
||||
fn[7] = spot + '0';
|
||||
|
@ -230,7 +230,8 @@ int32_t G_LoadSaveHeaderNew(int32_t spot, savehead_t *saveh)
|
|||
if (fil == -1)
|
||||
return -1;
|
||||
|
||||
if (sv_loadheader(fil, spot, saveh))
|
||||
i = sv_loadheader(fil, spot, saveh);
|
||||
if (i && (i != 2 && i != 3))
|
||||
goto corrupt;
|
||||
|
||||
if (kread(fil, &screenshotofs, 4) != 4)
|
||||
|
@ -244,8 +245,11 @@ int32_t G_LoadSaveHeaderNew(int32_t spot, savehead_t *saveh)
|
|||
if (screenshotofs)
|
||||
{
|
||||
if (kdfread((char *)waloff[TILE_LOADSHOT], 320, 200, fil) != 200)
|
||||
{
|
||||
OSD_Printf("G_LoadSaveHeaderNew(%d): failed reading screenshot\n", spot);
|
||||
goto corrupt;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Bmemset((char *)waloff[TILE_LOADSHOT], 0, 320*200);
|
||||
|
|
Loading…
Reference in a new issue