feat(libSceWebBrowserDialog): return not-initialized error before dialog initialization

This commit is contained in:
Omar Elmahy committed 2026-11-01 06:48:56 +00:00
1 parent 5f0857ee2e
commit 8b7632c8ea
4 files changed
+16 -1

No files matched your search

@@ -7,6 +7,7 @@ if(BUILD_TESTING)
add_test_executable(guest_web_browser_dialog_tests ${LIBS_INCLUDE_DIR}/tests/GuestWebBrowserDialog.cpp)
target_include_directories(guest_web_browser_dialog_tests PRIVATE ${LIBS_INCLUDE_DIR})
target_link_libraries(guest_web_browser_dialog_tests PRIVATE libSceWebBrowserDialog libSceIme)
configure_windows_unwind(guest_web_browser_dialog_tests)
add_test(NAME guest_web_browser_dialog COMMAND guest_web_browser_dialog_tests)
if(WIN32)
set_tests_properties(guest_web_browser_dialog PROPERTIES ENVIRONMENT_MODIFICATION
@@ -18,6 +19,7 @@ if(BUILD_TESTING)
add_test_executable(guest_web_browser_dialog_cookies_tests ${LIBS_INCLUDE_DIR}/tests/GuestWebBrowserDialogCookies.cpp)
target_include_directories(guest_web_browser_dialog_cookies_tests PRIVATE ${LIBS_INCLUDE_DIR})
target_link_libraries(guest_web_browser_dialog_cookies_tests PRIVATE libSceWebBrowserDialog)
configure_windows_unwind(guest_web_browser_dialog_cookies_tests)
add_test(NAME guest_web_browser_dialog_cookies COMMAND guest_web_browser_dialog_cookies_tests)
if(WIN32)
set_tests_properties(guest_web_browser_dialog_cookies PROPERTIES ENVIRONMENT_MODIFICATION
@@ -154,16 +154,19 @@ int APS5_VABI sceWebBrowserDialogResetCookie(const WebBrowserDialogResetCookiePa
}
int APS5_VABI sceWebBrowserDialogGetEvent() {
if (g_status.load() == COMMON_DIALOG_STATUS_NONE) return COMMON_DIALOG_ERROR_NOT_INITIALIZED;
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceWebBrowserDialogNavigate() {
if (g_status.load() == COMMON_DIALOG_STATUS_NONE) return COMMON_DIALOG_ERROR_NOT_INITIALIZED;
NotImplemented_nid_no_patch(__func__);
return 0;
}
int APS5_VABI sceWebBrowserDialogSetZoom() {
if (g_status.load() == COMMON_DIALOG_STATUS_NONE) return COMMON_DIALOG_ERROR_NOT_INITIALIZED;
NotImplemented_nid_no_patch(__func__);
return 0;
}
@@ -70,6 +70,9 @@ int main() {
Require(sceWebBrowserDialogTerminate() == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
Require(sceWebBrowserDialogSetCookie(nullptr) == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
Require(sceWebBrowserDialogResetCookie(nullptr) == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
Require(sceWebBrowserDialogGetEvent() == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
Require(sceWebBrowserDialogNavigate() == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
Require(sceWebBrowserDialogSetZoom() == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
Require(sceWebBrowserDialogGetStatus() == COMMON_DIALOG_STATUS_NONE);
Require(sceWebBrowserDialogClose() == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
Require(sceWebBrowserDialogOpen(nullptr) == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
@@ -97,6 +100,9 @@ int main() {
Require(sceWebBrowserDialogTerminate() == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
Require(sceWebBrowserDialogOpen(nullptr) == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
Require(sceWebBrowserDialogGetResult(nullptr) == COMMON_DIALOG_ERROR_ARG_NULL);
Require(sceWebBrowserDialogGetEvent() == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
Require(sceWebBrowserDialogNavigate() == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
Require(sceWebBrowserDialogSetZoom() == COMMON_DIALOG_ERROR_NOT_INITIALIZED);
Require(sceWebBrowserDialogGetStatus() == COMMON_DIALOG_STATUS_NONE);
Require(sceWebBrowserDialogInitialize() == 0);
+5 -1
View File
@@ -7,7 +7,11 @@
- [sceWebBrowserDialogSetCookie, sceWebBrowserDialogResetCookie](../../../core/libs/prx/libSceWebBrowserDialog/Export.cpp) (libSceWebBrowserDialog) - there is no browser cookie store. Both calls check their parameters in the same order and with the same codes as the PS5 13.60 module, then return 0 without storing or clearing anything. On the console they then forward the request to the browser service. While an opened dialog has not been updated to finished, closed or terminated, they return `0x80B80006` (the console's open-dialog flag).
### Unknown function info
- [sceWebBrowserDialogGetEvent, sceWebBrowserDialogNavigate, sceWebBrowserDialogSetZoom](../../../core/libs/prx/libSceWebBrowserDialog/Export.cpp) (libSceWebBrowserDialog) - their names and NIDs are in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceWebBrowserDialog.c); the no-parameter prototypes follow [shadPS4 `webbrowserdialog.cpp`](https://github.com/shadps4-emu/shadPS4/blob/f68923fe807f657348e6719ce658bcbd0a2b1c72/src/core/libraries/web_browser_dialog/webbrowserdialog.cpp#L23-L85) and are not measured on a console. They are declared without parameters solely to resolve known imports; this is not an ABI claim, and every call throws.
- [sceWebBrowserDialogGetEvent, sceWebBrowserDialogNavigate, sceWebBrowserDialogSetZoom](../../../core/libs/prx/libSceWebBrowserDialog/Export.cpp) (libSceWebBrowserDialog) - their names and NIDs are in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceWebBrowserDialog.c); the no-parameter prototypes follow [shadPS4 `webbrowserdialog.cpp`](https://github.com/shadps4-emu/shadPS4/blob/f68923fe807f657348e6719ce658bcbd0a2b1c72/src/core/libraries/web_browser_dialog/webbrowserdialog.cpp#L23-L85) and are not measured on a console. They are declared without parameters solely to resolve known imports; this is not an ABI claim, and initialized calls throw through `NotImplemented_nid_no_patch`.
### Functional
- [sceWebBrowserDialogGetEvent, sceWebBrowserDialogNavigate, sceWebBrowserDialogSetZoom](../../../core/libs/prx/libSceWebBrowserDialog/Export.cpp) (libSceWebBrowserDialog) - return `COMMON_DIALOG_ERROR_NOT_INITIALIZED` (`0x80B80003`) when status is `NONE` before initialization and after termination, with both the error code and state-first check order inferred from the existing dialog lifecycle rather than export-specific evidence. Signatures, argument validation, error precedence and initialized behavior remain unknown and unmodelled; initialized calls throw through `NotImplemented_nid_no_patch`. Not measured on a console.
### Additional callable exports