From 4f0e324164fb2c427af92cda7d1f6e530754b768 Mon Sep 17 00:00:00 2001 From: Andrew Hawes <117602754+Andrew1Hawes@users.noreply.github.com> Date: Fri, 23 Aug 2024 20:22:29 +0100 Subject: [PATCH] Don't need to backup SYSCONF if Prepare Launch fails --- src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 564c3df..d865937 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -499,9 +499,10 @@ DECL_FUNCTION(int32_t, ACPGetLaunchMetaXml, ACPMetaXml *metaXml) DECL_FUNCTION(int32_t, CMPTExPrepareLaunch, uint32_t unk1, void *unk2, uint32_t unk3) { setResolution(gSetResolution); - if (gPreserveSysconf) + int32_t result = real_CMPTExPrepareLaunch(unk1, unk2, unk3); + if (gPreserveSysconf && result == 0) backupSysconf(); - return real_CMPTExPrepareLaunch(unk1, unk2, unk3); + return result; } DECL_FUNCTION(int32_t, CMPTLaunchMenu, void *dataBuffer, uint32_t bufferSize)