1. 04 Feb, 2008 1 commit
    • Ryan C. Gordon's avatar
      Date: Sat, 2 Feb 2008 22:08:05 +0100 · dec971d6
      Ryan C. Gordon authored
      From: Marcus von Appen
      To: sdl@lists.libsdl.org
      Subject: [SDL] [Patch] SDL-1.2 SDL_revcpy() asm patch for the cld flag
      
      Hi,
      
      as reported through the FreeBSD bug tracking system in SDL 1.2.13 (and
      in the 1.2 branch, if I see that correctly) the SDL_revcpy() macro sets
      the direction flag (std), but does not clear it afterwards (cld), which
      is wrong according to the GCC and SYS V specs.  This can cause some
      weird side effects, which in turn can lead to memory corruption.
      
      You can read the full report with a detailed description and test
      program at http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/120052
      
      Attached is the submitted patch, which fixes the issue.
      
      Regards
      Marcus
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402713
      dec971d6
  2. 25 Jan, 2008 1 commit
  3. 24 Jan, 2008 1 commit
    • Sam Lantinga's avatar
      Damien Carbery fixed bug #542 · a09301c4
      Sam Lantinga authored
      In SDL 1.2.13 sdl.m4 the AM_PATH_SDL function looks for sdl-config.
      It sets the PATH:
       PATH="$prefix/bin:$prefix/usr/bin:$PATH"
      but does not save the current PATH or restore the current PATH at the end.
      
      This breaks the build on Solaris because we have GNU tools in another dir
      (listed at the top of PATH) but non-GNU tools with the same names in
      $prefix/bin. Later configure tests finds the non-GNU tools and quits in error
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402710
      a09301c4
  4. 03 Jan, 2008 2 commits
    • Sam Lantinga's avatar
      Updates for building on Windows CE using mingw32ce cross compiler: · 76b4e077
      Sam Lantinga authored
      http://sourceforge.net/mailarchive/forum.php?thread_name 0703291652.38437.jwalt%40garni.ch&forum_name=cegcc-devel
      
      Hi!
      
      I just managed to compile SDL for Windows CE using the "mingw32ce"
      configuration of http://cegcc.sourceforge.net. Test programs work as expected
      (except for those using signals -- no POSIX on mingw32ce), and I didn't yet
      encounter any problem.
      
      While it was a pain to get everything compiled and running, the changes to
      SDL are actually quite small (see attached SDL-ce.diff).
      
      Unfortunately, the win32 headers shipped with cegcc are not 100% correct, and
      it feels quite messy to work around them in SDL code, so those headers will
      also need to be patched. (Attachment: win32api-ce.diff)
      
      Since I had to apply the libtool patch from the cegcc patch, I have also ad ded
      my copy of aclocal.m4 for SDL. I had to modify the cegcc libtool patch to
      use "lt_cv_deplibs_check_method=pass_all" for mingw32ce, otherwise libtool
      would not recognize the import libraries as valid for dynamic linking.
      
      All these changes should not affect non-WinCE builds, so they could be
      included in mainline SDL.
      
      If you need some docs, you can use this description for a cross-compilation
      README:
      
      1) get cegcc from http://cegcc.sourceforge.net
      2) build and install the "mingw32ce" variant (see cegcc installation docs)
      3) patch w32api-headers (if not yet included in cegcc)
      4) setup environment (customize the first three lines as you like):
      PREFIX=/opt/mingw32ce
      TARGET=arm-wince-mingw32ce
      BUILD=`uname -m`-pc-linux-gnu
      export PATH="$PREFIX/bin:$PREFIX/$TARGET/bin:$PREFIX/local/bin:$PATH"
      export CFLAGS="${CFLAGS:- -O2 -g} -I$PREFIX/local/include"
      export CPPFLAGS="${CPPFLAGS:- -O2 -g} -I$PREFIX/local/include"
      export CXXFLAGS="${CXXFLAGS:- -O2 -g} -I$PREFIX/local/include"
      export LDFLAGS="${LDFLAGS:- -O2 -g} -L$PREFIX/local/lib"
      export HOST_CC="gcc"
      export CC="$PREFIX/bin/$TARGET-gcc"
      export CXX="$PREFIX/bin/$TARGET-g++"
      export LD="$PREFIX/bin/$TARGET-ld"
      export AS="$PREFIX/bin/$TARGET-as"
      export AR="$PREFIX/bin/$TARGET-ar"
      export RANLIB="$PREFIX/bin/$TARGET-ranlib"
      export CONFIG_SHELL="/bin/sh"
      5) build and install
      ./configure --target=$TARGET --host=$TARGET --build=$BUILD
      make
      make install
      6) use (4) and (5) for any SDL-using software you want to cross-compile
      7) copy $PREFIX/local/bin/SDL-1-2-0.dll into your executable directory on the WinCE machine
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402703
      76b4e077
    • Sam Lantinga's avatar
      Updated config scripts · 7c24058d
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402701
      7c24058d
  5. 01 Jan, 2008 1 commit
    • Sam Lantinga's avatar
      Fixed bug #531 · 8d067e01
      Sam Lantinga authored
      The static libs should include all the other libraries the dynamic SDL library
      links with.
      
      sdl.pc should include these so "pkg-config sdl --libs --static" works
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402699
      8d067e01
  6. 31 Dec, 2007 5 commits
  7. 30 Dec, 2007 2 commits
  8. 29 Dec, 2007 19 commits
    • Sam Lantinga's avatar
      Fixed bug #510 · 1930946b
      Sam Lantinga authored
      Oops, we were disabling the screensaver before checking SDL_VIDEO_ALLOW_SCREENSAVER
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402685
      1930946b
    • Sam Lantinga's avatar
      Guillaume Borios fixed bug #508 · 46e4acae
      Sam Lantinga authored
      When unicode translation is ON, pressing the escape key raise an NSBeep()
      because the NSTextView interprets the key as a special command (in that case
      impossible to interpret)... The NSTextView instance should replaced by
      something subclassed so that doCommandBySelector: does nothing.
      
      Example code :
      
      @interface SDLTranslatorResponder : NSTextView
      {
      }
      - (void) doCommandBySelector:(SEL)myselector;
      @end
      
      @implementation SDLTranslatorResponder
      - (void) doCommandBySelector:(SEL) myselector {}
      @end
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402683
      46e4acae
    • Sam Lantinga's avatar
      Fixed return value for iconifying the window in a couple spots. · c4370afc
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402682
      c4370afc
    • Sam Lantinga's avatar
      J. Snell fixed bug #482 · 61b0ff7d
      Sam Lantinga authored
      Fixed arguments used with sdl-config in sdl.m4
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402680
      61b0ff7d
    • Sam Lantinga's avatar
      Fixed bug #478 · b8dac674
      Sam Lantinga authored
      Take the min and max values into account.
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402678
      b8dac674
    • Sam Lantinga's avatar
      Added patch note for fixing bug #503 · 0b021f7b
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402676
      0b021f7b
    • Sam Lantinga's avatar
      Tony White fixed bug #503 · 39f17c1f
      Sam Lantinga authored
      Support escaped quotes on Win32 command lines.
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402675
      39f17c1f
    • Sam Lantinga's avatar
      Fixed bug #502 · faa6f17f
      Sam Lantinga authored
      XRefreshKeyboardMapping() is only available when X_HAVE_UTF8_STRING is defined.
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402674
      faa6f17f
    • Sam Lantinga's avatar
      Support both 10.2 and 10.3 PPC runtime SDK · cfa0e4cb
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402672
      cfa0e4cb
    • Sam Lantinga's avatar
      Updated patch notes for 1.2.13 · eacd9186
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402671
      eacd9186
    • Sam Lantinga's avatar
      Fixed bug #497 · ec155344
      Sam Lantinga authored
      Check all joysticks instead of stopping if one has been removed.
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402669
      ec155344
    • Sam Lantinga's avatar
      Fixed bug #464 · 4b268050
      Sam Lantinga authored
      Added X1/X2 button constants
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402667
      4b268050
    • Sam Lantinga's avatar
      Improved detection of mprotect() · e5dffeb5
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402666
      e5dffeb5
    • Sam Lantinga's avatar
      Updated version to 1.2.13 · 2377118c
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402665
      2377118c
    • Sam Lantinga's avatar
      Updated version to 1.2.13 · 5c940918
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402664
      5c940918
    • Sam Lantinga's avatar
      Made the mprotect() fix for SDL_SoftStretch() more general for hardened linux, etc. · cec08233
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402663
      cec08233
    • Sam Lantinga's avatar
      Fixed bug #528 · 47781d53
      Sam Lantinga authored
      OpenBSD (and possibly others) do not have executable memory by default,
      so use mprotect() to allow execution of dynamic assembly block.
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402662
      47781d53
    • Sam Lantinga's avatar
      Erik Heckers fixed bug #493 · f037300c
      Sam Lantinga authored
      Searching the installed man pages for SDL functions fails, e.g.
        man -k SDL_ |grep Video
      After investigating this I found that "makewhatis", the tool that generates
      the "whatis" database, reads the SDL_* man pages, but doesn't produce
      entries in the "whatis" database for the SDL_* man pages.
      After some more debugging I found the reason is a missing space.
      After editing SDL_Init.3(.gz) and replacing
         SDL_Init\- Initializes SDL
      with
         SDL_Init \- Initializes SDL
      everything works fine.
      After running "makewhatis" I can successfully do a
         man -k SDL_
      and SDL_Init is listed in the output.
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402660
      f037300c
    • Sam Lantinga's avatar
      Hans de Goede fixed bug #495 · 6a789765
      Sam Lantinga authored
      When running boswars: http://www.boswars.org/ on a machine with intel
      integrathed graphics it crashes when it tries to play the initial theora
      splashscreen video:
      X Error of failed request:  BadAlloc (insufficient resources for operation)
        Major opcode of failed request:  140 (XVideo)
        Minor opcode of failed request:  19 ()
        Serial number of failed request:  25
        Current serial number in output stream:  26
      boswars: xcb_xlib.c:41: xcb_xlib_lock: Assertion `!c->xlib.lock' failed.
      Aborted
      
      I recognized this problem from a few years back, when I encountered it while
      working on the Xv blitter for xmame. The problem is that for some reason
      creation the Xvport and XvImage succeeds, and failure (lack of resources / hw
      capability?) is only indicated during the first XvPut[Shm]Image. I've written a
      patch for SDL using the work around for this I developed for xmame (and which
      is still used successfully in xmame after many years of usage).
      
      I'll admit it isn't very pretty, but after investigating several possibilities
      this was the best option, any other fixes would need changes to the SDL api and
      abi.
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402659
      6a789765
  9. 28 Dec, 2007 8 commits
    • Sam Lantinga's avatar
      Date: Thu, 27 Dec 2007 07:38:25 +0000 · 385c1a65
      Sam Lantinga authored
      From: John Bartholomew
      Subject: [SDL] SDL Semaphore implementation broken on Windows?
      Hi,
      
      Over the past couple of days, I've been battling with SDL, SDL_Mixer and SMPEG to try to find an audio hang bug.  I believe I've found the problem, which I think is a race condition inside SDL's semaphore implementation (at least the Windows implementation).  The semaphore code uses Windows' built in semaphore functions, but it also maintains a separate count value.  This count value is updated with bare increment and decrement operations in SemPost and SemWaitTimeout - no locking primitives to protect them.
      
      In tracking down the apparent audio bug, I found that at some point a semaphore's count value was being decremented to -1, which is clearly not a valid value for it to take.
      
      I'm still not certain exactly what sequence of operations is occuring for this to happen, but I believe that overall it's a race condition between a thread calling SemPost (which increments the count) and the thread on the other end calling SemWait (which decrements it).
      
      I will try to make a test case to verify this, but I'm not sure if I'll be able to   (threading errors being difficult to reproduce even in the best    circumstances).
      
      However, assuming this is the cause of my problems, there is a very
      simple fix:
      Windows provides InterlockedIncrement() and InterlockedDecrement()
      functions to perform increments and decrements which are guaranteed to be atomic.  So the fix is in thread/win32/SDL_syssem.c: replace occurrences of --sem->count with InterlockedDecrement(&sem->count); and replace occurrences of ++sem->count with InterlockedIncrement(&sem->count);
      
      This is using SDL v1.2.12, built with VC++ 2008 Express, running on a
      Core 2 duo processor.
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402658
      385c1a65
    • Sam Lantinga's avatar
      Fixed fatbuild.sh script for building on Mac OS X 10.5 · 9d00770a
      Sam Lantinga authored
      The minimum PPC SDK is 10.3.9
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402656
      9d00770a
    • Sam Lantinga's avatar
      Date: Wed, 14 Nov 2007 22:20:27 -0500 · 2d4548f2
      Sam Lantinga authored
      From: Calvin Vette
      Subject: Fix to compile SDL-1.2 SVN on OS X Leopard
      
      I found I needed to add a conditional check for Leopard to compile
      cleanly on 1.2-SVN (20071114):
      
      #include <AudioUnit/AudioUnit.h>
      #ifdef AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
      #include <AudioUnit/AUNTComponent.h>
      #endif
      
      where there is now just:
      #include <AudioUnit/AudioUnit.h>
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402654
      2d4548f2
    • Sam Lantinga's avatar
      Date: Thu, 15 Nov 2007 10:33:01 +0100 · 56cc49a0
      Sam Lantinga authored
      From: "Marco Lopes"
      Subject: Compiling with Intel compiler fails
      
      I~Rve recently bought the Intel Compiler 10 for another project and decided
      to compile SDL with it as well.
      
      I was very surprised when it failed to compile because of the function:
      
      Error      5              error: label "endS16" was referenced but not
      defined   ..\..\src\audio\SDL_mixer_MMX_VC.c
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402652
      56cc49a0
    • Sam Lantinga's avatar
      Oskar Linde fixed bug #507 · e9c0e620
      Sam Lantinga authored
      Trackpad scrolling on OSX is broken. Scrolling up/slightly right gets
      translated into a Down event in SDL. The following patch fixes this extremely
      irritating issue:
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402650
      e9c0e620
    • Sam Lantinga's avatar
      Stephen Hurd fixed bug #505 · c89ec803
      Sam Lantinga authored
      Borland compilers have the alloca() prototype in malloc.h as with WATCOM.
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402648
      c89ec803
    • Sam Lantinga's avatar
      Brian Fisher fixed bug #513 · 567b94e9
      Sam Lantinga authored
      If an app requests a 24-bit opengl mode on a machine with a 32-bit desktop with
      the windib video backend, then when exiting fullscreen the desktop resolution
      is not restored
      
      The reason this is, is because the windib backend restores the desktop
      resolution when exiting fullscreen in DIB_SetVideoMode when it finds that the
      last request was for fullscreen by checking the original flags on the video
      surface. However, if the bits per pixel requested is different than current
      surface, the video surface is recreated and the original video flags are lost.
      So the check to see if we were exiting fullscreen fails.
      
      below is a patch to SDL_dibvideo.c that solves the problem by using the
      original flags in all cases.
      
      thanks!
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402647
      567b94e9
    • Sam Lantinga's avatar
      Fixed typo in docs, fixing bug #520 · bcbbc6be
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402645
      bcbbc6be