diff options
| author | 2021-08-07 02:17:02 +0200 | |
|---|---|---|
| committer | 2021-08-07 02:17:02 +0200 | |
| commit | dd5c41b5a600764b029617520c737b94a58f6b70 (patch) | |
| tree | 4ba517dfb5a17ed9378c1ed1c816462b67bf36c8 /src/core/hle | |
| parent | network: fix fcntl cmds (diff) | |
| download | yuzu-dd5c41b5a600764b029617520c737b94a58f6b70.tar.gz yuzu-dd5c41b5a600764b029617520c737b94a58f6b70.tar.xz yuzu-dd5c41b5a600764b029617520c737b94a58f6b70.zip | |
network: GetCurrentIpConfigInfo: return host IP address
Service::NIFM::IGeneralService::GetCurrentIpConfigInfo currently hardcodes 192.168.1.100 as the IP address, which prevents LAN play from working correctly.
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/service/nifm/nifm.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index e742db48f..5ef574d20 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp | |||
| @@ -354,10 +354,13 @@ private: | |||
| 354 | static_assert(sizeof(IpConfigInfo) == sizeof(IpAddressSetting) + sizeof(DnsSetting), | 354 | static_assert(sizeof(IpConfigInfo) == sizeof(IpAddressSetting) + sizeof(DnsSetting), |
| 355 | "IpConfigInfo has incorrect size."); | 355 | "IpConfigInfo has incorrect size."); |
| 356 | 356 | ||
| 357 | const auto [ipv4, error] = Network::GetHostIPv4Address(); | ||
| 358 | ASSERT_MSG(error == Network::Errno::SUCCESS, "Couldn't get host IPv4 address"); | ||
| 359 | |||
| 357 | const IpConfigInfo ip_config_info{ | 360 | const IpConfigInfo ip_config_info{ |
| 358 | .ip_address_setting{ | 361 | .ip_address_setting{ |
| 359 | .is_automatic{true}, | 362 | .is_automatic{true}, |
| 360 | .current_address{192, 168, 1, 100}, | 363 | .current_address{ipv4}, |
| 361 | .subnet_mask{255, 255, 255, 0}, | 364 | .subnet_mask{255, 255, 255, 0}, |
| 362 | .gateway{192, 168, 1, 1}, | 365 | .gateway{192, 168, 1, 1}, |
| 363 | }, | 366 | }, |