SDL2: SDL_Init(SDL_INIT_EVERYTHING) failing

With the latest SDL2 SDL_Init(SDL_INIT_EVERYTHING) is failing with the
message “Haptic error Initializing DirectInput device”. This surprised me
for two reasons. First as far as I know there is no haptic device hooked
up to this box. Second I thought the Haptic system had been disabled for
MinGW builds a few weeks back.

I am building SDL2 with MinGW-w64 (64 and 32 bit) and MSYS.

It’s disabled by default if you don’t use ./configure; make style builds.
Otherwise it’ll happily build if your headers are new enough.

I think this broke as a side effect of the new joystick hotplug support and
we’ll be looking into it soon.On Tue, Nov 27, 2012 at 4:29 PM, Jared Anderson wrote:

With the latest SDL2 SDL_Init(SDL_INIT_EVERYTHING) is failing with the
message “Haptic error Initializing DirectInput device”. This surprised me
for two reasons. First as far as I know there is no haptic device hooked
up to this box. Second I thought the Haptic system had been disabled for
MinGW builds a few weeks back.

I am building SDL2 with MinGW-w64 (64 and 32 bit) and MSYS.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

With the latest SDL2 SDL_Init(SDL_INIT_EVERYTHING) is failing with the
message “Haptic error Initializing DirectInput device”. This surprised

Can you try the latest in Mercurial? I just pushed a change that should
fix this problem.

–ryan.

With the latest SDL2 SDL_Init(SDL_INIT_EVERYTHING) is failing with the

message “Haptic error Initializing DirectInput device”. This surprised

Can you try the latest in Mercurial? I just pushed a change that should
fix this problem.

–ryan.

Seems to be fixed, thank you.On Thu, Nov 29, 2012 at 11:33 AM, Ryan C. Gordon wrote:

Hi guys!
Just wanted to clarify things to myself.
I’ve built sdl from hg revision 7743 with cmake with mingw.
Haptic support was checked. I didn’t pay attention to cmake logs, but I’m sure there were no errors.
When tried to SDL_Init(SDL_INIT_EVERYTHING) get error from sdl "SDL not built with haptic (force feedback) support"
I can rebuild sdl without haptic wanted in cmake and this will afford using SDL_Init with SDL_INIT_EVERYTHING, but…

By now there is no way I can build sdl with mingw with haptic working, is there?

Thanks!

Use mingw-w64 instead

– Aggelos KolaitisOn 17 ??? 2013, at 4:15 ?.?., “JeriX” wrote:

Hi guys!
Just wanted to clarify things to myself.
I’ve built sdl from hg revision 7743 with cmake with mingw.
Haptic support was checked. I didn’t pay attention to cmake logs, but I’m sure there were no errors.
When tried to SDL_Init(SDL_INIT_EVERYTHING) get error from sdl "SDL not built with haptic (force feedback) support"
I can rebuild sdl without haptic wanted in cmake and this will afford using SDL_Init with SDL_INIT_EVERYTHING, but…

By now there is no way I can build sdl with mingw with haptic working, is there?

Thanks!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

neoaggelos wrote:

Use mingw-w64 instead

Actually I don’t know what version of mingw I’m using :?
I’m using last Qt Creator as IDE and installed all necessary stuff through their online installer, including mingw
Here output of “mingw32-make.exe --version” command:

Code:
GNU Make 3.82.90
Built for i686-w64-mingw32
Copyright © 1988-2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

That does indeed look like mingw-w64 (more specifically, the version
that builds 32-bit executables - remember mingw-w64 can make both
32-bit and 64-bit programs).

2013/10/17, JeriX :>

neoaggelos wrote:

Use mingw-w64 instead

Actually I don’t know what version of mingw I’m using :?
I’m using last Qt Creator as IDE and installed all necessary stuff through
their online installer, including mingw
Here output of “mingw32-make.exe --version” command:

Code:
GNU Make 3.82.90
Built for i686-w64-mingw32
Copyright © 1988-2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Sik wrote:

That does indeed look like mingw-w64 (more specifically, the version
that builds 32-bit executables - remember mingw-w64 can make both
32-bit and 64-bit programs).

So, what’s the issue with building sdl with haptic support with mingw anyway? What’s the main problem?

Vanilla MinGW doesn’t come with either DirectInput nor XInput, only
the legacy multimedia joystick API which doesn’t support haptic… or
any modern controllers properly, for that matter. MinGW-w64 includes
DirectInput so haptic should work again.

Note that the legacy API just got ditched from the SDL code, so in the
future vanilla MinGW outright won’t support joysticks, period.

2013/10/17, JeriX :>

Sik wrote:

That does indeed look like mingw-w64 (more specifically, the version
that builds 32-bit executables - remember mingw-w64 can make both
32-bit and 64-bit programs).

So, what’s the issue with building sdl with haptic support with mingw
anyway? What’s the main problem?

Sik wrote:

Vanilla MinGW doesn’t come with either DirectInput nor XInput, only
the legacy multimedia joystick API which doesn’t support haptic… or
any modern controllers properly, for that matter. MinGW-w64 includes
DirectInput so haptic should work again.

Note that the legacy API just got ditched from the SDL code, so in the
future vanilla MinGW outright won’t support joysticks, period.

I’ve just checked my mingw installation - it actually has these files:
inlcude/dinput.h
inlcude/xinput.h
lib/libdinput.a
lib/libdinput8.a
lib/libxinput.a
lib/libxinput1_1.a
lib/libxinput1_2.a
lib/libxinput1_3.a

Looks like I’ll should dig deep into CMakeLists.txt and *.h files in sdl sources… Again [Crying or Very sad]

Message-ID: <1382025115.m2f.39899 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”

Sik wrote:

That does indeed look like mingw-w64 (more specifically, the version
that builds 32-bit executables - remember mingw-w64 can make both
32-bit and 64-bit programs).

So, what’s the issue with building sdl with haptic support with mingw
anyway? What’s the main problem?

For the full explanation (which admittedly probably comes down to
"noone has submitted a patch that we consider acceptable") you’ll need
to ask the MinGW mailinglist, but the basics are that MinGW doesn’t
ship the needed header files, and possibly stub libraries. This in
turn likely comes from two places:

  1. No doubt, the MinGW team won’t accept anything that they can’t
    place under the licenses that they use for their headers, which means
    they can’t accept anything from MSVC++ (which I believe actually has a
    non-distribute clause anyways);
  2. They’re actually two projects in one, MinGW and MSys. And at the
    moment, they’re more focused on the MSys2 launch than anything else.

At any rate, none of this necessarily matters, because all of the
various MinGW projects (whether associated with MinGW/MSys proper, or
MinGW-w64, or something else) all use and therefor are compatible with
MSys, so to a limited extent they can be swapped in and out for each
other.

Just remember not to ask for help with compilers or other tools that
MinGW/MSys didn’t distribute on their mailinglist, lest you be yelled
at :slight_smile: .> Date: Thu, 17 Oct 2013 15:51:55 +0000

From: “JeriX”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL2: SDL_Init(SDL_INIT_EVERYTHING) failing

Jared Maddox wrote:>

Date: Thu, 17 Oct 2013 15:51:55 +0000
From: “JeriX” <@JeriX>
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL2: SDL_Init(SDL_INIT_EVERYTHING) failing
Message-ID: <1382025115.m2f.39899 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”

Sik wrote:

That does indeed look like mingw-w64 (more specifically, the version
that builds 32-bit executables - remember mingw-w64 can make both
32-bit and 64-bit programs).

So, what’s the issue with building sdl with haptic support with mingw
anyway? What’s the main problem?

For the full explanation (which admittedly probably comes down to
"noone has submitted a patch that we consider acceptable") you’ll need
to ask the MinGW mailinglist, but the basics are that MinGW doesn’t
ship the needed header files, and possibly stub libraries. This in
turn likely comes from two places:

  1. No doubt, the MinGW team won’t accept anything that they can’t
    place under the licenses that they use for their headers, which means
    they can’t accept anything from MSVC++ (which I believe actually has a
    non-distribute clause anyways);
  2. They’re actually two projects in one, MinGW and MSys. And at the
    moment, they’re more focused on the MSys2 launch than anything else.

At any rate, none of this necessarily matters, because all of the
various MinGW projects (whether associated with MinGW/MSys proper, or
MinGW-w64, or something else) all use and therefor are compatible with
MSys, so to a limited extent they can be swapped in and out for each
other.

Just remember not to ask for help with compilers or other tools that
MinGW/MSys didn’t distribute on their mailinglist, lest you be yelled
at :slight_smile: .


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Oook, so… sorry for being annoying, but I ask againg…
It is possible to build sdl with mingw-w64 and with haptic support, isn’t it?

2013/10/18, JeriX :

Oook, so… sorry for being annoying, but I ask againg…
It is possible to build sdl with mingw-w64 and with haptic support, isn’t
it?

It should.