some rework on netctl calls

This commit is contained in:
georgemoralis 2024-10-09 12:49:29 +03:00
parent 873fbc469b
commit 68e039b7ef
4 changed files with 14 additions and 3 deletions

View file

@ -26,3 +26,11 @@ constexpr int ORBIS_NET_CTL_STATE_IPOBTAINED = 3;
constexpr int ORBIS_NET_CTL_EVENT_TYPE_DISCONNECTED = 1;
constexpr int ORBIS_SCE_NET_CTL_EVENT_TYPE_DISCONNECT_REQ_FINISHED = 2;
constexpr int ORBIS_NET_CTL_EVENT_TYPE_IPOBTAINED = 3;
// get info codes
// device
constexpr int ORBIS_NET_CTL_DEVICE_WIRED = 0;
constexpr int ORBIS_NET_CTL_DEVICE_WIRELESS = 1;
// link
constexpr int ORBIS_NET_CTL_LINK_DISCONNECTED = 0;
constexpr int ORBIS_NET_CTL_LINK_CONNECTED = 1;

View file

View file

View file

@ -149,10 +149,10 @@ int PS4_SYSV_ABI sceNetCtlGetIfStat() {
int PS4_SYSV_ABI sceNetCtlGetInfo(int code, OrbisNetCtlInfo* info) {
switch (code) {
case ORBIS_NET_CTL_INFO_DEVICE:
info->device = 0;
info->device = ORBIS_NET_CTL_DEVICE_WIRED;
break;
case ORBIS_NET_CTL_INFO_LINK:
info->link = 0; // disconnected
info->link = ORBIS_NET_CTL_LINK_DISCONNECTED;
break;
default:
LOG_ERROR(Lib_NetCtl, "{} unsupported code", code);
@ -187,7 +187,10 @@ int PS4_SYSV_ABI sceNetCtlGetNetEvConfigInfoIpcInt() {
}
int PS4_SYSV_ABI sceNetCtlGetResult(int eventType, int* errorCode) {
LOG_ERROR(Lib_NetCtl, "(STUBBED) called eventType = {} ", eventType);
if (!errorCode) {
return ORBIS_NET_CTL_ERROR_INVALID_ADDR;
}
LOG_DEBUG(Lib_NetCtl, "(STUBBED) called eventType = {} ", eventType);
*errorCode = 0;
return ORBIS_OK;
}