Merge pull request #5904 from pushkarreddyy/feat/libSceWebBrowserDialog-open-predetermined

feat(libSceWebBrowserDialog): implement sceWebBrowserDialogOpenForPredeterminedContent
This commit is contained in:
Adrià authored and GitHub committed 2026-10-16 22:30:53 +02:00
commit 04a8c2f6bf
3 files changed
+27 -2

No files matched your search

@@ -72,8 +72,12 @@ int APS5_VABI sceWebBrowserDialogSetCookie(void) {
return 0;
}
int APS5_VABI sceWebBrowserDialogOpenForPredeterminedContent() {
NotImplemented_nid_no_patch(__func__);
int APS5_VABI sceWebBrowserDialogOpenForPredeterminedContent(const void* param) {
const int status = g_status.load();
if (status == COMMON_DIALOG_STATUS_NONE) return COMMON_DIALOG_ERROR_NOT_INITIALIZED;
if (status == COMMON_DIALOG_STATUS_RUNNING) return COMMON_DIALOG_ERROR_BUSY;
if (param == nullptr) return COMMON_DIALOG_ERROR_ARG_NULL;
g_status = COMMON_DIALOG_STATUS_FINISHED;
return 0;
}
+16
View File
@@ -6,6 +6,7 @@ extern "C" {
int APS5_VABI sceWebBrowserDialogInitialize(void);
int APS5_VABI sceWebBrowserDialogTerminate(void);
int APS5_VABI sceWebBrowserDialogOpen(const void* param);
int APS5_VABI sceWebBrowserDialogOpenForPredeterminedContent(const void* param);
int APS5_VABI sceWebBrowserDialogClose(void);
int APS5_VABI sceWebBrowserDialogGetStatus(void);
int APS5_VABI sceWebBrowserDialogUpdateStatus(void);
@@ -64,5 +65,20 @@ int main() {
Require(sceWebBrowserDialogTerminate() == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
Require(sceWebBrowserDialogGetStatus() == COMMON_DIALOG_STATUS_NONE);
Require(sceWebBrowserDialogOpenForPredeterminedContent(param) == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
Require(sceWebBrowserDialogInitialize() == 0);
Require(sceWebBrowserDialogOpenForPredeterminedContent(nullptr) == COMMON_DIALOG_ERROR_ARG_NULL);
Require(sceWebBrowserDialogOpenForPredeterminedContent(param) == 0);
Require(sceWebBrowserDialogGetStatus() == COMMON_DIALOG_STATUS_FINISHED);
Require(sceWebBrowserDialogUpdateStatus() == COMMON_DIALOG_STATUS_FINISHED);
result = 0x5a5a5a5a;
Require(sceWebBrowserDialogGetResult(&result) == 0);
Require(result == COMMON_DIALOG_RESULT_USER_CANCELED);
Require(sceWebBrowserDialogClose() == 0);
Require(sceWebBrowserDialogTerminate() == 0);
Require(sceWebBrowserDialogGetStatus() == COMMON_DIALOG_STATUS_NONE);
return 0;
}
+5
View File
@@ -0,0 +1,5 @@
# libSceWebBrowserDialog technical debt
### Silent stubs
- [libSceWebBrowserDialog](../../../core/libs/prx/libSceWebBrowserDialog/Export.cpp) - `sceWebBrowserDialogOpen` and `sceWebBrowserDialogOpenForPredeterminedContent` run the common-dialog state machine without displaying an interactive browser, and `sceWebBrowserDialogGetResult` reports that the user cancelled. Minecraft Bedrock (PPSA17221) imports `sceWebBrowserDialogOpenForPredeterminedContent` (#5744). The real export takes a second argument, the allow-list of up to twenty addresses (SharpProspero `docs/dialogs.md`); it is not read here, so no address filtering is modelled, and the exact validation order and codes with a null second argument are unverified.