From 4e156e8945b6edfa952591bed4b7da51a6c91976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 11 Oct 2026 20:53:41 +0200 Subject: [PATCH] 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 --- headless/Headless.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/headless/Headless.cpp b/headless/Headless.cpp index 06cc53ad9a..ae0aba8de6 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -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;