Merge pull request #818 from tambry/SceNpCleanupAndCommerce2Additions

Huge sceNp cleanup and added sceNpCommerce2Init and sceNpCommerce2Term
This commit is contained in:
B1ackDaemon 2014-09-21 17:44:56 +03:00
commit f1e2446f17
3 changed files with 1320 additions and 1292 deletions

View File

@ -90,6 +90,8 @@ void Module::UnLoad()
if(m_unload_func) m_unload_func();
// TODO: Re-enable this when needed
// This was disabled because some functions would get unloaded and
// some games tried to use them, thus only printing a TODO message
//for(u32 i=0; i<m_funcs_list.size(); ++i)
//{
// Emu.GetModuleManager().UnloadFunc(m_funcs_list[i]->id);

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,18 @@
Module *sceNpCommerce2 = nullptr;
struct sceNpCommerce2Internal
{
bool m_bSceNpCommerce2Initialized;
sceNpCommerce2Internal()
: m_bSceNpCommerce2Initialized(false)
{
}
};
sceNpCommerce2Internal sceNpCommerce2Instance;
int sceNpCommerce2ExecuteStoreBrowse()
{
UNIMPLEMENTED_FUNC(sceNpCommerce2);
@ -20,13 +32,25 @@ int sceNpCommerce2GetStoreBrowseUserdata()
int sceNpCommerce2Init()
{
UNIMPLEMENTED_FUNC(sceNpCommerce2);
sceNpCommerce2->Warning("sceNpCommerce2Init()");
if (sceNpCommerce2Instance.m_bSceNpCommerce2Initialized)
return SCE_NP_COMMERCE2_ERROR_ALREADY_INITIALIZED;
sceNpCommerce2Instance.m_bSceNpCommerce2Initialized = true;
return CELL_OK;
}
int sceNpCommerce2Term()
{
UNIMPLEMENTED_FUNC(sceNpCommerce2);
sceNpCommerce2->Warning("sceNpCommerce2Term()");
if (!sceNpCommerce2Instance.m_bSceNpCommerce2Initialized)
return SCE_NP_COMMERCE2_ERROR_NOT_INITIALIZED;
sceNpCommerce2Instance.m_bSceNpCommerce2Initialized = false;
return CELL_OK;
}