Skip to content
Merged
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
1 change: 1 addition & 0 deletions core/libs/prx/libSceCommonDialog/CommonDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ inline bool ValidateCommonDialogBaseParam(const CommonDialogBaseParam& param) {
}

constexpr int COMMON_DIALOG_OK = 0;
constexpr int COMMON_DIALOG_ERROR_ALREADY_SYSTEM_INITIALIZED = static_cast<int>(0x80B80002);
constexpr int COMMON_DIALOG_ERROR_ALREADY_INITIALIZED = static_cast<int>(0x80B80004);

#endif
2 changes: 1 addition & 1 deletion core/libs/prx/libSceCommonDialog/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern "C" {
int APS5_VABI sceCommonDialogInitialize(void) {
bool expected = false;
if (!g_initialized.compare_exchange_strong(expected, true)) {
return COMMON_DIALOG_ERROR_ALREADY_INITIALIZED;
return COMMON_DIALOG_ERROR_ALREADY_SYSTEM_INITIALIZED;
}
return COMMON_DIALOG_OK;
}
Expand Down
5 changes: 4 additions & 1 deletion core/libs/tests/GuestCommonDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ void Require(bool value) {
if (!value) std::abort();
}

constexpr int kErrAlreadySystemInitialized = static_cast<int>(0x80B80002);

}

int main() {
Require(!sceCommonDialogIsUsed());
Require(sceCommonDialogInitialize() == COMMON_DIALOG_OK);
Require(!sceCommonDialogIsUsed());
Require(sceCommonDialogInitialize() == COMMON_DIALOG_ERROR_ALREADY_INITIALIZED);
Require(sceCommonDialogInitialize() == kErrAlreadySystemInitialized);
Require(sceCommonDialogInitialize() == kErrAlreadySystemInitialized);
Require(!sceCommonDialogIsUsed());
}
4 changes: 4 additions & 0 deletions docs/dev/debt/libSceCommonDialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
### Silent stubs

- [libSceCommonDialog](../../../core/libs/prx/libSceCommonDialog/Export.cpp)

### Functional

- [sceCommonDialogInitialize](../../../core/libs/prx/libSceCommonDialog/Export.cpp) (libSceCommonDialog) - returning `ALREADY_SYSTEM_INITIALIZED` (`0x80B80002`) from a repeated call is not measured on a console by the project. A third-party PS5 log ([obSCEne](https://github.com/project-oops/obSCEne/blob/67b4c529eb3c271184117e26bb54330531ef2cf6/reports/hardware/report-20261014-004800.log#L260-L261), firmware 12.40) records two calls, `0x0` and then `0x80b80002`; a third call is not covered. The SDK error names, shadPS4 (a PS4 emulator) and SharpProspero give the same value; PPSA09695 compares the result with `0x80b80002` (call site 0x5F7BD0) and PPSA06327 stops on `0x80b80004`. Closes when: measured on a PS5, including a third call.
Loading