Headless: Act as the only instance

Headless doesn't join the instance counter, so PPSSPP_ID stayed 0 and the
localhost IP derived from it came out as 127.0.0.0, which macOS won't bind.
Every sceNetInetBind failed with EADDRNOTAVAIL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-27 17:02:03 +01:00
1 parent 72a0cd1879
commit 4e156e8945
1 file changed
+4
+4
View File
@@ -69,6 +69,7 @@
#include "headless/ReverseEngineer.h"
#include "Core/WebServer.h"
#include "Core/HLE/sceUtility.h"
#include "Core/Instance.h"
#include "Core/SaveState.h"
#include "GPU/GPUCommon.h"
#include "GPU/Common/FramebufferManagerCommon.h"
@@ -1153,6 +1154,9 @@ int main(int argc, const char* argv[]) {
g_Config.bEnableWlan = true;
// The net tests want WLAN on, but a test run shouldn't depend on reaching a real adhoc server.
g_Config.sProAdhocServer = "localhost";
// Headless doesn't join the app's instance counter (InitInstanceCounter), but behaves as the only
// instance: with the default 0, the localhost IP derived from it is 127.0.0.0, which macOS won't bind.
PPSSPP_ID = 1;
g_Config.sMACAddress = "12:34:56:78:9A:BC";
g_Config.iFirmwareVersion = PSP_DEFAULT_FIRMWARE;
g_Config.iPSPModel = PSP_MODEL_SLIM;