[SDL] Windows Platform issues

Sik the hedgehog sik.the.hedgehog at gmail.com
Wed Mar 6 11:38:19 PST 2013


Any reason to want to link SDL statically? I can see the logic if the
program is a single file, but I doubt The Cave is the case. Then
again, there isn't any reason why it shouldn't work, so this should be
checked. Sadly, I only used MinGW, not Visual Studio, so I don't think
I can help much here.

What webcam reported itself as a controller? o_O;

And if I recall correctly, Direct3D is the *default* for SDL on
Windows. You can override what renderer gets used with
SDL_SetHintWithPriority (and setting the hint to override). This is
for SDL renderers though, for which you wouldn't be using
system-specific APIs at all in the first place.

SDL has code to initialize OpenGL without a renderer, I don't think it
has for DIrect3D, but you could still initialize Direct3D directly
right after creating the window if you really want that. You can use
SDL_GetWindowWMInfo to get the hwnd of the SDL window.

2013/3/6, Edward Rudd <urkle at outoforder.cc>:
> 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
>
>
>
>
>
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>



More information about the SDL mailing list