Skip to content

Commit a47d699

Browse files
committed
implement returning to title from installer menu
1 parent e4c43ae commit a47d699

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

UnleashedRecomp/main.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,14 @@ int main(int argc, char *argv[])
333333

334334
if (!InstallerWizard::Run(GAME_INSTALL_DIRECTORY, isGameInstalled && forceDLCInstaller))
335335
{
336-
std::_Exit(0);
336+
if (!forceDLCInstaller)
337+
{
338+
std::_Exit(0);
339+
}
340+
else
341+
{
342+
InstallerWizard::s_returnToTitle = true;
343+
}
337344
}
338345
}
339346

UnleashedRecomp/patches/misc_patches.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <api/SWA.h>
22
#include <ui/game_window.h>
3+
#include <ui/installer_wizard.h>
34
#include <user/achievement_manager.h>
45
#include <user/persistent_storage_manager.h>
56
#include <user/config.h>
@@ -83,7 +84,7 @@ PPC_FUNC(sub_825197C0)
8384
PPC_FUNC_IMPL(__imp__sub_82547DF0);
8485
PPC_FUNC(sub_82547DF0)
8586
{
86-
if (Config::SkipIntroLogos)
87+
if (Config::SkipIntroLogos || InstallerWizard::s_returnToTitle)
8788
{
8889
ctx.r4.u64 = 0;
8990
ctx.r5.u64 = 0;

UnleashedRecomp/ui/installer_wizard.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
struct InstallerWizard
66
{
77
static inline bool s_isVisible = false;
8+
static inline bool s_returnToTitle = false;
89

910
static void Init();
1011
static void Draw();

0 commit comments

Comments
 (0)