Rebuilding libSDL

Rebuilding libSDL for NWMovies, and the full screen toggling patches.

Note: You will need to have a full set of developemnt packages installed. I usually do a full install of everything so I do not have a detailed list of what is required, and the list would vary based upon distro. (X11 Development, OpenGL/Mesa Development, ALSA Developement spring to mind.)

You could also attempt to install the system supplied libSDL-devel package, which theoretically should have a pre-requisite of all the other required developement libraries.


  1. Download the latest SDL source from www.libsdl.org (1.2.9 at the time of writing.)
  2. Unpack the source code
    • gzip -d -c SDL-1.2.9.tar.gz | tar xvof -
  3. Enter the SDL directory, and apply the appropriate full screen patch for the downloaded version of libSDL, found on my site (http://home.woh.rr.com/nwmovies)
    • cd SDL-1.2.9
    • patch -p1 < fullscreen-toggle-129.patch
  4. Configure libSDL
    • ./configure --enable-alsa
      • Not certain which other options you'll need, but enabling ALSA is probable.
      • --prefix is irrelevant, as you won't be installing this libSDL in any system wide directory.
      • Watch for errors during the configure output.
  5. Compile libSDL
    • make
  6. Back up the Bioware provided libSDL
    • cp ~/nwn/lib/libSDL-1.2.so.0 ~nwn/lib/libSDL-1.2.so.0.bioware
  7. Install your shiny new libSDL.
    • cp src/.libs/libSDL-1.2.so.0 ~nwn/lib/libSDL-1.2.so.0

You will have to be certain your NWN startup script has the default setting of ./lib:./miles for the LD_LIBRARY_PATH.


Once this is complete, your libSDL will be compatabile with NWMovies, and the following key sequences will work.

  • Right-Alt & Enter - Toggle between FullScreen/Windowed.
  • Left-Alt & Enter - Iconify Window.
  • Left-Control & G - Disable the mouse grab that keeps the cursor inside the NWN window.
  • Right-Control & G - Re-enable the mouse grab to keep the cursor inside the NWN window.