Skip to content

Commit

Permalink
modules/SceAppMgr: Stub sceAppMgrMmsMount.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zangetsu38 committed Nov 5, 2024
1 parent e78b375 commit 15bd3a8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
21 changes: 18 additions & 3 deletions vita3k/modules/SceAppMgr/SceAppMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,24 @@ EXPORT(int, _sceAppMgrLoopBackMount) {
return UNIMPLEMENTED();
}

EXPORT(int, _sceAppMgrMmsMount) {
TRACY_FUNC(_sceAppMgrMmsMount);
return UNIMPLEMENTED();
EXPORT(SceInt32, _sceAppMgrMmsMount, SceInt32 id, char *mount_point) {
TRACY_FUNC(_sceAppMgrMmsMount, id, mount_point);
switch (id) {
case 0x190:
strcpy(mount_point, "ux0:mms/photo/");
break;
case 0x191:
strcpy(mount_point, "ux0:mms/music");
break;
case 0x192:
strcpy(mount_point, "ux0:mms/video");
break;
default:
LOG_WARN("Unknown id: {}", log_hex(id));
break;
}

return STUBBED("using strcpy");
}

EXPORT(int, _sceAppMgrOverwriteLaunchParamForShell) {
Expand Down
1 change: 1 addition & 0 deletions vita3k/modules/SceAppMgr/SceAppMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ typedef struct SceAppMgrLoadExecOptParam {
DECL_EXPORT(SceInt32, __sceAppMgrGetAppState, SceAppMgrAppState *appState, SceUInt32 sizeofSceAppMgrAppState, SceUInt32 buildVersion);
DECL_EXPORT(SceInt32, _sceAppMgrAppParamGetString, int pid, int param, char *string, int length);
DECL_EXPORT(SceInt32, _sceAppMgrLoadExec, const char *appPath, Ptr<char> const argv[], const SceAppMgrLoadExecOptParam *optParam);
DECL_EXPORT(SceInt32, _sceAppMgrMmsMount, SceInt32 id, char *mount_point);

SceInt32 __sceAppMgrGetAppState(SceAppMgrAppState *appState, SceUInt32 sizeofSceAppMgrAppState, SceUInt32 buildVersion);
SceInt32 _sceAppMgrLoadExec(const char *appPath, char *const argv[], const SceAppMgrLoadExecOptParam *optParam);
6 changes: 3 additions & 3 deletions vita3k/modules/SceDriverUser/SceAppMgrUser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,9 @@ EXPORT(int, sceAppMgrLoopBackMount) {
return UNIMPLEMENTED();
}

EXPORT(int, sceAppMgrMmsMount) {
TRACY_FUNC(sceAppMgrMmsMount);
return UNIMPLEMENTED();
EXPORT(SceInt32, sceAppMgrMmsMount, SceInt32 id, char *mount_point) {
TRACY_FUNC(sceAppMgrMmsMount, id, mount_point);
return CALL_EXPORT(_sceAppMgrMmsMount, id, mount_point);
}

EXPORT(int, sceAppMgrOverwriteLaunchParamForShell) {
Expand Down

0 comments on commit 15bd3a8

Please sign in to comment.