// Copyright (c) 2025- PPSSPP Project.12// This program is free software: you can redistribute it and/or modify3// it under the terms of the GNU General Public License as published by4// the Free Software Foundation, version 2.0 or later versions.56// This program is distributed in the hope that it will be useful,7// but WITHOUT ANY WARRANTY; without even the implied warranty of8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9// GNU General Public License 2.0 for more details.1011// A copy of the GPL 2.0 should have been included with the program.12// If not, see http://www.gnu.org/licenses/1314// Official git repository and contact information can be found at15// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.1617#pragma once1819#include "CommonTypes.h"20#include "Swap.h"2122#include <mutex>2324extern u32 dummyThreadHackAddr;25extern u32_le dummyThreadCode[3];2627void netAdhocValidateLoopMemory();2829extern int netAdhocEnterGameModeTimeout;3031// Old comments regarding the value of adhocDefaultTimeout:32// 3000000 usec33//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)34constexpr int adhocDefaultTimeout = 5000000;3536constexpr int adhocDefaultDelay = 10000; //1000037constexpr int adhocExtraDelay = 20000; //2000038constexpr int adhocEventPollDelay = 100000; //100000; // Seems to be the same with PSP_ADHOCCTL_RECV_TIMEOUT3940// Old comments regarding the value of adhocEventDelay:41//100000042constexpr int adhocEventDelay = 2000000; //2000000 on real PSP ?4344extern std::recursive_mutex adhocEvtMtx;4546// TODO: this one is broken, perhaps delete it entirely?47extern int IsAdhocctlInCB;484950extern u32 matchingThreadHackAddr;51extern u32_le matchingThreadCode[3];5253extern bool g_adhocServerConnected;5455constexpr u32 defaultLastRecvDelta = 10000; //10000 usec worked well for games published by Falcom (ie. Ys vs Sora Kiseki, Vantage Master Portable)565758