mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 23:07:42 +00:00
Kabufuda updates and dolphin memory card path resolution
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#include "CMemoryCardSys.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
|
||||
kabufuda::SystemString CMemoryCardSys::ResolveDolphinCardPath(kabufuda::ECardSlot slot)
|
||||
{
|
||||
const char* home = getenv("HOME");
|
||||
if (!home)
|
||||
return {};
|
||||
|
||||
kabufuda::SystemString path = home;
|
||||
path += hecl::Format("/Library/Application Support/Dolphin/GC/MemoryCard%c.USA.raw",
|
||||
slot == kabufuda::ECardSlot::SlotA ? 'A' : 'B');
|
||||
|
||||
hecl::Sstat theStat;
|
||||
if (hecl::Stat(path.c_str(), &theStat) || !S_ISREG(theStat.st_mode))
|
||||
return {};
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user