1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 04:32:35 +01:00

Make cellNetCtlGetInfo returns the correct value in disconnected mode

This commit is contained in:
scribam 2018-02-04 22:43:22 +01:00 committed by Ivan
parent 6e8ccbcf17
commit 31cee7e4c8

View File

@ -125,20 +125,25 @@ error_code cellNetCtlGetInfo(s32 code, vm::ptr<CellNetCtlInfo> info)
{
cellNetCtl.todo("cellNetCtlGetInfo(code=0x%x (%s), info=*0x%x)", code, InfoCodeToName(code), info);
if (code == CELL_NET_CTL_INFO_ETHER_ADDR)
{
// dummy values set
std::memset(info->ether_addr.data, 0xFF, sizeof(info->ether_addr.data));
return CELL_OK;
}
if (g_cfg.net.net_status == CELL_NET_CTL_STATE_Disconnected)
{
return CELL_NET_CTL_ERROR_NOT_CONNECTED;
}
if (code == CELL_NET_CTL_INFO_MTU)
{
info->mtu = 1500;
}
else if (code == CELL_NET_CTL_INFO_LINK)
{
if (g_cfg.net.net_status != CELL_NET_CTL_STATE_Disconnected)
{
info->link = CELL_NET_CTL_LINK_CONNECTED;
}
else
{
info->link = CELL_NET_CTL_LINK_DISCONNECTED;
}
info->link = CELL_NET_CTL_LINK_CONNECTED;
}
else if (code == CELL_NET_CTL_INFO_IP_ADDRESS)
{