mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-10-11 21:49:59 +00:00
signindialog: basic error returns (#5323)
* signindialog: basic error returns * copyright 2026
This commit is contained in:
@@ -721,6 +721,7 @@ set(MISC_LIBS src/core/libraries/screenshot/screenshot.cpp
|
||||
src/core/libraries/ulobjmgr/ulobjmgr.h
|
||||
src/core/libraries/signin_dialog/signindialog.cpp
|
||||
src/core/libraries/signin_dialog/signindialog.h
|
||||
src/core/libraries/signin_dialog/signindialog_error.h
|
||||
)
|
||||
|
||||
set(CAMERA_LIBS src/core/libraries/camera/camera.cpp
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2024-2026 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
// Generated By moduleGenerator
|
||||
@@ -9,38 +9,65 @@
|
||||
|
||||
namespace Libraries::SigninDialog {
|
||||
|
||||
static bool g_lib_init = false;
|
||||
static bool g_lib_open = false;
|
||||
|
||||
s32 PS4_SYSV_ABI sceSigninDialogInitialize() {
|
||||
LOG_ERROR(Lib_SigninDialog, "(STUBBED) called");
|
||||
g_lib_init = true;
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceSigninDialogOpen() {
|
||||
LOG_ERROR(Lib_SigninDialog, "(STUBBED) called");
|
||||
g_lib_open = true;
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
Status PS4_SYSV_ABI sceSigninDialogGetStatus() {
|
||||
if (!g_lib_init) {
|
||||
return Status::NONE;
|
||||
}
|
||||
if (!g_lib_open) {
|
||||
return Status::NONE;
|
||||
}
|
||||
LOG_ERROR(Lib_SigninDialog, "(STUBBED) called, return 'finished' status");
|
||||
return Status::FINISHED;
|
||||
}
|
||||
|
||||
Status PS4_SYSV_ABI sceSigninDialogUpdateStatus() {
|
||||
if (!g_lib_init) {
|
||||
return Status::NONE;
|
||||
}
|
||||
if (!g_lib_open) {
|
||||
return Status::NONE;
|
||||
}
|
||||
LOG_ERROR(Lib_SigninDialog, "(STUBBED) called, return 'finished' status");
|
||||
return Status::FINISHED;
|
||||
return g_lib_open ? Status::FINISHED : Status::NONE;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceSigninDialogGetResult() {
|
||||
s32 PS4_SYSV_ABI sceSigninDialogGetResult(OrbisSigninDialogResult* result) {
|
||||
if (!g_lib_init) {
|
||||
return ORBIS_SIGNIN_DIALOG_ERROR_NOT_INITIALIZED;
|
||||
}
|
||||
LOG_ERROR(Lib_SigninDialog, "(STUBBED) called");
|
||||
if (!result) {
|
||||
return ORBIS_SIGNIN_DIALOG_ERROR_PARAM_INVALID;
|
||||
}
|
||||
result->result = OrbisSigninDialogResultType::OK;
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceSigninDialogClose() {
|
||||
LOG_ERROR(Lib_SigninDialog, "(STUBBED) called");
|
||||
g_lib_open = false;
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
s32 PS4_SYSV_ABI sceSigninDialogTerminate() {
|
||||
LOG_ERROR(Lib_SigninDialog, "(STUBBED) called");
|
||||
g_lib_open = false;
|
||||
g_lib_init = false;
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2024-2026 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
#include "common/types.h"
|
||||
#include "signindialog_error.h"
|
||||
|
||||
namespace Core::Loader {
|
||||
class SymbolsResolver;
|
||||
}
|
||||
|
||||
namespace Libraries::SigninDialog {
|
||||
|
||||
enum class Status : u32 {
|
||||
NONE = 0,
|
||||
INITIALIZED = 1,
|
||||
@@ -15,13 +18,20 @@ enum class Status : u32 {
|
||||
FINISHED = 3,
|
||||
};
|
||||
|
||||
namespace Libraries::SigninDialog {
|
||||
enum class OrbisSigninDialogResultType {
|
||||
OK = 0,
|
||||
USER_CANCELED = 1,
|
||||
};
|
||||
struct OrbisSigninDialogResult {
|
||||
OrbisSigninDialogResultType result;
|
||||
int32_t reserved[3];
|
||||
};
|
||||
|
||||
s32 PS4_SYSV_ABI sceSigninDialogInitialize();
|
||||
s32 PS4_SYSV_ABI sceSigninDialogOpen();
|
||||
Status PS4_SYSV_ABI sceSigninDialogGetStatus();
|
||||
Status PS4_SYSV_ABI sceSigninDialogUpdateStatus();
|
||||
s32 PS4_SYSV_ABI sceSigninDialogGetResult();
|
||||
s32 PS4_SYSV_ABI sceSigninDialogGetResult(OrbisSigninDialogResult* result);
|
||||
s32 PS4_SYSV_ABI sceSigninDialogClose();
|
||||
s32 PS4_SYSV_ABI sceSigninDialogTerminate();
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/types.h"
|
||||
|
||||
static constexpr u32 ORBIS_SIGNIN_DIALOG_ERROR_NOT_INITIALIZED = 0x81350001;
|
||||
static constexpr u32 ORBIS_SIGNIN_DIALOG_ERROR_ALREADY_INITIALIZED = 0x81350002;
|
||||
static constexpr u32 ORBIS_SIGNIN_DIALOG_ERROR_PARAM_INVALID = 0x81350003;
|
||||
static constexpr u32 ORBIS_SIGNIN_DIALOG_ERROR_UNEXPECTED_FATAL = 0x81350004;
|
||||
static constexpr u32 ORBIS_SIGNIN_DIALOG_ERROR_INVALID_STATE = 0x81350005;
|
||||
static constexpr u32 ORBIS_SIGNIN_DIALOG_ERROR_SERVICE_BUSY = 0x81350006;
|
||||
static constexpr u32 ORBIS_SIGNIN_DIALOG_ERROR_INVALID_USER_ID = 0x81350007;
|
||||
Reference in New Issue
Block a user