Add SDL_net support#771
Draft
PaulMDemers wants to merge 1 commit into
Draft
Conversation
Member
|
I don't think this should be merged. See reasons in #601 I had a port of enet at some point, and there was work towards a dummy winsock (based on lwip) which was enough for enet (I believe). @thrimbor also had a winsock impl. It should probably be extended to support the upstream SDL_net without changes, too. Such a winsock impl would be a much better fit for core nxdk. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds SDL_net support to nxdk as an SDL2 companion library, backed by nxdk’s existing lwIP network stack.
This adds SDL_net as a submodule, builds it into
libSDL2_net.libwhenNXDK_SDL = y, exposes a pkg-config file, and includes a small smoke-test sample that resolves localhost and opens a UDP socket.Changes
lib/sdl/SDL_netsubmodulelibSDL2_net.libfrom SDL_net sourceslib/pkgconfig/SDL2_net.pcsamples/sdl_netVerification
Built successfully on Windows/MSYS2 with:
This produced:
Notes
The SDL_net submodule points at PaulMDemers/SDL_net, branch nxdk-sdl-net, which is based on SDL_net 2.0.1 with minimal nxdk compatibility changes for lwIP sockets.