From 7731f66e553a396f136953798751d5b6f84a9dd1 Mon Sep 17 00:00:00 2001 From: RSDuck Date: Tue, 1 Aug 2023 03:00:41 +0200 Subject: fix some UB --- src/frontend/qt_sdl/Config.cpp | 2 +- src/frontend/qt_sdl/ROMManager.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/frontend/qt_sdl') diff --git a/src/frontend/qt_sdl/Config.cpp b/src/frontend/qt_sdl/Config.cpp index afdaaee..b4d78f7 100644 --- a/src/frontend/qt_sdl/Config.cpp +++ b/src/frontend/qt_sdl/Config.cpp @@ -301,7 +301,7 @@ ConfigEntry ConfigFile[] = {"AudioInterp", 0, &AudioInterp, 0, false}, {"AudioBitDepth", 0, &AudioBitDepth, 0, false}, {"AudioVolume", 0, &AudioVolume, 256, true}, - {"DSiVolumeSync", 0, &DSiVolumeSync, 0, true}, + {"DSiVolumeSync", 1, &DSiVolumeSync, false, true}, {"MicInputType", 0, &MicInputType, 1, false}, {"MicDevice", 2, &MicDevice, (std::string)"", false}, {"MicWavPath", 2, &MicWavPath, (std::string)"", false}, diff --git a/src/frontend/qt_sdl/ROMManager.cpp b/src/frontend/qt_sdl/ROMManager.cpp index a3a911c..3b2b72b 100644 --- a/src/frontend/qt_sdl/ROMManager.cpp +++ b/src/frontend/qt_sdl/ROMManager.cpp @@ -451,6 +451,7 @@ void UnloadCheats() { delete CheatFile; CheatFile = nullptr; + AREngine::SetCodeFile(nullptr); } } -- cgit v1.2.3