From 33a1f27a99c2dc97aca42887006bec55c9ab1109 Mon Sep 17 00:00:00 2001 From: Steveice10 <1269164+Steveice10@users.noreply.github.com> Date: Tue, 21 Nov 2023 17:56:08 -0800 Subject: [PATCH] cfg: Load and save MCU config as binary file. (#7200) --- src/core/hle/service/cfg/cfg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/hle/service/cfg/cfg.cpp b/src/core/hle/service/cfg/cfg.cpp index fd8cf17af..6d42c5918 100644 --- a/src/core/hle/service/cfg/cfg.cpp +++ b/src/core/hle/service/cfg/cfg.cpp @@ -577,7 +577,7 @@ ResultCode Module::LoadConfigNANDSaveFile() { void Module::LoadMCUConfig() { FileUtil::IOFile mcu_data_file( - fmt::format("{}/mcu.dat", FileUtil::GetUserPath(FileUtil::UserPath::SysDataDir)), "r"); + fmt::format("{}/mcu.dat", FileUtil::GetUserPath(FileUtil::UserPath::SysDataDir)), "rb"); if (mcu_data_file.IsOpen() && mcu_data_file.GetSize() >= sizeof(MCUData) && mcu_data_file.ReadBytes(&mcu_data, sizeof(MCUData)) == sizeof(MCUData)) { @@ -592,7 +592,7 @@ void Module::LoadMCUConfig() { void Module::SaveMCUConfig() { FileUtil::IOFile mcu_data_file( - fmt::format("{}/mcu.dat", FileUtil::GetUserPath(FileUtil::UserPath::SysDataDir)), "w"); + fmt::format("{}/mcu.dat", FileUtil::GetUserPath(FileUtil::UserPath::SysDataDir)), "wb"); if (mcu_data_file.IsOpen()) { mcu_data_file.WriteBytes(&mcu_data, sizeof(MCUData));