mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 07:35:41 +00:00
MemoryCardIconCache: Ignore shared cards
This commit is contained in:
parent
11f7bfc461
commit
226a8eac81
|
@ -105,8 +105,9 @@ bool MemoryCardIconCache::Reload()
|
||||||
|
|
||||||
const MemoryCardImage::IconFrame* MemoryCardIconCache::Lookup(std::string_view serial, std::string_view path)
|
const MemoryCardImage::IconFrame* MemoryCardIconCache::Lookup(std::string_view serial, std::string_view path)
|
||||||
{
|
{
|
||||||
std::string memcard_path = System::GetGameMemoryCardPath(serial, path, 0);
|
MemoryCardType type;
|
||||||
if (memcard_path.empty())
|
std::string memcard_path = System::GetGameMemoryCardPath(serial, path, 0, &type);
|
||||||
|
if (memcard_path.empty() || type == MemoryCardType::Shared)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
FILESYSTEM_STAT_DATA sd;
|
FILESYSTEM_STAT_DATA sd;
|
||||||
|
|
|
@ -4997,7 +4997,8 @@ void System::DeleteSaveStates(const char* serial, bool resume)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string System::GetGameMemoryCardPath(std::string_view serial, std::string_view path, u32 slot)
|
std::string System::GetGameMemoryCardPath(std::string_view serial, std::string_view path, u32 slot,
|
||||||
|
MemoryCardType* out_type)
|
||||||
{
|
{
|
||||||
const char* section = "MemoryCards";
|
const char* section = "MemoryCards";
|
||||||
const TinyString type_key = TinyString::from_format("Card{}Type", slot + 1);
|
const TinyString type_key = TinyString::from_format("Card{}Type", slot + 1);
|
||||||
|
@ -5034,6 +5035,9 @@ std::string System::GetGameMemoryCardPath(std::string_view serial, std::string_v
|
||||||
type = MemoryCardType::Shared;
|
type = MemoryCardType::Shared;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (out_type)
|
||||||
|
*out_type = type;
|
||||||
|
|
||||||
std::string ret;
|
std::string ret;
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -417,7 +417,8 @@ std::optional<ExtendedSaveStateInfo> GetExtendedSaveStateInfo(const char* path);
|
||||||
void DeleteSaveStates(const char* serial, bool resume);
|
void DeleteSaveStates(const char* serial, bool resume);
|
||||||
|
|
||||||
/// Returns the path to the memory card for the specified game, considering game settings.
|
/// Returns the path to the memory card for the specified game, considering game settings.
|
||||||
std::string GetGameMemoryCardPath(std::string_view serial, std::string_view path, u32 slot);
|
std::string GetGameMemoryCardPath(std::string_view serial, std::string_view path, u32 slot,
|
||||||
|
MemoryCardType* out_type = nullptr);
|
||||||
|
|
||||||
/// Returns intended output volume considering fast forwarding.
|
/// Returns intended output volume considering fast forwarding.
|
||||||
s32 GetAudioOutputVolume();
|
s32 GetAudioOutputVolume();
|
||||||
|
|
Loading…
Reference in a new issue