@@ -821,7 +821,7 @@ void GraphicPack2::AddConstantsForCurrentPreset(ExpressionParser& ep)
821
821
}
822
822
}
823
823
824
- void GraphicPack2::_iterateReplacedFiles (const fs::path& currentPath, bool isAOC)
824
+ void GraphicPack2::_iterateReplacedFiles (const fs::path& currentPath, bool isAOC, const char * virtualMountBase )
825
825
{
826
826
uint64 currentTitleId = CafeSystem::GetForegroundTitleId ();
827
827
uint64 aocTitleId = (currentTitleId & 0xFFFFFFFFull ) | 0x0005000c00000000ull ;
@@ -836,7 +836,7 @@ void GraphicPack2::_iterateReplacedFiles(const fs::path& currentPath, bool isAOC
836
836
}
837
837
else
838
838
{
839
- virtualMountPath = fs::path (" vol/content/ " ) / virtualMountPath;
839
+ virtualMountPath = fs::path (virtualMountBase ) / virtualMountPath;
840
840
}
841
841
fscDeviceRedirect_add (virtualMountPath.generic_string (), it.file_size (), it.path ().generic_string (), m_fs_priority);
842
842
}
@@ -861,7 +861,7 @@ void GraphicPack2::LoadReplacedFiles()
861
861
{
862
862
// setup redirections
863
863
fscDeviceRedirect_map ();
864
- _iterateReplacedFiles (contentPath, false );
864
+ _iterateReplacedFiles (contentPath, false , " vol/content/ " );
865
865
}
866
866
// /aoc/
867
867
fs::path aocPath (gfxPackPath);
@@ -874,7 +874,18 @@ void GraphicPack2::LoadReplacedFiles()
874
874
aocTitleId |= 0x0005000c00000000ULL ;
875
875
// setup redirections
876
876
fscDeviceRedirect_map ();
877
- _iterateReplacedFiles (aocPath, true );
877
+ _iterateReplacedFiles (aocPath, true , nullptr );
878
+ }
879
+
880
+ // /code/
881
+ fs::path codePath (gfxPackPath);
882
+ codePath.append (" code" );
883
+
884
+ if (fs::exists (codePath, ec))
885
+ {
886
+ // setup redirections
887
+ fscDeviceRedirect_map ();
888
+ _iterateReplacedFiles (codePath, false , CafeSystem::GetInternalVirtualCodeFolder ().c_str ());
878
889
}
879
890
}
880
891
0 commit comments