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

Function RPLLoader_GetHandleByModuleName

src/Cafe/OS/RPL/rpl.cpp:2019–2036  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2017}
2018
2019uint32 RPLLoader_GetHandleByModuleName(const char* name)
2020{
2021 // get module name from path
2022 char moduleName[RPL_MODULE_NAME_LENGTH];
2023 _RPLLoader_ExtractModuleNameFromPath(moduleName, name);
2024 // search for existing dependency
2025 for (auto& dep : rplDependencyList)
2026 {
2027 if (strcmp(moduleName, dep->modulename) == 0)
2028 {
2029 cemu_assert_debug(dep->loadAttempted);
2030 if (!dep->isCafeOSModule && !dep->rplLoaderContext)
2031 return RPL_INVALID_HANDLE; // module not found
2032 return dep->coreinitHandle;
2033 }
2034 }
2035 return RPL_INVALID_HANDLE;
2036}
2037
2038uint32 RPLLoader_GetMaxTLSModuleIndex()
2039{

Callers 3

_cbResolveConstantFunction · 0.85
OSDynLoad_AcquireFunction · 0.85

Calls 2

cemu_assert_debugFunction · 0.85

Tested by

no test coverage detected