Merge pull request #9021 from AdmiralCurtiss/gui-memcard-format-sram

Qt/GCMemcardCreateNewDialog: Use zero values for formatting instead of accessing g_SRAM.
This commit is contained in:
Léo Lam 2020-10-20 14:55:23 +02:00 committed by GitHub
commit 299adf537d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -77,10 +77,9 @@ bool GCMemcardCreateNewDialog::CreateCard()
if (path.isEmpty()) if (path.isEmpty())
return false; return false;
// TODO: The dependency on g_SRAM here is sketchy. We should instead use sensible default values. const CardFlashId flash_id{};
const CardFlashId& flash_id = g_SRAM.settings_ex.flash_id[Memcard::SLOT_A]; const u32 rtc_bias = 0;
const u32 rtc_bias = g_SRAM.settings.rtc_bias; const u32 sram_language = 0;
const u32 sram_language = static_cast<u32>(g_SRAM.settings.language);
const u64 format_time = const u64 format_time =
Common::Timer::GetLocalTimeSinceJan1970() - ExpansionInterface::CEXIIPL::GC_EPOCH; Common::Timer::GetLocalTimeSinceJan1970() - ExpansionInterface::CEXIIPL::GC_EPOCH;