Skip to content

Projects

SDL and Windowed Fullscreen

The fullscreen display mode in SDL traps the mouse on one X display, which can be undesirable if you are running dual head with separate X screens and using SDL for something other than games. One way around this is to run SDL without FULLSCREEN, but maximize the window and remove the border.

The easiest way to accomplish this in a cross platform manner is using SDL_NOFRAME and SDL_GetVideoInfo to determine the current screen resolution. This was added in 1.2.13, which is the latest version of SDL. Here’s a simple example: testnoframe.c. Use q or Esc to quit, g/u to grab/ungrab the mouse.

Another approach that will work with most X11 windows managers is using the EWMH/NetWM standard. wmctrl can do this to any existing window from the command-line. It can also be done programatically in the SDL app itself. Here’s an example: testewmhfs.c.

Note: these test programs will probably not interact properly with multiple monitors, unless you’re using separate screens for each head (with X11).

Download both programs, with Makefile: sdl-windowed-fs-demo.tbz2

Credits: wmctrl, this forum post

See also: SDL_GetWMInfo, SDL_SysWMInfo, SDL_GetVideoInfo

robotfindskittenDS mods

Here is a small update to GPF’s DS port of robotfindskitten. Here are the changes I’ve made so far:

  • Fixed missed button press bug. Now robot can move much more easily.
  • Right buttons can also be used to control robot.
  • If you hold down a direction button, robot will continue to move in that direction.
  • The code now compiles under libnds-20070503.

Download it here: robotfindskittendDS-20071017.zip

Source code included. The code is under the GPL license, so make sure to include the source if you distribute your own modifications.

Next I plan on adding NKI file support.

DS port by Troy Davis(GPF) http://gpf.dcemu.co.uk based on
PSP port by Trevor Wilson
uses “pg” PSP graphics libraries from “hellopsp” by nem
Original version by Leonard Richardson
Official robotfindskitten site: http://robotfindskitten.org

Leave a Reply