diff --git a/.gitignore b/.gitignore index 8be66fa4..39671e0d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,9 @@ limelight-common/Release/ *.sdf *.suo limelight-common/limelight-common.vcxproj.user +.vscode/ +CMakeCache.txt +CMakeFiles/ +cmake_install.cmake +*.a +Makefile \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 1cea1f21..21fc2c0d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "enet"] path = enet - url = https://github.com/cgutman/enet.git + url = https://github.com/Adi3000/enet.git diff --git a/enet b/enet index bbfe93c2..549b4ef0 160000 --- a/enet +++ b/enet @@ -1 +1 @@ -Subproject commit bbfe93c248ce198246328d52bda5b4e6dd4cc95e +Subproject commit 549b4ef0aadeaf40785952c5720e2166ce921fe3 diff --git a/src/PlatformSockets.c b/src/PlatformSockets.c index af71fb0f..4538da4f 100644 --- a/src/PlatformSockets.c +++ b/src/PlatformSockets.c @@ -72,7 +72,7 @@ int setNonFatalRecvTimeoutMs(SOCKET s, int timeoutMs) { // losing some data in a very rare case is fine, especially because we get to // halve the number of syscalls per packet by avoiding select(). return setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeoutMs, sizeof(timeoutMs)); -#elif defined(__WIIU__) +#elif defined(__WIIU__) || defined(__3DS__) // timeouts aren't supported on Wii U return -1; #else @@ -364,8 +364,9 @@ SOCKET connectTcpSocket(struct sockaddr_storage* dstaddr, SOCKADDR_LEN addrlen, LC_SOCKADDR addr; struct pollfd pfd; int err; +#if defined(LC_WINDOWS) || defined(TCP_NOOPT) || defined(TCP_MAXSEG) int val; - +#endif // Create a non-blocking TCP socket s = createSocket(dstaddr->ss_family, SOCK_STREAM, IPPROTO_TCP, true); if (s == INVALID_SOCKET) { diff --git a/src/RtspConnection.c b/src/RtspConnection.c index c2b50539..374d1d46 100644 --- a/src/RtspConnection.c +++ b/src/RtspConnection.c @@ -724,7 +724,7 @@ static bool parseUrlAddrFromRtspUrlString(const char* rtspUrlString, char* desti // SDP attributes are in the form: // a=x-nv-bwe.bwuSafeZoneLowLimit:70\r\n -bool parseSdpAttributeToUInt(const char* payload, const char* name, unsigned int* val) { +bool parseSdpAttributeToUInt(const char* payload, const char* name, uint32_t* val) { // Find the entry for the specified attribute name char* attribute = strstr(payload, name); if (!attribute) { diff --git a/src/SdpGenerator.c b/src/SdpGenerator.c index c92f3205..ab2cb778 100644 --- a/src/SdpGenerator.c +++ b/src/SdpGenerator.c @@ -269,7 +269,11 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) { // Send client feature flags to Sunshine hosts if (IS_SUNSHINE()) { uint32_t moonlightFeatureFlags = ML_FF_FEC_STATUS; +#ifdef __3DS__ + snprintf(payloadStr, sizeof(payloadStr), "%lu", moonlightFeatureFlags); +#else snprintf(payloadStr, sizeof(payloadStr), "%u", moonlightFeatureFlags); +#endif err |= addAttributeString(&optionHead, "x-ml-general.featureFlags", payloadStr); }