mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
Added initialization and termination for SceNpTus Module
Also added initialization checks
This commit is contained in:
parent
70e5068e37
commit
b02225dd80
1 changed files with 235 additions and 3 deletions
|
@ -7,333 +7,565 @@
|
|||
|
||||
Module *sceNpTus = nullptr;
|
||||
|
||||
struct sceNpTusInternal
|
||||
{
|
||||
bool m_bSceNpTusInitialized;
|
||||
|
||||
sceNpTusInternal()
|
||||
: m_bSceNpTusInitialized(false)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
sceNpTusInternal sceNpTusInstance;
|
||||
|
||||
int sceNpTusInit()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
sceNpTus->Warning("sceNpTusInit()");
|
||||
|
||||
if (sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_ALREADY_INITIALIZED;
|
||||
|
||||
sceNpTusInstance.m_bSceNpTusInitialized = true;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusTerm()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
sceNpTus->Warning("sceNpTusTerm()");
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
sceNpTusInstance.m_bSceNpTusInitialized = false;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusCreateTitleCtx()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusDestroyTitleCtx()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusCreateTransactionCtx()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusDestroyTransactionCtx()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusSetTimeout()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusAbortTransaction()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusWaitAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusPollAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusSetMultiSlotVariable()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusSetMultiSlotVariableVUser()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusSetMultiSlotVariableAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusSetMultiSlotVariableVUserAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiSlotVariable()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiSlotVariableVUser()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiSlotVariableAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiSlotVariableVUserAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiUserVariable()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiUserVariableVUser()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiUserVariableAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiUserVariableVUserAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusAddAndGetVariable()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusAddAndGetVariableVUser()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusAddAndGetVariableAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusAddAndGetVariableVUserAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusTryAndSetVariable()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusTryAndSetVariableVUser()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusTryAndSetVariableAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusTryAndSetVariableVUserAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusDeleteMultiSlotVariable()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusDeleteMultiSlotVariableVUser()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusDeleteMultiSlotVariableAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusDeleteMultiSlotVariableVUserAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusSetData()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusSetDataVUser()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusSetDataAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusSetDataVUserAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetData()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetDataVUser()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetDataAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetDataVUserAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiSlotDataStatus()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiSlotDataStatusVUser()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiSlotDataStatusAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiSlotDataStatusVUserAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiUserDataStatus()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiUserDataStatusVUser()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiUserDataStatusAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusGetMultiUserDataStatusVUserAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusDeleteMultiSlotData()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusDeleteMultiSlotDataVUser()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusDeleteMultiSlotDataAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTusDeleteMultiSlotDataVUserAsync()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTus);
|
||||
|
||||
if (!sceNpTusInstance.m_bSceNpTusInitialized)
|
||||
return SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
void sceNpTus_unload()
|
||||
{
|
||||
// TODO: Unload Tus module
|
||||
sceNpTusInstance.m_bSceNpTusInitialized = false;
|
||||
}
|
||||
|
||||
void sceNpTus_init(Module *pxThis)
|
||||
|
|
Loading…
Add table
Reference in a new issue