mirror of https://github.com/PCSX2/pcsx2.git
MemoryCardFile: Open file memcards in read share mode
Fixes cards showing up as "missing" in Qt's settings dialog if you opened the dialog after starting a game.
This commit is contained in:
parent
afa29facc6
commit
3dc4aea053
|
@ -342,11 +342,11 @@ void FileMemoryCard::Open()
|
||||||
}
|
}
|
||||||
|
|
||||||
// store the original filename
|
// store the original filename
|
||||||
m_file[slot] = FileSystem::OpenCFile(newname.c_str(), "r+b");
|
m_file[slot] = FileSystem::OpenSharedCFile(newname.c_str(), "r+b", FileSystem::FileShareMode::DenyWrite);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_file[slot] = FileSystem::OpenCFile(fname.c_str(), "r+b");
|
m_file[slot] = FileSystem::OpenSharedCFile(fname.c_str(), "r+b", FileSystem::FileShareMode::DenyWrite);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_file[slot])
|
if (!m_file[slot])
|
||||||
|
@ -805,7 +805,7 @@ static bool IsMemoryCardFolder(const std::string& path)
|
||||||
|
|
||||||
static bool IsMemoryCardFormatted(const std::string& path)
|
static bool IsMemoryCardFormatted(const std::string& path)
|
||||||
{
|
{
|
||||||
auto fp = FileSystem::OpenManagedCFile(path.c_str(), "rb");
|
auto fp = FileSystem::OpenManagedSharedCFile(path.c_str(), "rb", FileSystem::FileShareMode::DenyNone);
|
||||||
if (!fp)
|
if (!fp)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue