EverestAPI / EverestAPI/Everest
SDL3 support
- Dominant language
- C#
- Stars
- 516
- Forks
- 106
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 5
Description
This follows directly from #887. Celeste uses FNA as it's engine, which, under the hood, uses SDL2 currently. This is a roadmap to get Everest to upgrade the FNA version and allow for the use of SDL3. This includes adding support for SDL GPU, but the D3D11 and OpenGL FNA3D backends should still be usable.
## Current blockers
- D3D11 patches will have to be remade for SDL GPU's D3D12 backend.
- More to come as testing progresses.
## Implementation
Rather than doing it in one go, and having testing happen in out of tree builds of Everest (or even a new branch), I propose firstly implementing a switch in MiniInstaller to choose which SDL version to use.
[FNA ships support for SDL2 and SDL3](https://github.com/FNA-XNA/FNA/tree/25.08/src/FNAPlatform) in its manged binary. Thus the following is possible: ship SDL2 and SDL3, as well as two separate FNA3D, FAudio, Theorafile and fmod_SDL versions, then MiniInstaller will setup the appropriate versions according to a CLI argument. (Olympus support for the argument is also an idea.)
This change could safely hit stable as an opt-in for users who want to test and use it.
Once the changes are settled down, and player acceptance is great, this could become an opt-out, and finally SDL2 would be removed entirely.
## Extra notes
All of the current FNA patches seem to currently work with the latest FNA version.
[The Xna keyboard patch](https://github.com/EverestAPI/Everest/blob/6009dbcb086cb9d1e46d2555878310e89e4b4a2a/Celeste.Mod.mm/Patches/FNA/Keyboard.cs) should be unaffected by this. And [the 61fps bug](https://github.com/EverestAPI/Everest/blob/6009dbcb086cb9d1e46d2555878310e89e4b4a2a/Celeste.Mod.mm/Mod/Core/CoreModule.cs#L78) should as well.
The Everest Splash will not be affected by the aforementioned toggle and will switch from permanently using SDL2 to SDL3 at some point.
This is subject to change, as the Celeste developers have plans to also implement this switch.
~~I am planning to implement this myself.~~ I no longer am, this is open for anyone to do.
Contributor guide
Assessment
This issue has not been assessed yet.