mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 22:56:52 +01:00
Merge pull request #6194 from TBoshoven/sdhc-off-by-one
Off-by-one in SDHC detection
This commit is contained in:
commit
496c33738f
@ -439,7 +439,7 @@ IPCCommandResult SDIOSlot0::GetStatus(const IOCtlRequest& request)
|
||||
// Since IOS does the SD initialization itself, we just say we're always initialized.
|
||||
if (m_card)
|
||||
{
|
||||
if (m_card.GetSize() < SDHC_BYTES)
|
||||
if (m_card.GetSize() <= SDSC_MAX_SIZE)
|
||||
{
|
||||
// No further initialization required.
|
||||
m_status |= CARD_INITIALIZED;
|
||||
|
@ -118,8 +118,9 @@ private:
|
||||
V2,
|
||||
};
|
||||
|
||||
// Number of bytes to trigger using SDHC instead of SDSC
|
||||
static constexpr u32 SDHC_BYTES = 0x80000000;
|
||||
// Maximum number of bytes in an SDSC card
|
||||
// Used to trigger using SDHC instead of SDSC
|
||||
static constexpr u64 SDSC_MAX_SIZE = 0x80000000;
|
||||
|
||||
struct Event
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user