mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-05 13:20:11 +00:00
Merge pull request #8355 from akkadbakkad89/feat/npgameintent-applauncher
feat(libSceNpGameIntent): implement the AppLauncher lifecycle a title calls at boot
This commit is contained in:
3 files changed
+18
-4
No files matched your search
@@ -12,6 +12,7 @@ constexpr int NpGameIntentErrorIntentNotFound = -2141898746;
|
||||
constexpr int NpGameIntentErrorValueNotFound = -2141898745;
|
||||
constexpr int NpGameIntentUserIdInvalid = -1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
@@ -73,8 +74,8 @@ int APS5_VABI sceNpGameIntentVshTerminate(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int APS5_VABI sceNpAppLauncherInitialize() {
|
||||
NotImplemented_nid_no_patch(__func__);
|
||||
int APS5_VABI sceNpAppLauncherInitialize(const void* initParam) {
|
||||
(void)initParam;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -84,7 +85,6 @@ int APS5_VABI sceNpAppLauncherLaunchApp() {
|
||||
}
|
||||
|
||||
int APS5_VABI sceNpAppLauncherTerminate() {
|
||||
NotImplemented_nid_no_patch(__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ int APS5_VABI sceNpGameIntentGetPropertyValueString(const NpGameIntentData* inte
|
||||
int APS5_VABI sceNpGameIntentVshInitialize(void);
|
||||
int APS5_VABI sceNpGameIntentVshTerminate(void);
|
||||
int APS5_VABI sceNpGameIntentTerminate(void);
|
||||
int APS5_VABI sceNpAppLauncherInitialize(const void* initParam);
|
||||
int APS5_VABI sceNpAppLauncherLaunchApp(void);
|
||||
int APS5_VABI sceNpAppLauncherTerminate(void);
|
||||
}
|
||||
|
||||
static void Require(bool value, const char* what) {
|
||||
@@ -62,6 +65,16 @@ int main() {
|
||||
Require(sceNpGameIntentVshTerminate() == 0, "vsh terminate failed");
|
||||
Require(sceNpGameIntentTerminate() == 0, "terminate failed");
|
||||
|
||||
unsigned char appLauncherParam[0x28]{};
|
||||
*reinterpret_cast<std::uint64_t*>(appLauncherParam) = 0x28;
|
||||
Require(sceNpAppLauncherInitialize(appLauncherParam) == 0, "app launcher init failed");
|
||||
Require(Throws<std::runtime_error>([] { sceNpAppLauncherLaunchApp(); }),
|
||||
"app launcher launch must throw until implemented");
|
||||
Require(sceNpAppLauncherTerminate() == 0, "app launcher terminate failed");
|
||||
*reinterpret_cast<std::uint64_t*>(appLauncherParam) = 0x10;
|
||||
Require(sceNpAppLauncherInitialize(appLauncherParam) == 0,
|
||||
"app launcher init must accept any init parameter");
|
||||
|
||||
std::puts("NpGameIntent tests passed");
|
||||
return 0;
|
||||
}
|
||||
@@ -3,9 +3,10 @@
|
||||
### Silent stubs
|
||||
|
||||
- [sceNpGameIntentVshInitialize, sceNpGameIntentVshTerminate](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - VSH initialization and termination return 0 without performing shell operations, matching `sceNpGameIntentInitialize` and `sceNpGameIntentTerminate`
|
||||
- [sceNpAppLauncherInitialize, sceNpAppLauncherTerminate](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - app-launcher lifecycle returns success without tracking launch state; `sceNpAppLauncherInitialize` accepts its init parameter without validation, following the silent-stub precedent of `sceNpGameIntentInitialize` — a title calls it early in boot, and returning success lets it continue
|
||||
|
||||
### Unknown function info
|
||||
|
||||
- [sceNpAppLauncherInitialize, sceNpAppLauncherLaunchApp, sceNpAppLauncherTerminate, sceNpGameIntentGetUdsNpComId, sceNpGameIntentLaunchApp, sceNpGameIntentLaunchApp2, sceNpGameIntentNotifyAppLaunched, sceNpSessionServiceGetJoinedPartySession, sceNpSessionServiceGetRunningGamePlayerSession and sceNpSessionServiceSendPlayerSessionInvitations](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpGameIntent.c), but no credible prototypes were found in the cited sources. They are declared without parameters solely to resolve known imports and make no ABI claim.
|
||||
- [sceNpAppLauncherLaunchApp, sceNpGameIntentGetUdsNpComId, sceNpGameIntentLaunchApp, sceNpGameIntentLaunchApp2, sceNpGameIntentNotifyAppLaunched, sceNpSessionServiceGetJoinedPartySession, sceNpSessionServiceGetRunningGamePlayerSession and sceNpSessionServiceSendPlayerSessionInvitations](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpGameIntent.c). Call sites in a title's executable give a partial prototype: `sceNpAppLauncherLaunchApp` takes `(user_id, uri struct, context)` and returns int — throws because no launcher-service semantics are derivable. The rest are declared without parameters solely to resolve known imports and make no ABI claim.
|
||||
- [sceNpGameIntentInitParamInit](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - struct layout matches [fpPS4](https://github.com/red-prig/fpPS4/blob/master/src/np/ps4_libscenpgameintent.pas#L17) `SceNpGameIntentInitParam`; setting `size`, zeroing reserved bytes, and throwing on null pointer follow Sony SDK `*ParamInit` conventions but are unverified on retail hardware
|
||||
- [sceNpGameIntentInfoInit](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - struct layout matches [fpPS4](https://github.com/red-prig/fpPS4/blob/master/src/np/ps4_libscenpgameintent.pas#L28) `SceNpGameIntentInfo`; setting `size`, `user_id = -1`, zeroing fields, and throwing on null pointer match `sceNpGameIntentReceiveIntent` defaults but are unverified on retail hardware
|
||||
Reference in new issue
Block a user