Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(3ds): WIP adding 3DS compatibility #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ limelight-common/Release/
*.sdf
*.suo
limelight-common/limelight-common.vcxproj.user
.vscode/
CMakeCache.txt
CMakeFiles/
cmake_install.cmake
*.a
Makefile
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "enet"]
path = enet
url = https://github.com/cgutman/enet.git
url = https://github.com/Adi3000/enet.git
2 changes: 1 addition & 1 deletion enet
Submodule enet updated 2 files
+4 −0 .gitignore
+2 −0 unix.c
5 changes: 3 additions & 2 deletions src/PlatformSockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/RtspConnection.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 4 additions & 0 deletions src/SdpGenerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down