Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Commit

Permalink
Updated popdialog
Browse files Browse the repository at this point in the history
  • Loading branch information
victorrjimenezz committed Jan 14, 2022
1 parent ba46dbb commit c954ef6
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions src/utils/dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,19 @@
#include <string>
#include <cstdlib>

static inline void sceCommonDialogSetMagicNumber( uint32_t* magic, const OrbisCommonDialogBaseParam* param ) {
*magic = (uint32_t)( ORBIS_COMMON_DIALOG_MAGIC_NUMBER + (uint64_t)param );
}

static inline void sceCommonDialogBaseParamInit(OrbisCommonDialogBaseParam *param) {
memset(param, 0x0, sizeof(OrbisCommonDialogBaseParam));
param->size = (uint32_t)sizeof(OrbisCommonDialogBaseParam);
sceCommonDialogSetMagicNumber( &(param->magic), param );
}


static inline void OrbisMsgDialogParamInitialize(OrbisMsgDialogParam *param){
memset( param, 0x0, sizeof(OrbisMsgDialogParam) );
sceCommonDialogBaseParamInit( &param->baseParam );
param->size = sizeof(OrbisMsgDialogParam);
}

int popDialog(const char* message) {
int ret = 0;

sceMsgDialogInitialize();
OrbisMsgDialogParam param;
OrbisMsgDialogParamInitialize(&param);

memset(&param, 0x0, sizeof(OrbisMsgDialogParam) );
memset(&param.baseParam, 0x0, sizeof(OrbisCommonDialogBaseParam));

param.baseParam.size = (uint32_t)sizeof(OrbisCommonDialogBaseParam);
param.baseParam.magic = (uint32_t)( ORBIS_COMMON_DIALOG_MAGIC_NUMBER + (uint64_t)&param.baseParam );

param.size = sizeof(OrbisMsgDialogParam);
param.mode = ORBIS_MSG_DIALOG_MODE_USER_MSG;

OrbisMsgDialogUserMessageParam userMsgParam;
Expand Down

0 comments on commit c954ef6

Please sign in to comment.