From 5558c8aafefffca68ada82d3d7a389ac8fcedde6 Mon Sep 17 00:00:00 2001 From: Gliniak Date: Wed, 19 Feb 2020 18:22:03 +0100 Subject: [PATCH] [XAM/Network] Implemented NetDll___WSAFDIsSet --- src/xenia/kernel/xam/xam_net.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/xenia/kernel/xam/xam_net.cc b/src/xenia/kernel/xam/xam_net.cc index d0a3d70c3..3150b3098 100644 --- a/src/xenia/kernel/xam/xam_net.cc +++ b/src/xenia/kernel/xam/xam_net.cc @@ -941,6 +941,17 @@ dword_result_t NetDll_sendto(dword_t caller, dword_t socket_handle, } DECLARE_XAM_EXPORT1(NetDll_sendto, kNetworking, kImplemented); +dword_result_t NetDll___WSAFDIsSet(dword_t socket_handle, + pointer_t fd_set) { + for (uint32_t i = 0; i < fd_set->fd_count.value; i++) { + if (fd_set->fd_array[i] == socket_handle) { + return 1; + } + } + return 0; +} +DECLARE_XAM_EXPORT1(NetDll___WSAFDIsSet, kNetworking, kImplemented); + void RegisterNetExports(xe::cpu::ExportResolver* export_resolver, KernelState* kernel_state) { SHIM_SET_MAPPING("xam.xex", NetDll_XNetQosServiceLookup, state);