mirror of
https://github.com/izzy2lost/WeeU.git
synced 2026-07-06 00:19:59 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1c70588fe | ||
|
|
4442efa8ac |
+6
-7
@@ -34,13 +34,6 @@ elseif(UNIX)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
add_compile_options(-Wno-ambiguous-reversed-operator)
|
||||
endif()
|
||||
# most linux environments should enable pie by default, but make sure just in case.
|
||||
# the same cannot be said for no executable stack which some linkers
|
||||
# and configurations thereof might enable due to the assembly in the project
|
||||
if(NOT APPLE)
|
||||
add_compile_options(-fpie)
|
||||
add_link_options(-pie -z noexecstack)
|
||||
endif()
|
||||
|
||||
add_compile_options(-Wno-multichar -Wno-invalid-offsetof -Wno-switch -Wno-ignored-attributes -Wno-deprecated-enum-enum-conversion)
|
||||
endif()
|
||||
@@ -129,6 +122,12 @@ target_link_libraries(CemuBin PRIVATE
|
||||
SDL2::SDL2
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# due to nasm output some linkers will make stack executable.
|
||||
# cemu does not require this so we explicity disable it.
|
||||
target_link_options(CemuBin PRIVATE -z noexecstack)
|
||||
endif()
|
||||
|
||||
if (ENABLE_WXWIDGETS)
|
||||
target_link_libraries(CemuBin PRIVATE wx::base wx::core)
|
||||
endif()
|
||||
|
||||
@@ -455,11 +455,6 @@ void export_curl_multi_fdset(PPCInterpreter_t* hCPU)
|
||||
ppcDefineParamMEMPTR(exceptionFd, wu_fd_set, 3);
|
||||
ppcDefineParamU32BEPtr(maxFd, 4);
|
||||
|
||||
#if BOOST_OS_LINUX || BOOST_OS_MACOS
|
||||
cemuLog_log(LogType::Force, "curl_multi_fdset(...) - todo");
|
||||
|
||||
osLib_returnFromFunction(hCPU, 0);
|
||||
#else
|
||||
fd_set h_readFd;
|
||||
fd_set h_writeFd;
|
||||
fd_set h_exceptionFd;
|
||||
@@ -475,17 +470,36 @@ void export_curl_multi_fdset(PPCInterpreter_t* hCPU)
|
||||
nsysnet::wuResetFD(exceptionFd.GetPtr());
|
||||
|
||||
sint32 c_maxFD = -1;
|
||||
// fd read set
|
||||
for (uint32 i = 0; i < h_readFd.fd_count; i++)
|
||||
|
||||
auto hostFdSet = [&](SOCKET s, wu_fd_set* fds)
|
||||
{
|
||||
sint32 wuSocket = nsysnet_getVirtualSocketHandleFromHostHandle(h_readFd.fd_array[i]);
|
||||
sint32 wuSocket = nsysnet_getVirtualSocketHandleFromHostHandle(s);
|
||||
if (wuSocket < 0)
|
||||
wuSocket = nsysnet_createVirtualSocketFromExistingSocket(h_readFd.fd_array[i]);
|
||||
wuSocket = nsysnet_createVirtualSocketFromExistingSocket(s);
|
||||
if (wuSocket >= 0)
|
||||
{
|
||||
c_maxFD = std::max(wuSocket, c_maxFD);
|
||||
nsysnet::wuSetFD(readFd.GetPtr(), wuSocket);
|
||||
nsysnet::wuSetFD(fds, wuSocket);
|
||||
}
|
||||
};
|
||||
|
||||
#if BOOST_OS_UNIX
|
||||
for (int s = 0; s < h_maxFd + 1; s++)
|
||||
{
|
||||
if(FD_ISSET(s, &h_readFd))
|
||||
hostFdSet(s, readFd.GetPtr());
|
||||
|
||||
if(FD_ISSET(s, &h_writeFd))
|
||||
hostFdSet(s, writeFd.GetPtr());
|
||||
|
||||
if(FD_ISSET(s, &h_exceptionFd))
|
||||
hostFdSet(s, exceptionFd.GetPtr());
|
||||
}
|
||||
#else
|
||||
// fd read set
|
||||
for (uint32 i = 0; i < h_readFd.fd_count; i++)
|
||||
{
|
||||
hostFdSet(h_readFd.fd_array[i], readFd.GetPtr());
|
||||
}
|
||||
// fd write set
|
||||
for (uint32 i = 0; i < h_writeFd.fd_count; i++)
|
||||
@@ -497,11 +511,10 @@ void export_curl_multi_fdset(PPCInterpreter_t* hCPU)
|
||||
{
|
||||
cemu_assert_debug(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
*maxFd = c_maxFD;
|
||||
osLib_returnFromFunction(hCPU, result);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void export_curl_multi_setopt(PPCInterpreter_t* hCPU)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user