g_adhocServerConnected moved to NetAdhocCommon

This commit is contained in:
Nemoumbra
2025-07-01 23:57:30 +03:00
parent 9e03358283
commit c4dafe28b0
6 changed files with 13 additions and 3 deletions
+5 -1
View File
@@ -35,12 +35,14 @@ void netAdhocValidateLoopMemory() {
}
int netAdhocEnterGameModeTimeout = 15000000; // 15 sec as default timeout, to wait for all players to join
int adhocDefaultTimeout = 5000000; //2000000 usec // For some unknown reason, sometimes it tooks more than 2 seconds for Adhocctl Init to connect to AdhocServer on localhost (normally only 10 ms), and sometimes it tooks more than 1 seconds for built-in AdhocServer to be ready (normally only 1 ms)
// TODO: constify
int adhocDefaultTimeout = 5000000; //2000000 usec // For some unknown reason, sometimes it tooks more than 2 seconds for Adhocctl Init to connect to AdhocServer on localhost (normally only 10 ms), and sometimes it tooks more than 1 seconds for built-in AdhocServer to be ready (normally only 1 ms)
int adhocDefaultDelay = 10000; //10000
int adhocExtraDelay = 20000; //20000
int adhocEventPollDelay = 100000; //100000; // Same timings with PSP_ADHOCCTL_RECV_TIMEOUT ?
int adhocEventDelay = 2000000; //2000000 on real PSP ?
std::recursive_mutex adhocEvtMtx;
int IsAdhocctlInCB = 0;
@@ -48,3 +50,5 @@ int IsAdhocctlInCB = 0;
u32 matchingThreadHackAddr = 0;
u32_le matchingThreadCode[3];
bool g_adhocServerConnected = false;
+5
View File
@@ -28,11 +28,14 @@ extern u32_le dummyThreadCode[3];
void netAdhocValidateLoopMemory();
extern int netAdhocEnterGameModeTimeout;
// TODO: constify
extern int adhocDefaultTimeout; //3000000 usec
extern int adhocDefaultDelay; //10000
extern int adhocExtraDelay; //20000
extern int adhocEventPollDelay; //100000; // Seems to be the same with PSP_ADHOCCTL_RECV_TIMEOUT
extern int adhocEventDelay; //1000000
extern std::recursive_mutex adhocEvtMtx;
// TODO: this one is broken, perhaps delete it entirely?
@@ -41,3 +44,5 @@ extern int IsAdhocctlInCB;
extern u32 matchingThreadHackAddr;
extern u32_le matchingThreadCode[3];
extern bool g_adhocServerConnected;
-1
View File
@@ -63,7 +63,6 @@
// TODO: Make accessor functions instead, and throw all this state in a struct.
bool netAdhocInited;
bool netAdhocctlInited;
bool g_adhocServerConnected = false;
#define DISCOVER_DURATION_US 2000000 // 2 seconds is probably the normal time it takes for PSP to connect to a group (ie. similar to NetconfigDialog time)
u64 netAdhocDiscoverStartTime = 0;
+1 -1
View File
@@ -137,7 +137,7 @@ int NetAdhoc_Term();
// May need to use these from sceNet.cpp
extern bool netAdhocInited; // TODO: keep here
extern bool netAdhocctlInited; // TODO: move to sceNetAdhocctl
extern bool g_adhocServerConnected;
extern bool netAdhocGameModeEntered;
extern s32 netAdhocDiscoverStatus; // TODO: maybe move to sceNetAdhocDiscover?
+1
View File
@@ -36,6 +36,7 @@
#include "Core/HLE/sceNetAdhoc.h"
#include "Core/HLE/proAdhoc.h"
#include "Core/HLE/sceNetAdhocMatching.h"
#include "Core/HLE/NetAdhocCommon.h"
#include "Common/System/Request.h"
#include "Core/Util/AtracTrack.h"
+1
View File
@@ -47,6 +47,7 @@
#include "Core/HLE/sceNet.h"
#include "Core/HLE/sceNetInet.h"
#include "Core/HLE/sceNetAdhoc.h"
#include "Core/HLE/NetAdhocCommon.h"
#include "GPU/GPUCommon.h"
#include "GPU/GPUState.h"