summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-07-12 02:43:51 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-07-28 06:47:03 +0200
commitef8acc9c3d859b93190327bf992db1f7a639ee0f (patch)
tree3cee3c547bcc7a65a16127d5dd79788cf77fb2a9
parentMerge pull request #4437 from lioncash/ptr (diff)
downloadyuzu-ef8acc9c3d859b93190327bf992db1f7a639ee0f.tar
yuzu-ef8acc9c3d859b93190327bf992db1f7a639ee0f.tar.gz
yuzu-ef8acc9c3d859b93190327bf992db1f7a639ee0f.tar.bz2
yuzu-ef8acc9c3d859b93190327bf992db1f7a639ee0f.tar.lz
yuzu-ef8acc9c3d859b93190327bf992db1f7a639ee0f.tar.xz
yuzu-ef8acc9c3d859b93190327bf992db1f7a639ee0f.tar.zst
yuzu-ef8acc9c3d859b93190327bf992db1f7a639ee0f.zip
-rw-r--r--src/core/hle/service/nifm/nifm.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp
index 01ddcdbd6..2e9d95195 100644
--- a/src/core/hle/service/nifm/nifm.cpp
+++ b/src/core/hle/service/nifm/nifm.cpp
@@ -9,6 +9,7 @@
#include "core/hle/kernel/writable_event.h"
#include "core/hle/service/nifm/nifm.h"
#include "core/hle/service/service.h"
+#include "core/network/network.h"
#include "core/settings.h"
namespace Service::NIFM {
@@ -174,6 +175,16 @@ private:
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
}
+ void GetCurrentIpAddress(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service_NIFM, "(STUBBED) called");
+
+ const auto [ipv4, error] = Network::GetHostIPv4Address();
+ UNIMPLEMENTED_IF(error != Network::Errno::SUCCESS);
+
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(RESULT_SUCCESS);
+ rb.PushRaw(ipv4);
+ }
void CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_NIFM, "called");
@@ -235,7 +246,7 @@ IGeneralService::IGeneralService(Core::System& system)
{9, nullptr, "SetNetworkProfile"},
{10, &IGeneralService::RemoveNetworkProfile, "RemoveNetworkProfile"},
{11, nullptr, "GetScanDataOld"},
- {12, nullptr, "GetCurrentIpAddress"},
+ {12, &IGeneralService::GetCurrentIpAddress, "GetCurrentIpAddress"},
{13, nullptr, "GetCurrentAccessPointOld"},
{14, &IGeneralService::CreateTemporaryNetworkProfile, "CreateTemporaryNetworkProfile"},
{15, nullptr, "GetCurrentIpConfigInfo"},