Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion core/libs/prx/libSceWebBrowserDialog/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ int APS5_VABI sceWebBrowserDialogSetCookie(void) {
}

int APS5_VABI sceWebBrowserDialogOpenForPredeterminedContent() {
NotImplemented_nid_no_patch(__func__);
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;
g_status = COMMON_DIALOG_STATUS_FINISHED;
return 0;
}

Expand Down
9 changes: 9 additions & 0 deletions core/libs/tests/GuestWebBrowserDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(void);
int APS5_VABI sceWebBrowserDialogClose(void);
int APS5_VABI sceWebBrowserDialogGetStatus(void);
int APS5_VABI sceWebBrowserDialogUpdateStatus(void);
Expand Down Expand Up @@ -59,5 +60,13 @@ int main() {
Require(sceWebBrowserDialogTerminate() == 0);
Require(sceWebBrowserDialogGetStatus() == COMMON_DIALOG_STATUS_NONE);

Require(sceWebBrowserDialogOpenForPredeterminedContent() == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
Require(sceWebBrowserDialogInitialize() == 0);
Require(sceWebBrowserDialogOpenForPredeterminedContent() == 0);
Require(sceWebBrowserDialogGetStatus() == COMMON_DIALOG_STATUS_FINISHED);
Require(sceWebBrowserDialogGetResult(&result) == 0);
Require(result == COMMON_DIALOG_RESULT_USER_CANCELED);
Require(sceWebBrowserDialogTerminate() == 0);

return 0;
}
6 changes: 6 additions & 0 deletions docs/dev/debt/libSceWebBrowserDialog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# libSceWebBrowserDialog technical debt

### Silent stubs

- [sceWebBrowserDialogOpen](../../../core/libs/prx/libSceWebBrowserDialog/Export.cpp) (libSceWebBrowserDialog) - finishes at once with no browser UI; `GetResult` reports user canceled
- [sceWebBrowserDialogOpenForPredeterminedContent](../../../core/libs/prx/libSceWebBrowserDialog/Export.cpp) (libSceWebBrowserDialog) - same as `Open`: finishes at once with no browser UI. Parameter list is unknown in-tree; the export stays parameterless like the other undischarged WebBrowserDialog stubs
Loading