Skip to content

Commit d0375ae

Browse files
committed
feat(3ds): WIP adding 3DS compatibility
1 parent 5de4a5b commit d0375ae

6 files changed

+16
-5
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ limelight-common/Release/
66
*.sdf
77
*.suo
88
limelight-common/limelight-common.vcxproj.user
9+
.vscode/
10+
CMakeCache.txt
11+
CMakeFiles/
12+
cmake_install.cmake
13+
*.a
14+
Makefile

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "enet"]
22
path = enet
3-
url = https://github.com/cgutman/enet.git
3+
url = https://github.com/Adi3000/enet.git

enet

src/PlatformSockets.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ int setNonFatalRecvTimeoutMs(SOCKET s, int timeoutMs) {
7272
// losing some data in a very rare case is fine, especially because we get to
7373
// halve the number of syscalls per packet by avoiding select().
7474
return setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeoutMs, sizeof(timeoutMs));
75-
#elif defined(__WIIU__)
75+
#elif defined(__WIIU__) || defined(__3DS__)
7676
// timeouts aren't supported on Wii U
7777
return -1;
7878
#else
@@ -364,8 +364,9 @@ SOCKET connectTcpSocket(struct sockaddr_storage* dstaddr, SOCKADDR_LEN addrlen,
364364
LC_SOCKADDR addr;
365365
struct pollfd pfd;
366366
int err;
367+
#if defined(LC_WINDOWS) || defined(TCP_NOOPT) || defined(TCP_MAXSEG)
367368
int val;
368-
369+
#endif
369370
// Create a non-blocking TCP socket
370371
s = createSocket(dstaddr->ss_family, SOCK_STREAM, IPPROTO_TCP, true);
371372
if (s == INVALID_SOCKET) {

src/RtspConnection.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ static bool parseUrlAddrFromRtspUrlString(const char* rtspUrlString, char* desti
724724

725725
// SDP attributes are in the form:
726726
// a=x-nv-bwe.bwuSafeZoneLowLimit:70\r\n
727-
bool parseSdpAttributeToUInt(const char* payload, const char* name, unsigned int* val) {
727+
bool parseSdpAttributeToUInt(const char* payload, const char* name, uint32_t* val) {
728728
// Find the entry for the specified attribute name
729729
char* attribute = strstr(payload, name);
730730
if (!attribute) {

src/SdpGenerator.c

+4
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,11 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) {
269269
// Send client feature flags to Sunshine hosts
270270
if (IS_SUNSHINE()) {
271271
uint32_t moonlightFeatureFlags = ML_FF_FEC_STATUS;
272+
#ifdef __3DS__
273+
snprintf(payloadStr, sizeof(payloadStr), "%lu", moonlightFeatureFlags);
274+
#else
272275
snprintf(payloadStr, sizeof(payloadStr), "%u", moonlightFeatureFlags);
276+
#endif
273277
err |= addAttributeString(&optionHead, "x-ml-general.featureFlags", payloadStr);
274278
}
275279

0 commit comments

Comments
 (0)