1

I want to use sdl force feedback for my joystick and use it on dolphin-emu.

I need the 1.3 sdl libraries and only 1.2 are available. I tried to build them, but with no luck.

Can anyone help?

2
  • 1
    gives us more information about where you have got the source.May be some one could help you by building them for you.
    – Raja G
    Jan 2, 2013 at 17:16
  • @LordofTime I think he wants to build a version of sdl patched with force feedback support; I don't think he wants to build dolphin-emu.
    – user76204
    Jan 2, 2013 at 17:52

1 Answer 1

2

The best thing to do is to patch the most recent stable sdl 1.2 source code, and get some kind of force feedback effects with sdl1.2. This is an interim measure until the next stable version of sdl comes out, but might be acceptable for your purposes.

However, it is best to install your compiled version in /opt and not in path locations such as /usr or /usr/local. Thereby you can still keep the original libsdl1.2debian and only call your compiled version by using LD_LIBRARY_PATH (see later explanation).

First, get the dependencies with

sudo apt-get build-dep libsdl1.2
sudo apt-get install build-essential checkinstall

For build-dep to work, go to software sources and enable source code by checking the box. Then run sudo apt-get update and any build-dep commands should work.

The full list of dependencies is listed here with further information on compilation.

Now, download the sdl source code and extract it, then download the patch from icculus.org, extract the patch, and move it to the sdl source code folder, and from that folder run:

patch -p1 < sdl_1.2-haptic.diff

Next, run

./configure --prefix=/opt/sdl-1.2 && make

It is not necessary to add --enable-haptic (haptic is the term used for force feedback), as the patch should have enabled that. More on haptic is available here and here.

To install it in /opt (or the place specified with configure), run sudo checkinstall from the same folder.

To use this version of sdl, you need to run your game in a wrapper like this:

#!/bin/bash

export LD_LIBRARY_PATH=/opt/sdl-1.2/lib:$LD_LIBRARY_PATH
cd /game/folder
game
exit 0

To check the correct sdl version is being loaded, run in terminal

export LD_LIBRARY_PATH=/opt/sdl-1.2/lib:$LD_LIBRARY_PATH

and then run ldd on a game you know uses sdl:

ldd /usr/local/bin/rott

which shows you it is using your compiled sdl:

libSDL-1.2.so.0 => /opt/sdl-1.2/lib/libSDL-1.2.so.0 (0xb7695000)

The force feedback effects will vary greatly, and sometimes might not be present at all, but this is about the only way to get some effects at the moment. It is reported to work with the open source port of Freespace2, FreespaceOpen, as this post shows relating to Linux-based systems (not Mac OS X as it suggests).

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .