Windows stat fix

This commit is contained in:
Jack Andersen 2016-12-28 11:51:33 -10:00
parent 15d2d934d8
commit 29e2b95bdf
3 changed files with 23 additions and 0 deletions

View File

@ -354,6 +354,19 @@ ECardResult CMemoryCardSys::MountCard(kabufuda::ECardSlot port)
return result;
}
ECardResult CMemoryCardSys::UnmountCard(kabufuda::ECardSlot port)
{
kabufuda::Card& card = g_CardStates[int(port)];
if (CardResult err = card.getError())
{
g_OpResults[int(port)] = err;
return err;
}
card = kabufuda::Card();
g_OpResults[int(port)] = ECardResult::READY;
return ECardResult::READY;
}
ECardResult CMemoryCardSys::CheckCard(kabufuda::ECardSlot port)
{
kabufuda::Card& card = g_CardStates[int(port)];
@ -553,4 +566,10 @@ ECardResult CMemoryCardSys::FormatCard(kabufuda::ECardSlot port)
return ECardResult::READY;
}
void CMemoryCardSys::CommitToDisk(kabufuda::ECardSlot port)
{
kabufuda::Card& card = g_CardStates[int(port)];
card.commit();
}
}

View File

@ -145,6 +145,7 @@ public:
static kabufuda::ProbeResults CardProbe(kabufuda::ECardSlot port);
static ECardResult MountCard(kabufuda::ECardSlot port);
static ECardResult UnmountCard(kabufuda::ECardSlot port);
static ECardResult CheckCard(kabufuda::ECardSlot port);
static ECardResult CreateFile(kabufuda::ECardSlot port, const char* name, u32 size, CardFileHandle& info);
static ECardResult OpenFile(kabufuda::ECardSlot port, const char* name, CardFileHandle& info);
@ -161,6 +162,8 @@ public:
static ECardResult FastDeleteFile(kabufuda::ECardSlot port, int fileNo);
static ECardResult Rename(kabufuda::ECardSlot port, const char* oldName, const char* newName);
static ECardResult FormatCard(kabufuda::ECardSlot port);
static void CommitToDisk(kabufuda::ECardSlot port);
};
}

View File

@ -1,5 +1,6 @@
#include "CMemoryCardSys.hpp"
#include <shlobj.h>
#include <sys/stat.h>
namespace urde
{