Made some requested changes
This commit is contained in:
parent
c211e5079c
commit
2d2ccade21
1 changed files with 3 additions and 10 deletions
|
@ -4,6 +4,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
|
||||
namespace Ryujinx.HLE.OsHle.Services.Nifm
|
||||
{
|
||||
|
@ -17,8 +18,7 @@ namespace Ryujinx.HLE.OsHle.Services.Nifm
|
|||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 4, CreateRequest },
|
||||
{ 5, GetCurrentNetworkProfile },
|
||||
{ 4, CreateRequest },
|
||||
{ 12, GetCurrentIpAddress }
|
||||
};
|
||||
}
|
||||
|
@ -35,19 +35,12 @@ namespace Ryujinx.HLE.OsHle.Services.Nifm
|
|||
return 0;
|
||||
}
|
||||
|
||||
public long GetCurrentNetworkProfile(ServiceCtx Context)
|
||||
{
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceNifm, "Stubbed.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long GetCurrentIpAddress(ServiceCtx Context)
|
||||
{
|
||||
string HostName = Dns.GetHostName();
|
||||
IPHostEntry HostEntry = Dns.GetHostEntry(HostName);
|
||||
IPAddress[] Address = HostEntry.AddressList;
|
||||
var IP = Address.Where(x => x.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork).FirstOrDefault();
|
||||
IPAddress IP = Address.Where(x => x.AddressFamily == AddressFamily.InterNetwork).FirstOrDefault();
|
||||
uint LocalIP = BitConverter.ToUInt32(IP.GetAddressBytes());
|
||||
Context.ResponseData.Write(LocalIP);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue