mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-23 09:03:22 -05:00
A second sceCommonDialogInitialize returned 0x80B80004 (ALREADY_INITIALIZED), the code each dialog's own Initialize returns. The common-dialog system initializer returns 0x80B80002 (ALREADY_SYSTEM_INITIALIZED), as shadPS4 and the SDK error names have it, so callers that accept only SCE_OK or ALREADY_SYSTEM_INITIALIZED treated a second call as a failure. The header keeps ALREADY_INITIALIZED for the dialog libraries that return it. The test pins the literal instead of the header constant, and the debt entry records that a repeated call's value is not measured on a console. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
541 B
C++
25 lines
541 B
C++
#include <atomic>
|
|
#include <cstdint>
|
|
#include <cstddef>
|
|
#include "SceTypes.hpp"
|
|
#include "prx/libSceCommonDialog/CommonDialog.hpp"
|
|
#include "prx/libc/include/General.hpp"
|
|
|
|
static std::atomic<bool> g_initialized{false};
|
|
|
|
extern "C" {
|
|
|
|
int APS5_VABI sceCommonDialogInitialize(void) {
|
|
bool expected = false;
|
|
if (!g_initialized.compare_exchange_strong(expected, true)) {
|
|
return COMMON_DIALOG_ERROR_ALREADY_SYSTEM_INITIALIZED;
|
|
}
|
|
return COMMON_DIALOG_OK;
|
|
}
|
|
|
|
bool APS5_VABI sceCommonDialogIsUsed(void) {
|
|
return false;
|
|
}
|
|
|
|
}
|