mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-05 02:17:05 +00:00
DC: Fix compilation
This commit is contained in:
parent
a4d39b2385
commit
cb195a813b
@ -269,16 +269,16 @@ public:
|
||||
class OutVMSave : public Common::OutSaveFile {
|
||||
private:
|
||||
char *buffer;
|
||||
int pos, size, committed;
|
||||
int _pos, size, committed;
|
||||
char filename[16];
|
||||
bool iofailed;
|
||||
|
||||
public:
|
||||
uint32 write(const void *buf, uint32 cnt);
|
||||
virtual int32 pos() const { return pos; }
|
||||
virtual int32 pos() const { return _pos; }
|
||||
|
||||
OutVMSave(const char *_filename)
|
||||
: pos(0), committed(-1), iofailed(false)
|
||||
: _pos(0), committed(-1), iofailed(false)
|
||||
{
|
||||
strncpy(filename, _filename, 16);
|
||||
buffer = new char[size = MAX_SAVE_SIZE];
|
||||
@ -321,14 +321,14 @@ void OutVMSave::finalize()
|
||||
extern const char *gGameName;
|
||||
extern Icon icon;
|
||||
|
||||
if (committed >= pos)
|
||||
if (committed >= _pos)
|
||||
return;
|
||||
|
||||
char *data = buffer;
|
||||
int len = pos;
|
||||
int len = _pos;
|
||||
|
||||
vmsaveResult r = writeSaveGame(gGameName, data, len, filename, icon);
|
||||
committed = pos;
|
||||
committed = _pos;
|
||||
if (r != VMSAVE_OK)
|
||||
iofailed = true;
|
||||
displaySaveResult(r);
|
||||
@ -387,13 +387,13 @@ bool InVMSave::seek(int32 offs, int whence)
|
||||
uint32 OutVMSave::write(const void *buf, uint32 cnt)
|
||||
{
|
||||
int nbyt = cnt;
|
||||
if (pos + nbyt > size) {
|
||||
cnt = (size - pos);
|
||||
if (_pos + nbyt > size) {
|
||||
cnt = (size - _pos);
|
||||
nbyt = cnt;
|
||||
}
|
||||
if (nbyt)
|
||||
memcpy(buffer + pos, buf, nbyt);
|
||||
pos += nbyt;
|
||||
memcpy(buffer + _pos, buf, nbyt);
|
||||
_pos += nbyt;
|
||||
return cnt;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user