Skip to content

Commit

Permalink
Merge pull request hrydgard#1 from Bigpet/adhocFix
Browse files Browse the repository at this point in the history
don't initialize adhoc connection when networking is disabled
  • Loading branch information
sum2012 committed Sep 7, 2014
2 parents 34451d8 + a04e369 commit daf9cce
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Core/HLE/sceNetAdhoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,17 @@ u32 sceNetAdhocctlInit(int stackSize, int prio, u32 productAddr) {

if (netAdhocctlInited) return ERROR_NET_ADHOCCTL_ALREADY_INITIALIZED;

if (initNetwork((SceNetAdhocctlAdhocId *)Memory::GetPointer(productAddr)) != 0) WARN_LOG(SCENET, "sceNetAdhocctlInit: Faking success");
if(g_Config.bEnableWlan)
{
if (initNetwork((SceNetAdhocctlAdhocId *)Memory::GetPointer(productAddr)) != 0) WARN_LOG(SCENET, "sceNetAdhocctlInit: Faking success");

if (!friendFinderRunning) {
friendFinderRunning = true;
friendFinderThread = std::thread(friendFinder);
}
if (!friendFinderRunning) {
friendFinderRunning = true;
friendFinderThread = std::thread(friendFinder);
}

netAdhocctlInited = true; //needed for cleanup during AdhocctlTerm even when it failed to connect to Adhoc Server (since it's being faked as success)
netAdhocctlInited = true; //needed for cleanup during AdhocctlTerm even when it failed to connect to Adhoc Server (since it's being faked as success)
}
return 0;
}

Expand Down

0 comments on commit daf9cce

Please sign in to comment.