Skip to content

Commit 90bca94

Browse files
committed
(WiiU) libmocha: Add LaunchHomebrewWrapperEx
Required library call to pass arguments between different homebrew apps, which is something that RetroArch needs to pass the content path to cores. I'll try and get this upstreamed once <sysapp/args.h> is in a released version of wut, but for now we'll just have to carry it in-tree.
1 parent 49205e0 commit 90bca94

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

deps/libmocha/include/mocha/mocha.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "otp.h"
44
#include <coreinit/filesystem.h>
55
#include <coreinit/filesystem_fsa.h>
6+
#include <sysapp/args.h>
67
#include <stdint.h>
78

89
#ifdef __cplusplus
@@ -214,6 +215,7 @@ MochaUtilsStatus Mocha_PrepareRPXLaunch(MochaRPXLoadInfo *loadInfo);
214215
* MOCHA_RESULT_NOT_FOUND: Not application that can be used as homebrew wrapper found.
215216
*/
216217
MochaUtilsStatus Mocha_LaunchHomebrewWrapper();
218+
MochaUtilsStatus Mocha_LaunchHomebrewWrapperEx(SYSStandardArgsIn *args);
217219

218220
/**
219221
* Launches a given RPX by launching a wrapper application and replacing the RPX on the fly. <br>
@@ -289,4 +291,4 @@ MochaUtilsStatus Mocha_UnmountFS(const char *virt_name);
289291

290292
#ifdef __cplusplus
291293
} // extern "C"
292-
#endif
294+
#endif

deps/libmocha/source/utils.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ MochaUtilsStatus Mocha_LaunchRPX(MochaRPXLoadInfo *loadInfo) {
419419
return res;
420420
}
421421

422-
MochaUtilsStatus Mocha_LaunchHomebrewWrapper() {
422+
MochaUtilsStatus Mocha_LaunchHomebrewWrapperEx(SYSStandardArgsIn *args) {
423423
if (!mochaInitDone) {
424424
return MOCHA_RESULT_LIB_UNINITIALIZED;
425425
}
@@ -434,11 +434,15 @@ MochaUtilsStatus Mocha_LaunchHomebrewWrapper() {
434434
return MOCHA_RESULT_NOT_FOUND;
435435
}
436436

437-
_SYSLaunchTitleWithStdArgsInNoSplash(titleID, nullptr);
437+
_SYSLaunchTitleWithStdArgsInNoSplash(titleID, args);
438438

439439
return MOCHA_RESULT_SUCCESS;
440440
}
441441

442+
MochaUtilsStatus Mocha_LaunchHomebrewWrapper() {
443+
return Mocha_LaunchHomebrewWrapperEx(nullptr);
444+
}
445+
442446
MochaUtilsStatus Mocha_ODMGetDiscKey(WUDDiscKey *discKey) {
443447
if (!mochaInitDone) {
444448
return MOCHA_RESULT_LIB_UNINITIALIZED;

0 commit comments

Comments
 (0)