mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
GCMemcard: Use std::array for DEntry.m_makercode.
This commit is contained in:
parent
deadec608e
commit
4175fdf28d
@ -408,7 +408,9 @@ std::string GCMemcard::DEntry_Makercode(u8 index) const
|
||||
if (!m_valid || index >= DIRLEN)
|
||||
return "";
|
||||
|
||||
return std::string((const char*)CurrentDir->m_dir_entries[index].m_makercode, 2);
|
||||
return std::string(
|
||||
reinterpret_cast<const char*>(CurrentDir->m_dir_entries[index].m_makercode.data()),
|
||||
CurrentDir->m_dir_entries[index].m_makercode.size());
|
||||
}
|
||||
|
||||
std::string GCMemcard::DEntry_BIFlags(u8 index) const
|
||||
|
@ -168,7 +168,7 @@ struct DEntry
|
||||
std::string GCI_FileName() const
|
||||
{
|
||||
std::string filename =
|
||||
std::string((char*)m_makercode, 2) + '-' +
|
||||
std::string(reinterpret_cast<const char*>(m_makercode.data()), m_makercode.size()) + '-' +
|
||||
std::string(reinterpret_cast<const char*>(m_gamecode.data()), m_gamecode.size()) + '-' +
|
||||
reinterpret_cast<const char*>(m_filename.data()) + ".gci";
|
||||
return Common::EscapeFileName(filename);
|
||||
@ -176,9 +176,9 @@ struct DEntry
|
||||
|
||||
static constexpr std::array<u8, 4> UNINITIALIZED_GAMECODE = {0xFF, 0xFF, 0xFF, 0xFF};
|
||||
|
||||
std::array<u8, 4> m_gamecode; // 0x00 0x04 Gamecode
|
||||
u8 m_makercode[2]; // 0x04 0x02 Makercode
|
||||
u8 m_unused_1; // 0x06 0x01 reserved/unused (always 0xff, has no effect)
|
||||
std::array<u8, 4> m_gamecode; // 0x00 0x04 Gamecode
|
||||
std::array<u8, 2> m_makercode; // 0x04 0x02 Makercode
|
||||
u8 m_unused_1; // 0x06 0x01 reserved/unused (always 0xff, has no effect)
|
||||
u8 m_banner_and_icon_flags; // 0x07 0x01 banner gfx format and icon animation (Image Key)
|
||||
// Bit(s) Description
|
||||
// 2 Icon Animation 0: forward 1: ping-pong
|
||||
|
Loading…
x
Reference in New Issue
Block a user