target media-libs/libsdl-1.2.11-r2 joystick support

I didn't find any complete light-weight SDL program for testing my joystick. Because of this i've written a small demo program which will demonstrate how to do that. It's very easy to adapt this code into your main game loop. Of course read the documentation [1] of libsdl for a complete reference.

download

  • html source
http://lastlog.de/misc/sdl_joystick_demo.html
  • txt source
http://lastlog.de/misc/example2.cpp

compile with

g++ example2.cpp -o example2 `sdl-config --libs` `sdl-config --cflags`

documentation

Powered by MediaWiki