some initial work on MsgDialog

This commit is contained in:
georgemoralis 2024-03-07 18:42:30 +02:00
parent 3f987b375f
commit 1dfe491b7d
5 changed files with 95 additions and 12 deletions

View File

@ -7,6 +7,12 @@
namespace Libraries::CommonDialog { namespace Libraries::CommonDialog {
struct OrbisCommonDialogBaseParam {
std::size_t size;
u8 reserved[36];
u32 magic;
};
int PS4_SYSV_ABI _ZN3sce16CommonDialogUtil12getSelfAppIdEv(); int PS4_SYSV_ABI _ZN3sce16CommonDialogUtil12getSelfAppIdEv();
int PS4_SYSV_ABI _ZN3sce16CommonDialogUtil6Client11closeModuleEv(); int PS4_SYSV_ABI _ZN3sce16CommonDialogUtil6Client11closeModuleEv();
int PS4_SYSV_ABI _ZN3sce16CommonDialogUtil6Client11updateStateEv(); int PS4_SYSV_ABI _ZN3sce16CommonDialogUtil6Client11updateStateEv();

View File

@ -28,8 +28,11 @@ int PS4_SYSV_ABI sceMsgDialogInitialize() {
return ORBIS_OK; return ORBIS_OK;
} }
int PS4_SYSV_ABI sceMsgDialogOpen() { s32 PS4_SYSV_ABI sceMsgDialogOpen(const OrbisMsgDialogParam* param) {
PRINT_UNIMPLEMENTED_FUNCTION_NAME(); PRINT_DUMMY_FUNCTION_NAME();
OrbisMsgDialogUserMessageParam* userMsgParam = param->userMsgParam;
const char* msg = userMsgParam->msg;
printf("sceMsgDialogOpen msg : %s", msg);
return ORBIS_OK; return ORBIS_OK;
} }

View File

@ -4,14 +4,87 @@
#pragma once #pragma once
#include "library_common.h" #include "library_common.h"
#include "libscecommondialog.h"
namespace Libraries::MsgDialog { namespace Libraries::MsgDialog {
using OrbisUserServiceUserId = s32;
enum OrbisMsgDialogMode {
ORBIS_MSG_DIALOG_MODE_USER_MSG = 1,
ORBIS_MSG_DIALOG_MODE_PROGRESS_BAR = 2,
ORBIS_MSG_DIALOG_MODE_SYSTEM_MSG = 3,
};
enum OrbisMsgDialogButtonType {
ORBIS_MSG_DIALOG_BUTTON_TYPE_OK = 0,
ORBIS_MSG_DIALOG_BUTTON_TYPE_YESNO = 1,
ORBIS_MSG_DIALOG_BUTTON_TYPE_NONE = 2,
ORBIS_MSG_DIALOG_BUTTON_TYPE_OK_CANCEL = 3,
ORBIS_MSG_DIALOG_BUTTON_TYPE_WAIT = 5,
ORBIS_MSG_DIALOG_BUTTON_TYPE_WAIT_CANCEL = 6,
ORBIS_MSG_DIALOG_BUTTON_TYPE_YESNO_FOCUS_NO = 7,
ORBIS_MSG_DIALOG_BUTTON_TYPE_OK_CANCEL_FOCUS_CANCEL = 8,
ORBIS_MSG_DIALOG_BUTTON_TYPE_2BUTTONS = 9,
};
enum OrbisMsgDialogProgressBarType {
ORBIS_MSG_DIALOG_PROGRESSBAR_TYPE_PERCENTAGE = 0,
ORBIS_MSG_DIALOG_PROGRESSBAR_TYPE_PERCENTAGE_CANCEL = 1,
};
enum OrbisMsgDialogSystemMessageType {
ORBIS_MSG_DIALOG_SYSMSG_TYPE_TRC_EMPTY_STORE = 0,
ORBIS_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION = 1,
ORBIS_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_UGC_RESTRICTION = 2,
ORBIS_MSG_DIALOG_SYSMSG_TYPE_CAMERA_NOT_CONNECTED = 4,
ORBIS_MSG_DIALOG_SYSMSG_TYPE_WARNING_PROFILE_PICTURE_AND_NAME_NOT_SHARED = 5,
};
struct OrbisMsgDialogButtonsParam {
const char* msg1;
const char* msg2;
char reserved[32];
};
struct OrbisMsgDialogUserMessageParam {
OrbisMsgDialogButtonType buttonType;
s32 : 32;
const char* msg;
OrbisMsgDialogButtonsParam* buttonsParam;
char reserved[24];
};
struct OrbisMsgDialogProgressBarParam {
OrbisMsgDialogProgressBarType barType;
int32_t : 32;
const char* msg;
char reserved[64];
};
struct OrbisMsgDialogSystemMessageParam {
OrbisMsgDialogSystemMessageType sysMsgType;
char reserved[32];
};
struct OrbisMsgDialogParam {
CommonDialog::OrbisCommonDialogBaseParam baseParam;
std::size_t size;
OrbisMsgDialogMode mode;
s32 : 32;
OrbisMsgDialogUserMessageParam* userMsgParam;
OrbisMsgDialogProgressBarParam* progBarParam;
OrbisMsgDialogSystemMessageParam* sysMsgParam;
OrbisUserServiceUserId userId;
char reserved[40];
s32 : 32;
};
int PS4_SYSV_ABI sceMsgDialogClose(); int PS4_SYSV_ABI sceMsgDialogClose();
int PS4_SYSV_ABI sceMsgDialogGetResult(); int PS4_SYSV_ABI sceMsgDialogGetResult();
int PS4_SYSV_ABI sceMsgDialogGetStatus(); int PS4_SYSV_ABI sceMsgDialogGetStatus();
int PS4_SYSV_ABI sceMsgDialogInitialize(); int PS4_SYSV_ABI sceMsgDialogInitialize();
int PS4_SYSV_ABI sceMsgDialogOpen(); s32 PS4_SYSV_ABI sceMsgDialogOpen(const OrbisMsgDialogParam* param);
int PS4_SYSV_ABI sceMsgDialogProgressBarInc(); int PS4_SYSV_ABI sceMsgDialogProgressBarInc();
int PS4_SYSV_ABI sceMsgDialogProgressBarSetMsg(); int PS4_SYSV_ABI sceMsgDialogProgressBarSetMsg();
int PS4_SYSV_ABI sceMsgDialogProgressBarSetValue(); int PS4_SYSV_ABI sceMsgDialogProgressBarSetValue();

View File

@ -8,7 +8,7 @@
namespace Libraries::SystemService { namespace Libraries::SystemService {
enum OrbisSystemServiceParamId : s32 { enum OrbisSystemServiceParamId {
ORBIS_SYSTEM_SERVICE_PARAM_ID_LANG = 1, ORBIS_SYSTEM_SERVICE_PARAM_ID_LANG = 1,
ORBIS_SYSTEM_SERVICE_PARAM_ID_DATE_FORMAT = 2, ORBIS_SYSTEM_SERVICE_PARAM_ID_DATE_FORMAT = 2,
ORBIS_SYSTEM_SERVICE_PARAM_ID_TIME_FORMAT = 3, ORBIS_SYSTEM_SERVICE_PARAM_ID_TIME_FORMAT = 3,
@ -19,18 +19,18 @@ enum OrbisSystemServiceParamId : s32 {
ORBIS_SYSTEM_SERVICE_PARAM_ID_ENTER_BUTTON_ASSIGN = 1000 ORBIS_SYSTEM_SERVICE_PARAM_ID_ENTER_BUTTON_ASSIGN = 1000
}; };
enum OrbisSystemParamDateFormat : s32 { enum OrbisSystemParamDateFormat {
ORBIS_SYSTEM_PARAM_DATE_FORMAT_YYYYMMDD = 0, ORBIS_SYSTEM_PARAM_DATE_FORMAT_YYYYMMDD = 0,
ORBIS_SYSTEM_PARAM_DATE_FORMAT_DDMMYYYY = 1, ORBIS_SYSTEM_PARAM_DATE_FORMAT_DDMMYYYY = 1,
ORBIS_SYSTEM_PARAM_DATE_FORMAT_MMDDYYYY = 2 ORBIS_SYSTEM_PARAM_DATE_FORMAT_MMDDYYYY = 2
}; };
enum OrbisSystemParamTimeFormat : s32 { enum OrbisSystemParamTimeFormat {
ORBIS_SYSTEM_PARAM_TIME_FORMAT_12HOUR = 0, ORBIS_SYSTEM_PARAM_TIME_FORMAT_12HOUR = 0,
ORBIS_SYSTEM_PARAM_TIME_FORMAT_24HOUR = 1 ORBIS_SYSTEM_PARAM_TIME_FORMAT_24HOUR = 1
}; };
enum OrbisSystemParamGameParentalLevel : s32 { enum OrbisSystemParamGameParentalLevel {
ORBIS_SYSTEM_PARAM_GAME_PARENTAL_OFF = 0, ORBIS_SYSTEM_PARAM_GAME_PARENTAL_OFF = 0,
ORBIS_SYSTEM_PARAM_GAME_PARENTAL_LEVEL01 = 1, ORBIS_SYSTEM_PARAM_GAME_PARENTAL_LEVEL01 = 1,
ORBIS_SYSTEM_PARAM_GAME_PARENTAL_LEVEL02 = 2, ORBIS_SYSTEM_PARAM_GAME_PARENTAL_LEVEL02 = 2,
@ -45,12 +45,12 @@ enum OrbisSystemParamGameParentalLevel : s32 {
ORBIS_SYSTEM_PARAM_GAME_PARENTAL_LEVEL11 = 11 ORBIS_SYSTEM_PARAM_GAME_PARENTAL_LEVEL11 = 11
}; };
enum OrbisSystemParamEnterButtonAssign : s32 { enum OrbisSystemParamEnterButtonAssign {
ORBIS_SYSTEM_PARAM_ENTER_BUTTON_ASSIGN_CIRCLE = 0, ORBIS_SYSTEM_PARAM_ENTER_BUTTON_ASSIGN_CIRCLE = 0,
ORBIS_SYSTEM_PARAM_ENTER_BUTTON_ASSIGN_CROSS = 1 ORBIS_SYSTEM_PARAM_ENTER_BUTTON_ASSIGN_CROSS = 1
}; };
enum OrbisSystemParamLanguage : s32 { enum OrbisSystemParamLanguage {
ORBIS_SYSTEM_PARAM_LANG_JAPANESE = 0, ORBIS_SYSTEM_PARAM_LANG_JAPANESE = 0,
ORBIS_SYSTEM_PARAM_LANG_ENGLISH_US = 1, ORBIS_SYSTEM_PARAM_LANG_ENGLISH_US = 1,
ORBIS_SYSTEM_PARAM_LANG_FRENCH = 2, ORBIS_SYSTEM_PARAM_LANG_FRENCH = 2,
@ -438,7 +438,8 @@ int PS4_SYSV_ABI sceSystemServiceGetAppIdOfBigApp();
int PS4_SYSV_ABI sceSystemServiceGetAppIdOfMiniApp(); int PS4_SYSV_ABI sceSystemServiceGetAppIdOfMiniApp();
int PS4_SYSV_ABI sceSystemServiceGetAppStatus(); int PS4_SYSV_ABI sceSystemServiceGetAppStatus();
int PS4_SYSV_ABI sceSystemServiceGetAppType(); int PS4_SYSV_ABI sceSystemServiceGetAppType();
s32 PS4_SYSV_ABI sceSystemServiceGetDisplaySafeAreaInfo(OrbisSystemServiceDisplaySafeAreaInfo* info); s32 PS4_SYSV_ABI
sceSystemServiceGetDisplaySafeAreaInfo(OrbisSystemServiceDisplaySafeAreaInfo* info);
int PS4_SYSV_ABI sceSystemServiceGetEventForDaemon(); int PS4_SYSV_ABI sceSystemServiceGetEventForDaemon();
int PS4_SYSV_ABI sceSystemServiceGetGpuLoadEmulationMode(); int PS4_SYSV_ABI sceSystemServiceGetGpuLoadEmulationMode();
int PS4_SYSV_ABI sceSystemServiceGetHdrToneMapLuminance(); int PS4_SYSV_ABI sceSystemServiceGetHdrToneMapLuminance();

View File

@ -36,14 +36,14 @@ struct OrbisUserServiceRegisteredUserIdList {
OrbisUserServiceUserId userId[ORBIS_USER_SERVICE_MAX_REGISTER_USERS]; OrbisUserServiceUserId userId[ORBIS_USER_SERVICE_MAX_REGISTER_USERS];
}; };
enum OrbisUserServiceUserColor : s32 { enum OrbisUserServiceUserColor {
ORBIS_USER_SERVICE_USER_COLOR_BLUE = 0, ORBIS_USER_SERVICE_USER_COLOR_BLUE = 0,
ORBIS_USER_SERVICE_USER_COLOR_RED = 1, ORBIS_USER_SERVICE_USER_COLOR_RED = 1,
ORBIS_USER_SERVICE_USER_COLOR_GREEN = 2, ORBIS_USER_SERVICE_USER_COLOR_GREEN = 2,
ORBIS_USER_SERVICE_USER_COLOR_PINK = 3, ORBIS_USER_SERVICE_USER_COLOR_PINK = 3,
}; };
enum OrbisUserServiceEventType : s32 { enum OrbisUserServiceEventType {
SCE_USER_SERVICE_EVENT_TYPE_LOGIN = 0, // Login event SCE_USER_SERVICE_EVENT_TYPE_LOGIN = 0, // Login event
SCE_USER_SERVICE_EVENT_TYPE_LOGOUT = 1, // Logout event SCE_USER_SERVICE_EVENT_TYPE_LOGOUT = 1, // Logout event
}; };