Skip to content

Add NXDK (Xbox) support#139

Open
ReenigneArcher wants to merge 1 commit into
moonlight-stream:masterfrom
ReenigneArcher:nxdk-compat
Open

Add NXDK (Xbox) support#139
ReenigneArcher wants to merge 1 commit into
moonlight-stream:masterfrom
ReenigneArcher:nxdk-compat

Conversation

@ReenigneArcher
Copy link
Copy Markdown
Contributor

This PR adds NXDK (Original Xbox) support. This is required for https://github.com/LizardByte/Moonlight-XboxOG

Requires cgutman/enet#24

Comment thread src/Platform.h Outdated
#endif

#ifdef _MSC_VER
#if defined(_MSC_VER) && !defined(NXDK)
Copy link
Copy Markdown
Member

@cgutman cgutman May 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the NXDK version of MSVC too old for these intrinsics or something?

Copy link
Copy Markdown
Contributor Author

@ReenigneArcher ReenigneArcher May 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that NXDK is using Clang targeting Win32. This defines _MSC_VER, but the intrinsics are not defined. Although the underlying functions do seem to be available.

https://github.com/XboxDev/nxdk/blob/fb5a9a7a58a431e8d70a9e7da87898059df376c0/lib/xboxrt/libc_extensions/stdlib_ext_.c#L73-L86

Comment thread src/Platform.c
Comment thread src/Platform.h
@ReenigneArcher ReenigneArcher force-pushed the nxdk-compat branch 3 times, most recently from c944d5c to f7ad9ef Compare May 24, 2026 03:45
@ReenigneArcher ReenigneArcher marked this pull request as ready for review May 24, 2026 03:45
@ReenigneArcher
Copy link
Copy Markdown
Contributor Author

I should add. I also had to make changes to NXDK to get everything working. I have not yet submitted these upstream, but will be doing so after changes here are approved.

XboxDev/nxdk@master...ReenigneArcher:nxdk:moonlight (This also includes changes required for compiling OpenSSL with NXDK)

@ReenigneArcher
Copy link
Copy Markdown
Contributor Author

I should add. I also had to make changes to NXDK to get everything working. I have not yet submitted these upstream, but will be doing so after changes here are approved.

XboxDev/nxdk@master...ReenigneArcher:nxdk:moonlight (This also includes changes required for compiling OpenSSL with NXDK)

I've submitted required changes to nxdk via the following PRs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants