Add support for RL_GetPathOfRunningExecutable, bump API version to 2

This commit is contained in:
Maschell 2023-02-18 18:06:49 +01:00
parent 32e9a29a54
commit bc3b6315c3
2 changed files with 15 additions and 3 deletions

View File

@ -1,7 +1,7 @@
FROM wiiuenv/devkitppc:20221228
COPY --from=wiiuenv/librpxloader:20220903 /artifacts $DEVKITPRO
COPY --from=wiiuenv/libfunctionpatcher:20230106 /artifacts $DEVKITPRO
COPY --from=wiiuenv/librpxloader:20230218 /artifacts $DEVKITPRO
COPY --from=wiiuenv/libfunctionpatcher:20230108 /artifacts $DEVKITPRO
COPY --from=wiiuenv/wiiumodulesystem:20230106 /artifacts $DEVKITPRO
COPY --from=wiiuenv/libwuhbutils:20220904 /artifacts $DEVKITPRO
COPY --from=wiiuenv/libcontentredirection:20221010 /artifacts $DEVKITPRO

View File

@ -381,10 +381,21 @@ RPXLoaderStatus RL_GetVersion(RPXLoaderVersion *outVersion) {
if (!outVersion) {
return RPX_LOADER_RESULT_INVALID_ARGUMENT;
}
*outVersion = 1;
*outVersion = 2;
return RPX_LOADER_RESULT_SUCCESS;
}
RPXLoaderStatus RL_GetPathOfRunningExecutable(char *outBuffer, uint32_t outSize) {
if (outBuffer == nullptr || outSize == 0) {
return RPX_LOADER_RESULT_INVALID_ARGUMENT;
}
if (strlen(gReplacementInfo.lastFileLoaded) > 0) {
strncpy(outBuffer, gReplacementInfo.lastFileLoaded, outSize - 1);
return RPX_LOADER_RESULT_SUCCESS;
}
return RPX_LOADER_RESULT_NOT_AVAILABLE;
}
WUMS_EXPORT_FUNCTION(RL_PrepareLaunchFromSD);
WUMS_EXPORT_FUNCTION(RL_LaunchPreparedHomebrew);
@ -394,3 +405,4 @@ WUMS_EXPORT_FUNCTION(RL_GetVersion);
WUMS_EXPORT_FUNCTION(RL_EnableContentRedirection);
WUMS_EXPORT_FUNCTION(RL_DisableContentRedirection);
WUMS_EXPORT_FUNCTION(RL_UnmountCurrentRunningBundle);
WUMS_EXPORT_FUNCTION(RL_GetPathOfRunningExecutable);