mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-11 16:49:27 +01:00
sceNetApctl: Fail GetState before Init, let GetLocalEtherAddr work in infrastructure mode
- Fixes #22857 PES 2009 calls sceNetApctlGetState first and only calls sceNetApctlInit when it fails with 0x80410a0d. We returned success, so Init was never called, apctl's state never advanced and the Netconf dialog waited on "Connecting to the access point" forever. A PSP returns 0x80410a0d before Init and after Term (pspautotests net/adhoc/apctlinit). After that the game polls sceNetGetLocalEtherAddr until it succeeds, which we only allowed in ad hoc mode. Also allow it once apctl has connected. It still fails with apctl initialized but not connected, as the test shows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6b9830a030
commit
1437c15f52
5 files changed
+12
-3
No files matched your search
+8
-2
@@ -1124,8 +1124,11 @@ static u32 sceWlanGetEtherAddr(u32 addrAddr) {
|
||||
|
||||
static u32 sceNetGetLocalEtherAddr(u32 addrAddr) {
|
||||
// FIXME: Return 0x80410180 (pspnet[_core] error code?) before successful attempt to Create/Connect/Join a Group? (ie. adhocctlCurrentMode == ADHOCCTL_MODE_NONE)
|
||||
if (adhocctlCurrentMode == ADHOCCTL_MODE_NONE)
|
||||
// Fails while apctl is initialized but not connected (pspautotests net/adhoc/apctlinit). PES 2009 polls it
|
||||
// until it succeeds once apctl has connected.
|
||||
if (adhocctlCurrentMode == ADHOCCTL_MODE_NONE && !__NetApctlConnected()) {
|
||||
return hleLogDebug(Log::sceNet, 0x80410180, "address not available?");
|
||||
}
|
||||
|
||||
return sceWlanGetEtherAddr(addrAddr);
|
||||
}
|
||||
@@ -1602,7 +1605,10 @@ bool __NetApctlConnected() {
|
||||
}
|
||||
|
||||
static int sceNetApctlGetState(u32 pStateAddr) {
|
||||
//if (!netApctlInited) return hleLogError(Log::sceNet, SCE_NET_APCTL_ERROR_NOT_IN_BSS, "apctl not in bss");
|
||||
// PES 2009 only calls sceNetApctlInit when this fails. pspautotests net/adhoc/apctlinit
|
||||
if (!g_netApctlInited) {
|
||||
return hleLogWarning(Log::sceNet, SCE_NET_APCTL_ERROR_NOT_INITIALIZED, "not initialized");
|
||||
}
|
||||
|
||||
// Valid Arguments
|
||||
if (Memory::IsValidAddress(pStateAddr)) {
|
||||
|
||||
Reference in new issue
Block a user