diff options
author | Zephyron <zephyron@citron-emu.orgq> | 2025-02-17 21:59:15 +1000 |
---|---|---|
committer | Zephyron <zephyron@citron-emu.orgq> | 2025-02-17 21:59:15 +1000 |
commit | 43495b60453fe05b2ff27f358ec7ea1deb8537fa (patch) | |
tree | 68ee3ca5fabd67e8370ead9ee53286eb4617cdf8 /src/core/hle | |
parent | c5e480e55ddc3183c48148daaa14c00ada855fee (diff) |
network: Improve network interface handling and address resolution
- Return loopback address (127.0.0.1) when no network interface is selected
- Improve IPv4 address string conversion and handling
- Add explicit handling for "None" network interface selection
- Change IsAnyInternetRequestAccepted logging from ERROR to DEBUG
- Simplify internet request acceptance check to assume availability
This change makes the network interface handling more robust by providing
fallback behaviors and improving address resolution. It also reduces
unnecessary error logging for expected scenarios.
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/service/nifm/nifm.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index b1addb1fb..4f717c871 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp @@ -562,15 +562,14 @@ void IGeneralService::IsEthernetCommunicationEnabled(HLERequestContext& ctx) { } void IGeneralService::IsAnyInternetRequestAccepted(HLERequestContext& ctx) { - LOG_ERROR(Service_NIFM, "(STUBBED) called"); + LOG_DEBUG(Service_NIFM, "called"); + + // Assume internet is available unless explicitly disabled + const bool is_accepted = true; // This can be enhanced later with actual network state checking IPC::ResponseBuilder rb{ctx, 3}; rb.Push(ResultSuccess); - if (Network::GetHostIPv4Address().has_value()) { - rb.Push<u8>(1); - } else { - rb.Push<u8>(0); - } + rb.Push<u8>(is_accepted); } void IGeneralService::IsAnyForegroundRequestAccepted(HLERequestContext& ctx) { |