mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-18 04:45:20 +00:00
cellSpurs additions and internal struct refactoring
Also updated the README.
This commit is contained in:
parent
14897b23b7
commit
a239eaf630
26 changed files with 798 additions and 339 deletions
|
|
@ -28,26 +28,18 @@
|
|||
|
||||
extern Module cellNetCtl;
|
||||
|
||||
struct cellNetCtlInternal
|
||||
{
|
||||
bool m_bInitialized;
|
||||
|
||||
cellNetCtlInternal()
|
||||
: m_bInitialized(false)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
cellNetCtlInternal cellNetCtlInstance;
|
||||
std::unique_ptr<CellNetCtlInternal> g_netCtl;
|
||||
|
||||
s32 cellNetCtlInit()
|
||||
{
|
||||
cellNetCtl.Log("cellNetCtlInit()");
|
||||
|
||||
if (cellNetCtlInstance.m_bInitialized)
|
||||
if (g_netCtl->m_bInitialized)
|
||||
{
|
||||
return CELL_NET_CTL_ERROR_NOT_TERMINATED;
|
||||
}
|
||||
|
||||
cellNetCtlInstance.m_bInitialized = true;
|
||||
g_netCtl->m_bInitialized = true;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
@ -56,10 +48,12 @@ s32 cellNetCtlTerm()
|
|||
{
|
||||
cellNetCtl.Log("cellNetCtlTerm()");
|
||||
|
||||
if (!cellNetCtlInstance.m_bInitialized)
|
||||
if (!g_netCtl->m_bInitialized)
|
||||
{
|
||||
return CELL_NET_CTL_ERROR_NOT_INITIALIZED;
|
||||
}
|
||||
|
||||
cellNetCtlInstance.m_bInitialized = false;
|
||||
g_netCtl->m_bInitialized = false;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
@ -276,7 +270,7 @@ s32 cellNetCtlGetNatInfo(vm::ptr<CellNetCtlNatInfo> natInfo)
|
|||
|
||||
Module cellNetCtl("cellNetCtl", []()
|
||||
{
|
||||
cellNetCtlInstance.m_bInitialized = false;
|
||||
g_netCtl = std::make_unique<CellNetCtlInternal>();
|
||||
|
||||
REG_FUNC(cellNetCtl, cellNetCtlInit);
|
||||
REG_FUNC(cellNetCtl, cellNetCtlTerm);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue