summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Morph2021-01-31 06:47:49 -0500
committerGravatar Morph2021-01-31 07:36:37 -0500
commit8c7d89e6c75ff0c680233b01504bf6b19b960659 (patch)
tree93425dd2da6a2fc949987c3535223ed08f59ef5f
parentnifm: Stub GetCurrentNetworkProfile (diff)
downloadyuzu-8c7d89e6c75ff0c680233b01504bf6b19b960659.tar.gz
yuzu-8c7d89e6c75ff0c680233b01504bf6b19b960659.tar.xz
yuzu-8c7d89e6c75ff0c680233b01504bf6b19b960659.zip
nifm: Stub GetCurrentIpConfigInfo
- Used by Lets Sing 12
-rw-r--r--src/core/hle/service/nifm/nifm.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp
index 0c91897cd..4db183096 100644
--- a/src/core/hle/service/nifm/nifm.cpp
+++ b/src/core/hle/service/nifm/nifm.cpp
@@ -337,6 +337,34 @@ private:
337 rb.PushIpcInterface<INetworkProfile>(system); 337 rb.PushIpcInterface<INetworkProfile>(system);
338 rb.PushRaw<u128>(uuid); 338 rb.PushRaw<u128>(uuid);
339 } 339 }
340 void GetCurrentIpConfigInfo(Kernel::HLERequestContext& ctx) {
341 LOG_WARNING(Service_NIFM, "(STUBBED) called");
342
343 struct IpConfigInfo {
344 IpAddressSetting ip_address_setting;
345 DnsSetting dns_setting;
346 };
347 static_assert(sizeof(IpConfigInfo) == sizeof(IpAddressSetting) + sizeof(DnsSetting),
348 "IpConfigInfo has incorrect size.");
349
350 const IpConfigInfo ip_config_info{
351 .ip_address_setting{
352 .is_automatic{true},
353 .current_address{192, 168, 1, 100},
354 .subnet_mask{255, 255, 255, 0},
355 .gateway{192, 168, 1, 1},
356 },
357 .dns_setting{
358 .is_automatic{true},
359 .primary_dns{1, 1, 1, 1},
360 .secondary_dns{1, 0, 0, 1},
361 },
362 };
363
364 IPC::ResponseBuilder rb{ctx, 2 + sizeof(IpConfigInfo) / sizeof(u32)};
365 rb.Push(RESULT_SUCCESS);
366 rb.PushRaw<IpConfigInfo>(ip_config_info);
367 }
340 void IsWirelessCommunicationEnabled(Kernel::HLERequestContext& ctx) { 368 void IsWirelessCommunicationEnabled(Kernel::HLERequestContext& ctx) {
341 LOG_WARNING(Service_NIFM, "(STUBBED) called"); 369 LOG_WARNING(Service_NIFM, "(STUBBED) called");
342 370
@@ -385,7 +413,7 @@ IGeneralService::IGeneralService(Core::System& system_)
385 {12, &IGeneralService::GetCurrentIpAddress, "GetCurrentIpAddress"}, 413 {12, &IGeneralService::GetCurrentIpAddress, "GetCurrentIpAddress"},
386 {13, nullptr, "GetCurrentAccessPointOld"}, 414 {13, nullptr, "GetCurrentAccessPointOld"},
387 {14, &IGeneralService::CreateTemporaryNetworkProfile, "CreateTemporaryNetworkProfile"}, 415 {14, &IGeneralService::CreateTemporaryNetworkProfile, "CreateTemporaryNetworkProfile"},
388 {15, nullptr, "GetCurrentIpConfigInfo"}, 416 {15, &IGeneralService::GetCurrentIpConfigInfo, "GetCurrentIpConfigInfo"},
389 {16, nullptr, "SetWirelessCommunicationEnabled"}, 417 {16, nullptr, "SetWirelessCommunicationEnabled"},
390 {17, &IGeneralService::IsWirelessCommunicationEnabled, "IsWirelessCommunicationEnabled"}, 418 {17, &IGeneralService::IsWirelessCommunicationEnabled, "IsWirelessCommunicationEnabled"},
391 {18, nullptr, "GetInternetConnectionStatus"}, 419 {18, nullptr, "GetInternetConnectionStatus"},