aboutsummaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
authorJesse Talavera <jesse@jesse.tg>2023-12-15 08:56:10 -0500
committerGitHub <noreply@github.com>2023-12-15 14:56:10 +0100
commite1821d00235d33b2fe384fffa7e34b00b7af3ec9 (patch)
treed3d02ec34f90c72dbe50805e94923af7337f2966 /src/frontend
parent24c402af51fe9c0537582173fc48d1ad3daff459 (diff)
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
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/qt_sdl/ROMManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/frontend/qt_sdl/ROMManager.cpp b/src/frontend/qt_sdl/ROMManager.cpp
index b065ad1..a20af20 100644
--- a/src/frontend/qt_sdl/ROMManager.cpp
+++ b/src/frontend/qt_sdl/ROMManager.cpp
@@ -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));