@@ -637,40 +637,40 @@ namespace CafeSystem
637
637
fsc_unmount (" /cemuBossStorage/" , FSC_PRIORITY_BASE);
638
638
}
639
639
640
- STATUS_CODE LoadAndMountForegroundTitle (TitleId titleId)
640
+ PREPARE_STATUS_CODE LoadAndMountForegroundTitle (TitleId titleId)
641
641
{
642
642
cemuLog_log (LogType::Force, " Mounting title {:016x}" , (uint64)titleId);
643
643
sGameInfo_ForegroundTitle = CafeTitleList::GetGameInfo (titleId);
644
644
if (!sGameInfo_ForegroundTitle .IsValid ())
645
645
{
646
646
cemuLog_log (LogType::Force, " Mounting failed: Game meta information is either missing, inaccessible or not valid (missing or invalid .xml files in code and meta folder)" );
647
- return STATUS_CODE ::UNABLE_TO_MOUNT;
647
+ return PREPARE_STATUS_CODE ::UNABLE_TO_MOUNT;
648
648
}
649
649
// check base
650
650
TitleInfo& titleBase = sGameInfo_ForegroundTitle .GetBase ();
651
651
if (!titleBase.IsValid ())
652
- return STATUS_CODE ::UNABLE_TO_MOUNT;
652
+ return PREPARE_STATUS_CODE ::UNABLE_TO_MOUNT;
653
653
if (!titleBase.ParseXmlInfo ())
654
- return STATUS_CODE ::UNABLE_TO_MOUNT;
654
+ return PREPARE_STATUS_CODE ::UNABLE_TO_MOUNT;
655
655
cemuLog_log (LogType::Force, " Base: {}" , titleBase.GetPrintPath ());
656
656
// mount base
657
657
if (!titleBase.Mount (" /vol/content" , " content" , FSC_PRIORITY_BASE) || !titleBase.Mount (GetInternalVirtualCodeFolder (), " code" , FSC_PRIORITY_BASE))
658
658
{
659
659
cemuLog_log (LogType::Force, " Mounting failed" );
660
- return STATUS_CODE ::UNABLE_TO_MOUNT;
660
+ return PREPARE_STATUS_CODE ::UNABLE_TO_MOUNT;
661
661
}
662
662
// check update
663
663
TitleInfo& titleUpdate = sGameInfo_ForegroundTitle .GetUpdate ();
664
664
if (titleUpdate.IsValid ())
665
665
{
666
666
if (!titleUpdate.ParseXmlInfo ())
667
- return STATUS_CODE ::UNABLE_TO_MOUNT;
667
+ return PREPARE_STATUS_CODE ::UNABLE_TO_MOUNT;
668
668
cemuLog_log (LogType::Force, " Update: {}" , titleUpdate.GetPrintPath ());
669
669
// mount update
670
670
if (!titleUpdate.Mount (" /vol/content" , " content" , FSC_PRIORITY_PATCH) || !titleUpdate.Mount (GetInternalVirtualCodeFolder (), " code" , FSC_PRIORITY_PATCH))
671
671
{
672
672
cemuLog_log (LogType::Force, " Mounting failed" );
673
- return STATUS_CODE ::UNABLE_TO_MOUNT;
673
+ return PREPARE_STATUS_CODE ::UNABLE_TO_MOUNT;
674
674
}
675
675
}
676
676
else
@@ -682,20 +682,20 @@ namespace CafeSystem
682
682
// todo - support for multi-title AOC
683
683
TitleInfo& titleAOC = aocList[0 ];
684
684
if (!titleAOC.ParseXmlInfo ())
685
- return STATUS_CODE ::UNABLE_TO_MOUNT;
685
+ return PREPARE_STATUS_CODE ::UNABLE_TO_MOUNT;
686
686
cemu_assert_debug (titleAOC.IsValid ());
687
687
cemuLog_log (LogType::Force, " DLC: {}" , titleAOC.GetPrintPath ());
688
688
// mount AOC
689
689
if (!titleAOC.Mount (fmt::format (" /vol/aoc{:016x}" , titleAOC.GetAppTitleId ()), " content" , FSC_PRIORITY_PATCH))
690
690
{
691
691
cemuLog_log (LogType::Force, " Mounting failed" );
692
- return STATUS_CODE ::UNABLE_TO_MOUNT;
692
+ return PREPARE_STATUS_CODE ::UNABLE_TO_MOUNT;
693
693
}
694
694
}
695
695
else
696
696
cemuLog_log (LogType::Force, " DLC: Not present" );
697
697
sForegroundTitleId = titleId;
698
- return STATUS_CODE ::SUCCESS;
698
+ return PREPARE_STATUS_CODE ::SUCCESS;
699
699
}
700
700
701
701
void UnmountForegroundTitle ()
@@ -723,7 +723,7 @@ namespace CafeSystem
723
723
}
724
724
}
725
725
726
- STATUS_CODE SetupExecutable ()
726
+ PREPARE_STATUS_CODE SetupExecutable ()
727
727
{
728
728
// set rpx path from cos.xml if available
729
729
_pathToBaseExecutable = _pathToExecutable;
@@ -755,7 +755,7 @@ namespace CafeSystem
755
755
}
756
756
}
757
757
LoadMainExecutable ();
758
- return STATUS_CODE ::SUCCESS;
758
+ return PREPARE_STATUS_CODE ::SUCCESS;
759
759
}
760
760
761
761
void SetupMemorySpace ()
@@ -769,7 +769,7 @@ namespace CafeSystem
769
769
memory_unmapForCurrentTitle ();
770
770
}
771
771
772
- STATUS_CODE PrepareForegroundTitle (TitleId titleId)
772
+ PREPARE_STATUS_CODE PrepareForegroundTitle (TitleId titleId)
773
773
{
774
774
CafeTitleList::WaitForMandatoryScan ();
775
775
sLaunchModeIsStandalone = false ;
@@ -780,21 +780,21 @@ namespace CafeSystem
780
780
// mount mlc storage
781
781
MountBaseDirectories ();
782
782
// mount title folders
783
- STATUS_CODE r = LoadAndMountForegroundTitle (titleId);
784
- if (r != STATUS_CODE ::SUCCESS)
783
+ PREPARE_STATUS_CODE r = LoadAndMountForegroundTitle (titleId);
784
+ if (r != PREPARE_STATUS_CODE ::SUCCESS)
785
785
return r;
786
786
gameProfile_load ();
787
787
// setup memory space and PPC recompiler
788
788
SetupMemorySpace ();
789
789
PPCRecompiler_init ();
790
790
r = SetupExecutable (); // load RPX
791
- if (r != STATUS_CODE ::SUCCESS)
791
+ if (r != PREPARE_STATUS_CODE ::SUCCESS)
792
792
return r;
793
793
InitVirtualMlcStorage ();
794
- return STATUS_CODE ::SUCCESS;
794
+ return PREPARE_STATUS_CODE ::SUCCESS;
795
795
}
796
796
797
- STATUS_CODE PrepareForegroundTitleFromStandaloneRPX (const fs::path& path)
797
+ PREPARE_STATUS_CODE PrepareForegroundTitleFromStandaloneRPX (const fs::path& path)
798
798
{
799
799
sLaunchModeIsStandalone = true ;
800
800
cemuLog_log (LogType::Force, " Launching executable in standalone mode due to incorrect layout or missing meta files" );
@@ -812,7 +812,7 @@ namespace CafeSystem
812
812
if (!r)
813
813
{
814
814
cemuLog_log (LogType::Force, " Failed to mount {}" , _pathToUtf8 (contentPath));
815
- return STATUS_CODE ::UNABLE_TO_MOUNT;
815
+ return PREPARE_STATUS_CODE ::UNABLE_TO_MOUNT;
816
816
}
817
817
}
818
818
}
@@ -824,7 +824,7 @@ namespace CafeSystem
824
824
// since a lot of systems (including save folder location) rely on a TitleId, we derive a placeholder id from the executable hash
825
825
auto execData = fsc_extractFile (_pathToExecutable.c_str ());
826
826
if (!execData)
827
- return STATUS_CODE ::INVALID_RPX;
827
+ return PREPARE_STATUS_CODE ::INVALID_RPX;
828
828
uint32 h = generateHashFromRawRPXData (execData->data (), execData->size ());
829
829
sForegroundTitleId = 0xFFFFFFFF00000000ULL | (uint64)h;
830
830
cemuLog_log (LogType::Force, " Generated placeholder TitleId: {:016x}" , sForegroundTitleId );
@@ -834,7 +834,7 @@ namespace CafeSystem
834
834
// load executable
835
835
SetupExecutable ();
836
836
InitVirtualMlcStorage ();
837
- return STATUS_CODE ::SUCCESS;
837
+ return PREPARE_STATUS_CODE ::SUCCESS;
838
838
}
839
839
840
840
void _LaunchTitleThread ()
0 commit comments