mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-06-28 09:59:41 -06:00
Simplify the SRAM's representation in NDSCartArgs
(#1914)
* Simplify the SRAM's representation in `NDSCartArgs` - I overthought this one. - I could've just checked `args && args->SRAM`, but then some other poor bastard might make this mistake. - Don't mix `pair`, `optional`, and `unique_ptr` all at once, kids. * Fix a `nullptr` read
This commit is contained in:
@ -1316,8 +1316,8 @@ bool LoadROM(EmuThread* emuthread, QStringList filepath, bool reset)
|
||||
// the ROM is homebrew or not.
|
||||
// So this is the card we *would* load if the ROM were homebrew.
|
||||
.SDCard = GetDLDISDCardArgs(),
|
||||
|
||||
.SRAM = std::make_pair(std::move(savedata), savelen),
|
||||
.SRAM = std::move(savedata),
|
||||
.SRAMLength = savelen,
|
||||
};
|
||||
|
||||
auto cart = NDSCart::ParseROM(std::move(filedata), filelen, std::move(cartargs));
|
||||
|
Reference in New Issue
Block a user