mirror of
https://github.com/wiiu-env/libmocha.git
synced 2024-11-08 21:15:06 +01:00
Add LaunchHomebrewWrapperEx
Add library call to pass arguments between different homebrew apps, which is something that RetroArch needs to pass the content path to cores.
This commit is contained in:
parent
4d0585cdb4
commit
219b311e40
@ -4,6 +4,7 @@
|
||||
#include <coreinit/filesystem.h>
|
||||
#include <coreinit/filesystem_fsa.h>
|
||||
#include <stdint.h>
|
||||
#include <sysapp/args.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -215,6 +216,20 @@ MochaUtilsStatus Mocha_PrepareRPXLaunch(MochaRPXLoadInfo *loadInfo);
|
||||
*/
|
||||
MochaUtilsStatus Mocha_LaunchHomebrewWrapper();
|
||||
|
||||
/**
|
||||
* Launches the wrapper app for launching .rpx, with custom SYS args. <br>
|
||||
* To launch a RPX call `Mocha_PrepareRPXLaunch` before this function. <br>
|
||||
* <br>
|
||||
* see: `Mocha_LaunchRPX` to prepare and launch a RPX in one command.
|
||||
*
|
||||
* @param args sysapp args to pass to the homebrew app.
|
||||
* @return MOCHA_RESULT_SUCCESS: App is launching<br>
|
||||
* MOCHA_RESULT_LIB_UNINITIALIZED: Library was not initialized. Call Mocha_InitLibrary() before using this function.<br>
|
||||
* MOCHA_RESULT_UNSUPPORTED_COMMAND: Command not supported by the currently loaded mocha version.<br>
|
||||
* MOCHA_RESULT_NOT_FOUND: Not application that can be used as homebrew wrapper found.
|
||||
*/
|
||||
MochaUtilsStatus Mocha_LaunchHomebrewWrapperEx(SYSStandardArgsIn *args);
|
||||
|
||||
/**
|
||||
* Launches a given RPX by launching a wrapper application and replacing the RPX on the fly. <br>
|
||||
* See Mocha_PrepareRPXLaunch for more information. <br>
|
||||
@ -289,4 +304,4 @@ MochaUtilsStatus Mocha_UnmountFS(const char *virt_name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
#endif
|
||||
|
@ -420,7 +420,7 @@ MochaUtilsStatus Mocha_LaunchRPX(MochaRPXLoadInfo *loadInfo) {
|
||||
return res;
|
||||
}
|
||||
|
||||
MochaUtilsStatus Mocha_LaunchHomebrewWrapper() {
|
||||
MochaUtilsStatus Mocha_LaunchHomebrewWrapperEx(SYSStandardArgsIn *args) {
|
||||
if (!mochaInitDone) {
|
||||
return MOCHA_RESULT_LIB_UNINITIALIZED;
|
||||
}
|
||||
@ -435,11 +435,15 @@ MochaUtilsStatus Mocha_LaunchHomebrewWrapper() {
|
||||
return MOCHA_RESULT_NOT_FOUND;
|
||||
}
|
||||
|
||||
_SYSLaunchTitleWithStdArgsInNoSplash(titleID, nullptr);
|
||||
_SYSLaunchTitleWithStdArgsInNoSplash(titleID, args);
|
||||
|
||||
return MOCHA_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
MochaUtilsStatus Mocha_LaunchHomebrewWrapper() {
|
||||
return Mocha_LaunchHomebrewWrapperEx(nullptr);
|
||||
}
|
||||
|
||||
MochaUtilsStatus Mocha_ODMGetDiscKey(WUDDiscKey *discKey) {
|
||||
if (!mochaInitDone) {
|
||||
return MOCHA_RESULT_LIB_UNINITIALIZED;
|
||||
|
Loading…
Reference in New Issue
Block a user