1. 29 Dec, 2007 2 commits
    • 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
  2. 28 Dec, 2007 9 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
    • Sam Lantinga's avatar
      Removed stray C++ comment · d4df6882
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402644
      d4df6882
  3. 27 Dec, 2007 1 commit
  4. 25 Sep, 2007 1 commit
    • Ryan C. Gordon's avatar
      Date: Mon, 24 Sep 2007 17:54:58 +0200 · 014d56cb
      Ryan C. Gordon authored
      From: Christopher GAUTIER <krys via.ecp.fr>
      To: sdl@lists.libsdl.org
      Subject: [SDL] SDL_INPUT_LINUXEV vs SDL_JOYSTICK_LINUXEVHello all,
      
      There seems to be a slight inconsistency between the SDL_INPUT_LINUXEV
      define (used in src/joystick/linux/), and SDL_JOYSTICK_LINUXEV defined
      in include/SDL_config.h.
      
      SDL_JOYSTICK_LINUXEV is never used, and SDL_INPUT_LINUXEV is not
      mentioned in SDL_config.h.in (though set by the ./configure script).
      This has the unfortunate effect of breaking the joystick detection on linux
      boxes where /dev/input/event* is defined, but not /dev/(input/)?js*.
      
      Trivial patch included.
      
      Cheers.
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402640
      014d56cb
  5. 01 Sep, 2007 1 commit
  6. 21 Aug, 2007 1 commit
    • Sam Lantinga's avatar
      Fixed bugs #471 and #480 · ccf6e30b
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402635
      ccf6e30b
  7. 06 Aug, 2007 1 commit
  8. 05 Aug, 2007 1 commit
  9. 24 Jul, 2007 1 commit
    • Sam Lantinga's avatar
      Fixed bug #458 · 78427251
      Sam Lantinga authored
      ------- Comment #7 From Christian Walther 2007-07-23 01:10:30 [reply] -------
      Fix for some Cocoa memory management problems.
      
      OK, I think I've nailed the memory management problems with the attached patch.
      Too late for the release, but oh well. It shows that I haven't done much Cocoa
      lately... took me a while to figure out that NSWindows don't retain their
      delegate.
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402572
      78427251
  10. 23 Jul, 2007 2 commits
  11. 20 Jul, 2007 4 commits
    • Sam Lantinga's avatar
      I'm not sure if this helps anything, but it was clearly wrong. · 558a231a
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402561
      558a231a
    • Sam Lantinga's avatar
      Merged window position fix from windib code · 3dc65ba6
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402560
      3dc65ba6
    • Sam Lantinga's avatar
      > Hi Ryan, · 0a9a1e25
      Sam Lantinga authored
      > I checked the list you linked to, but did not see any reference to whether
      > the Win32 window centering bug was fixed... Has that been addressed at all?
      
      > I refer to the bug where, unless one has globally set the
      > SDL_WINDOW_CENTERED variable in the OS, only the 1st window that is created
      
      > will be centered. Subsequent calls to SetVideoMode will create a window tha
      t
      > shares the same upper-left corner location.
      
      I'm working on that now, thanks for reporting it.  What I'm doing is if the
      width and height are the same, I'm leaving the window position alone, but if
      they're different they will respect the positioning environment variables.
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402559
      0a9a1e25
    • Sam Lantinga's avatar
      Fixed warnings in NO_STDIO mode · 482db6b4
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402558
      482db6b4
  12. 19 Jul, 2007 2 commits
    • Sam Lantinga's avatar
      Added patch note for bug #461 · 0b1d4865
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402557
      0b1d4865
    • Sam Lantinga's avatar
      Fixed bug #461 · 99c11813
      Sam Lantinga authored
      Fixed a couple of bugs in the OpenGL window reset.
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402556
      99c11813
  13. 18 Jul, 2007 2 commits
  14. 16 Jul, 2007 3 commits
    • Sam Lantinga's avatar
      Always advertise hardware palette, since Windows will remap colors for us. · 62756e27
      Sam Lantinga authored
      We do grab the system colors if the application requested fullscreen or a
      real hardware palette.
      
      This allows gamma fading, etc. to work, and is what previous versions did.
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402550
      62756e27
    • Sam Lantinga's avatar
      Added support for building version.rc in Windows build. · 0d40fac1
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402548
      0d40fac1
    • Sam Lantinga's avatar
      Fixed bug #428 · c44a3172
      Sam Lantinga authored
      This fix is overkill, but approved by Doug Lea, and he'll be releasing a
      new version of his malloc.c sometime next month.
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402546
      c44a3172
  15. 15 Jul, 2007 9 commits
    • Sam Lantinga's avatar
      Fixed bug #457 · be91b510
      Sam Lantinga authored
      Don't crash if passed a NULL overlay.  The app crashes anyway, since
      it's not checking the return value of the create call, but at least it's
      not crashing in SDL anymore. :)
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402543
      be91b510
    • Sam Lantinga's avatar
      Fixed building on Windows CE · 5adb9f2f
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402542
      5adb9f2f
    • Sam Lantinga's avatar
      Added a patch note for the Mac OS X cursor bug · adddf96a
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402541
      adddf96a
    • Ryan C. Gordon's avatar
      Merged r3295:3296 from trunk/SDL: testjoystick reusing "joystick" variable. · d0696784
      Ryan C. Gordon authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402540
      d0696784
    • Sam Lantinga's avatar
      Final fix for bug #373 · 2fe61699
      Sam Lantinga authored
      ------- Comment #13 From Christian Walther 2007-07-15 10:04:56 [reply] -------
      Created an attachment (id=229) [details]
      patch to reinstate the SDL cursor after an NSApplicationActivatedEvent
      
      Oops, you're right. My testcursor.c has diverged so far from the original that
      I missed that. In fact, now that I think about it, that issue isn't even
      addressed by the cursor rectangle patch - it is only concerned with windowed
      mode (and fixes the problem there as a side effect). The problem in fullscreen
      is still the same as before. How about the attachment for a fix? (I can confirm
      that [NSCursor set] doesn't seem to have any effect when called from
      QZ_DoActivate().)
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402538
      2fe61699
    • Ryan C. Gordon's avatar
      Dump more information about each joystick in testjoytick.c · 53dae52e
      Ryan C. Gordon authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402536
      53dae52e
    • Sam Lantinga's avatar
      Patch from Christian Walther · 33dff0e2
      Sam Lantinga authored
      Yes, the idea to use a cursor rectangle instead of [NSCursor set] has occurred
      to me too, and it does seem to be the most elegant way. Here's my attempt at an
      implementation
      
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402535
      33dff0e2
    • Ryan C. Gordon's avatar
      An attempt at fixing Bugzilla #454. · 3b3b5c04
      Ryan C. Gordon authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402534
      3b3b5c04
    • Sam Lantinga's avatar
      I think this fixes bug #454 · 0468ab7f
      Sam Lantinga authored
      --HG--
      branch : SDL-1.2
      extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402533
      0468ab7f