sceNet.cpp: Reset & initialise all variables properly upon Init and Shutdown.

This commit is contained in:
The Dax 2013-07-17 17:34:17 -04:00
parent 6b5d615040
commit 553e331bae

View File

@ -106,15 +106,23 @@ struct ApctlHandler {
static std::map<int, ApctlHandler> apctlHandlers;
void __NetInit() {
netInited = false;
netAdhocInited = false;
netApctlInited = false;
netInetInited = false;
memset(&netMallocStat, 0, sizeof(netMallocStat));
__ResetInitNetLib();
}
void __NetShutdown() {
__ResetInitNetLib();
}
void __ResetInitNetLib() {
netInited = false;
netAdhocInited = false;
netAdhocctlInited = false;
netAdhocMatchingInited = false;
netApctlInited = false;
netInetInited = false;
adhocctlHandlers.clear();
memset(&netMallocStat, 0, sizeof(netMallocStat));
}
void __UpdateAdhocctlHandlers(int flag, int error) {