MCPcopy Create free account
hub / github.com/cemu-project/Cemu / ScanForRPX

Function ScanForRPX

src/Cafe/CafeSystem.cpp:103–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103bool ScanForRPX()
104{
105 bool rpxFound = false;
106 sint32 fscStatus = 0;
107 FSCVirtualFile* fscDirItr = fsc_openDirIterator("/internal/current_title/code/", &fscStatus);
108 if (fscDirItr)
109 {
110 FSCDirEntry dirEntry;
111 while (fsc_nextDir(fscDirItr, &dirEntry))
112 {
113 sint32 dirItrPathLen = strlen(dirEntry.path);
114 if (dirItrPathLen < 4)
115 continue;
116 if (boost::iequals(dirEntry.path + dirItrPathLen - 4, ".rpx"))
117 {
118 rpxFound = true;
119 _pathToExecutable = fmt::format("/internal/current_title/code/{}", dirEntry.path);
120 break;
121 }
122 }
123 fsc_close(fscDirItr);
124 }
125 return rpxFound;
126}
127
128void SetEntryPoint(MPTR entryPoint)
129{

Callers 1

LoadMainExecutableFunction · 0.85

Calls 4

fsc_openDirIteratorFunction · 0.85
fsc_nextDirFunction · 0.85
formatFunction · 0.85
fsc_closeFunction · 0.85

Tested by

no test coverage detected