[SDL] Windows Platform issues

Edward Rudd urkle at outoforder.cc
Wed Mar 6 07:47:42 PST 2013


All, (or windows platform developers)

I'm working with Double fine in incorporating SDL2 as their primary platform abstraction for platforms that support it.  It is currently being used for the OS X and Linux ports of "The Cave" that I finished last month.  I'm going to outline a few of the hurdles they ran into and are running into and would l like feedback on them and how BEST to solve them.

Statically linked library

They would prefer a statically linked library on windows.  Is there any reason there isn't this option in the VC projs?
Part of them switching to a static lib, caused the intrinsic code on SDL_stdlib.c to fail.  (comments from their commit)

> I also had to remove some C runtime intrinsics that SDL defined, because some of them don't use the cdecl calling convention, and others cause linker errors. These problems only came up once I started statically linking with SDL, so it might merit more investigation to find out why they were problematic.


Xinput issues..

They had to implement a workaround to disable Xinput (I corrected it, so it uses a HINT instead of a platform specific function.. you'll see that in HG tip).  Here are their commit comments

> Workaround for XInput problems by adding a command line option to disable it in SDL. Some players were reporting that Xbox 360 pads didn't function with XInput, but functioned fine in applications that read their data using DirectInput.


The Next was an odd detection issues of gamepad devices..  As a webcam (with 256 buttons) somehow got detected as a controller.

> Fix buffer overrun/mem stomp in SDL gamepad code if using any gamepad that reports > 32 buttons. For some reason, we found a webcam that reports 256 buttons :P
> 
> This webcam probably also exposes an issue in gamepad detection in SDL, too.

Last (and most important)..

They are attempting to use SDL to create the window but instead of using OpenGL as the renderer, they wish to use Direct3D.. IS that actually supported??  If so, how? If not, what functionality needs to be added to support this?


Edward Rudd
OutOfOrder.cc
Skype: outoforder_cc
317-674-3296









More information about the SDL mailing list