summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Morph2021-01-31 06:37:10 -0500
committerGravatar Morph2021-01-31 06:56:29 -0500
commit4bf1cf1f81a44ee544c295cbe4945d2c8c05e0c4 (patch)
tree76f0bd6058209248a52eb998f319ca6c9fb7a66a
parentnifm: Add several structs (diff)
downloadyuzu-4bf1cf1f81a44ee544c295cbe4945d2c8c05e0c4.tar.gz
yuzu-4bf1cf1f81a44ee544c295cbe4945d2c8c05e0c4.tar.xz
yuzu-4bf1cf1f81a44ee544c295cbe4945d2c8c05e0c4.zip
nifm: Stub GetCurrentNetworkProfile
- Used by Minecraft Bedrock Edition - Used by Bloons TD 5
-rw-r--r--src/core/hle/service/nifm/nifm.cpp42
1 files changed, 41 insertions, 1 deletions
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp
index b924a12d1..0c91897cd 100644
--- a/src/core/hle/service/nifm/nifm.cpp
+++ b/src/core/hle/service/nifm/nifm.cpp
@@ -266,6 +266,46 @@ private:
266 rb.Push(RESULT_SUCCESS); 266 rb.Push(RESULT_SUCCESS);
267 rb.PushIpcInterface<IRequest>(system); 267 rb.PushIpcInterface<IRequest>(system);
268 } 268 }
269 void GetCurrentNetworkProfile(Kernel::HLERequestContext& ctx) {
270 LOG_WARNING(Service_NIFM, "(STUBBED) called");
271
272 const SfNetworkProfileData network_profile_data{
273 .ip_setting_data{
274 .ip_address_setting{
275 .is_automatic{true},
276 .current_address{192, 168, 1, 100},
277 .subnet_mask{255, 255, 255, 0},
278 .gateway{192, 168, 1, 1},
279 },
280 .dns_setting{
281 .is_automatic{true},
282 .primary_dns{1, 1, 1, 1},
283 .secondary_dns{1, 0, 0, 1},
284 },
285 .proxy_setting{
286 .enabled{false},
287 .port{},
288 .proxy_server{},
289 .automatic_auth_enabled{},
290 .user{},
291 .password{},
292 },
293 .mtu{1500},
294 },
295 .uuid{0xdeadbeef, 0xdeadbeef},
296 .network_name{"yuzu Network"},
297 .wireless_setting_data{
298 .ssid_length{12},
299 .ssid{"yuzu Network"},
300 .passphrase{"yuzupassword"},
301 },
302 };
303
304 ctx.WriteBuffer(network_profile_data);
305
306 IPC::ResponseBuilder rb{ctx, 2};
307 rb.Push(RESULT_SUCCESS);
308 }
269 void RemoveNetworkProfile(Kernel::HLERequestContext& ctx) { 309 void RemoveNetworkProfile(Kernel::HLERequestContext& ctx) {
270 LOG_WARNING(Service_NIFM, "(STUBBED) called"); 310 LOG_WARNING(Service_NIFM, "(STUBBED) called");
271 311
@@ -335,7 +375,7 @@ IGeneralService::IGeneralService(Core::System& system_)
335 {1, &IGeneralService::GetClientId, "GetClientId"}, 375 {1, &IGeneralService::GetClientId, "GetClientId"},
336 {2, &IGeneralService::CreateScanRequest, "CreateScanRequest"}, 376 {2, &IGeneralService::CreateScanRequest, "CreateScanRequest"},
337 {4, &IGeneralService::CreateRequest, "CreateRequest"}, 377 {4, &IGeneralService::CreateRequest, "CreateRequest"},
338 {5, nullptr, "GetCurrentNetworkProfile"}, 378 {5, &IGeneralService::GetCurrentNetworkProfile, "GetCurrentNetworkProfile"},
339 {6, nullptr, "EnumerateNetworkInterfaces"}, 379 {6, nullptr, "EnumerateNetworkInterfaces"},
340 {7, nullptr, "EnumerateNetworkProfiles"}, 380 {7, nullptr, "EnumerateNetworkProfiles"},
341 {8, nullptr, "GetNetworkProfile"}, 381 {8, nullptr, "GetNetworkProfile"},