Skip to content

Commit

Permalink
modules/SceAppMgr: Stub sceAppMgrMmsMount.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zangetsu38 authored and bookmist committed Nov 19, 2024
1 parent 8a4a81c commit f028514
Show file tree
Hide file tree
Showing 3 changed files with 23 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_ERROR("Unknown id: {}", log_hex(id));
return RET_ERROR(SCE_APPMGR_ERROR_INVALID_PARAMETER);
}

return STUBBED("using strcpy");
}

EXPORT(int, _sceAppMgrOverwriteLaunchParamForShell) {
Expand Down
2 changes: 2 additions & 0 deletions vita3k/modules/SceAppMgr/SceAppMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <module/module.h>

enum SceAppMgrErrorCode : uint32_t {
SCE_APPMGR_ERROR_INVALID_PARAMETER = 0x80800001, //!< Invalid parameter
SCE_APPMGR_ERROR_BUSY = 0x80802000, //!< Busy
SCE_APPMGR_ERROR_STATE = 0x80802013, //!< Invalid state
SCE_APPMGR_ERROR_NULL_POINTER = 0x80802016, //!< NULL pointer
Expand Down Expand Up @@ -55,6 +56,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 f028514

Please sign in to comment.