Flesh out the netconf dialog a bit by having it display an error, and add a stub for sceNetApctlDisconnect.

This commit is contained in:
The Dax committed 2014-01-31 19:08:52 -05:00
1 parent 652008e422
commit 7be82a89ab
3 files changed
+74 -14

No files matched your search

+13 -1
View File
@@ -48,6 +48,10 @@ enum {
ERROR_NET_ADHOCCTL_TOO_MANY_HANDLERS = 0x80410b12,
};
enum {
PSP_NET_APCTL_EVENT_DISCONNECT_REQUEST = 5,
};
struct ProductStruct {
s32_le unknown; // Unknown, set to 0
char product[9]; // Game ID (Example: ULUS10000)
@@ -352,6 +356,14 @@ int sceNetInetConnect(int socket, u32 sockAddrInternetPtr, int addressLength) {
return -1;
}
int sceNetApctlDisconnect() {
ERROR_LOG(SCENET, "UNIMPL %s()", __FUNCTION__);
// Like its 'sister' function sceNetAdhocctlDisconnect, we need to alert Apctl handlers that a disconnect took place
// or else games like Phantasy Star Portable 2 will hang.
__UpdateApctlHandlers(0, 0, PSP_NET_APCTL_EVENT_DISCONNECT_REQUEST, 0);
return 0;
}
const HLEFunction sceNet[] = {
{0x39AF39A6, WrapU_UUUUU<sceNetInit>, "sceNetInit"},
{0x281928A9, WrapU_V<sceNetTerm>, "sceNetTerm"},
@@ -413,7 +425,7 @@ const HLEFunction sceNetInet[] = {
const HLEFunction sceNetApctl[] = {
{0xCFB957C6, 0, "sceNetApctlConnect"},
{0x24fe91a1, 0, "sceNetApctlDisconnect"},
{0x24fe91a1, &WrapI_V<sceNetApctlDisconnect>, "sceNetApctlDisconnect" },
{0x5deac81b, 0, "sceNetApctlGetState"},
{0x8abadd51, WrapU_UU<sceNetApctlAddHandler>, "sceNetApctlAddHandler"},
{0xe2f91f9b, WrapI_V<sceNetApctlInit>, "sceNetApctlInit"},