From e00121e17da8daedb94dff77a4aa47940cd31c54 Mon Sep 17 00:00:00 2001 From: Maschell Date: Wed, 8 May 2024 23:24:42 +0200 Subject: [PATCH 1/2] Actually save the OTP to otp.bin instead of opt.bin --- src/utils/utils.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/utils/utils.cpp b/src/utils/utils.cpp index b3cd039..199692c 100644 --- a/src/utils/utils.cpp +++ b/src/utils/utils.cpp @@ -75,7 +75,7 @@ void Utils::DumpOTPAndSeeprom() { return; } std::string backupPathConsole = string_format(BACKUPS_DIRECTORY_FULL "/%s", serialId.c_str()); - std::string backupPathConsoleOtpPath = backupPathConsole + "/opt.bin"; + std::string backupPathConsoleOtpPath = backupPathConsole + "/otp.bin"; std::string backupPathConsoleSeepromPath = backupPathConsole + "/seeprom.bin"; if (!FSUtils::CreateSubfolder(backupPathConsole.c_str())) { @@ -83,7 +83,7 @@ void Utils::DumpOTPAndSeeprom() { } bool seepromExists = FSUtils::CheckFile(backupPathConsoleSeepromPath.c_str()); - bool optExists = FSUtils::CheckFile(backupPathConsoleOtpPath.c_str()); + bool otpExists = FSUtils::CheckFile(backupPathConsoleOtpPath.c_str()); if (!seepromExists) { uint8_t data[0x200] = {}; @@ -99,7 +99,7 @@ void Utils::DumpOTPAndSeeprom() { } else { DEBUG_FUNCTION_LINE_VERBOSE("SEEPROM backup already exists"); } - if (!optExists) { + if (!otpExists) { WiiUConsoleOTP otp = {}; if (Mocha_ReadOTP(&otp) != MOCHA_RESULT_SUCCESS) { DEBUG_FUNCTION_LINE_WARN("Failed to read otp"); @@ -113,4 +113,10 @@ void Utils::DumpOTPAndSeeprom() { } else { DEBUG_FUNCTION_LINE_VERBOSE("OTP backup already exists"); } + + // Remove wrong file with typo + std::string backupPathConsoleOTPPathTypo = backupPathConsole + "/opt.bin"; + if (FSUtils::CheckFile(backupPathConsoleOTPPathTypo.c_str())) { + remove(backupPathConsoleOTPPathTypo.c_str()); + } } \ No newline at end of file From 1ca27495f076d35a4d8e53f6aff874ef2096ae7d Mon Sep 17 00:00:00 2001 From: Maschell Date: Wed, 8 May 2024 23:25:17 +0200 Subject: [PATCH 2/2] Bump version to 0.1.6 --- src/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.h b/src/main.h index 8adbaa4..d743e11 100644 --- a/src/main.h +++ b/src/main.h @@ -1,5 +1,5 @@ #pragma once #include "version.h" -#define PLUGIN_VERSION "v0.1.5" +#define PLUGIN_VERSION "v0.1.6" #define PLUGIN_VERSION_FULL PLUGIN_VERSION PLUGIN_VERSION_EXTRA