Re: Porting SDL2 to a new platform, detailed docs?

"Ryan C. Gordon" <[email protected]> Mon, 6 Mar 2017 17:05:51 -0500
Newsgroups gmane.comp.lib.sdl
Organization icculus.org
Message-ID <[email protected]>
> This ended up being what I did, when porting SDL2 to WinRT/UWP: I spent
> -lots- of time reading through SDL source code.  The hardest parts
> usually ended up being platform-specific bits, although, SDL2's window
> vs. full-screen management code was difficult to work with, at times.

Having just done this for a new platform, it's basically "get it to 
compile with the platform's build system, then go through each subdir in 
"src" to see if there needs to be a platform-specific piece added."

This gets more complicated in that a few things (SDL_atomic.c) expect 
you to add an #ifdef, and others expect you to add a new implementation 
and plug it into a list of available implementations to try at runtime 
(audio, video), and others expect you to add a new implementation that's 
the _only_ thing that works on that platform (thread, etc).

And then joystick expects you to have one implementation for the 
platform, but both Linux and Windows then built their own 
multi-implementation thing on top of that.

Also, almost universally, starting from the "dummy" driver is the wrong 
move.

We should fix some of these details.

--ryan.