Commit Graph

2098 Commits

Author SHA1 Message Date
Sam Lantinga
6b3f41d9c8 Fixed bug #531
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
2008-01-01 15:23:59 +00:00
Sam Lantinga
17ace74124 Clean up the test directory for release
--HG--
branch : SDL-1.2
2007-12-31 06:18:12 +00:00
Sam Lantinga
7d3a78030e Fixed 1 out of 210 warnings. ;-)
--HG--
branch : SDL-1.2
2007-12-31 06:12:50 +00:00
Sam Lantinga
1d1dc75500 Don't need the bundle resource
--HG--
branch : SDL-1.2
2007-12-31 03:09:42 +00:00
Sam Lantinga
8ae7b66350 Updated MacOS Classic version, added version resource to MPW build.
--HG--
branch : SDL-1.2
2007-12-31 03:04:31 +00:00
Sam Lantinga
9db178f495 Updated gcc-fat.sh to build on Mac OS X 10.5
--HG--
branch : SDL-1.2
2007-12-31 00:03:33 +00:00
Sam Lantinga
d4c77d50c3 Added symbian.zip to released files
--HG--
branch : SDL-1.2
2007-12-30 21:50:41 +00:00
Sam Lantinga
c028d6f334 Don't use -fvisibility if it generates warnings ... like this one:
warning: visibility attribute not supported in this configuration; ignored

--HG--
branch : SDL-1.2
2007-12-30 05:00:20 +00:00
Sam Lantinga
4d7e9468cc Fixed bug #510
Oops, we were disabling the screensaver before checking SDL_VIDEO_ALLOW_SCREENSAVER

--HG--
branch : SDL-1.2
2007-12-29 21:41:48 +00:00
Sam Lantinga
fa61958343 Guillaume Borios fixed bug #508
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
2007-12-29 21:31:26 +00:00
Sam Lantinga
3c8d72035f Fixed return value for iconifying the window in a couple spots.
--HG--
branch : SDL-1.2
2007-12-29 20:28:21 +00:00
Sam Lantinga
2ea5504ad8 J. Snell fixed bug #482
Fixed arguments used with sdl-config in sdl.m4

--HG--
branch : SDL-1.2
2007-12-29 20:08:51 +00:00
Sam Lantinga
e1bb13d727 Fixed bug #478
Take the min and max values into account.

--HG--
branch : SDL-1.2
2007-12-29 19:44:02 +00:00
Sam Lantinga
138e23eaa6 Added patch note for fixing bug #503
--HG--
branch : SDL-1.2
2007-12-29 19:01:13 +00:00
Sam Lantinga
fc9f99f291 Tony White fixed bug #503
Support escaped quotes on Win32 command lines.

--HG--
branch : SDL-1.2
2007-12-29 18:58:09 +00:00
Sam Lantinga
d588e8c1c4 Fixed bug #502
XRefreshKeyboardMapping() is only available when X_HAVE_UTF8_STRING is defined.

--HG--
branch : SDL-1.2
2007-12-29 18:50:33 +00:00
Sam Lantinga
fc146970ff Support both 10.2 and 10.3 PPC runtime SDK
--HG--
branch : SDL-1.2
2007-12-29 17:13:21 +00:00
Sam Lantinga
62cdfa64d3 Updated patch notes for 1.2.13
--HG--
branch : SDL-1.2
2007-12-29 06:21:47 +00:00
Sam Lantinga
76f1001651 Fixed bug #497
Check all joysticks instead of stopping if one has been removed.

--HG--
branch : SDL-1.2
2007-12-29 06:16:35 +00:00
Sam Lantinga
09cd129590 Fixed bug #464
Added X1/X2 button constants

--HG--
branch : SDL-1.2
2007-12-29 06:08:17 +00:00
Sam Lantinga
7855ee7a06 Improved detection of mprotect()
--HG--
branch : SDL-1.2
2007-12-29 06:06:03 +00:00
Sam Lantinga
5fa4843899 Updated version to 1.2.13
--HG--
branch : SDL-1.2
2007-12-29 05:30:20 +00:00
Sam Lantinga
1b32f5a97d Updated version to 1.2.13
--HG--
branch : SDL-1.2
2007-12-29 05:20:51 +00:00
Sam Lantinga
87d97715ae Made the mprotect() fix for SDL_SoftStretch() more general for hardened linux, etc.
--HG--
branch : SDL-1.2
2007-12-29 05:18:33 +00:00
Sam Lantinga
8b29ed785f Fixed bug #528
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
2007-12-29 03:50:29 +00:00
Sam Lantinga
26747330e7 Erik Heckers fixed bug #493
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
2007-12-29 02:34:53 +00:00
Sam Lantinga
3432b32c7b Hans de Goede fixed bug #495
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
2007-12-29 02:23:48 +00:00
Sam Lantinga
9f413fe6d9 Date: Thu, 27 Dec 2007 07:38:25 +0000
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
2007-12-28 22:05:17 +00:00
Sam Lantinga
8b3c845e2c Fixed fatbuild.sh script for building on Mac OS X 10.5
The minimum PPC SDK is 10.3.9

--HG--
branch : SDL-1.2
2007-12-28 20:39:31 +00:00
Sam Lantinga
5b100cbad4 Date: Wed, 14 Nov 2007 22:20:27 -0500
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
2007-12-28 18:15:43 +00:00
Sam Lantinga
76f6c7192f Date: Thu, 15 Nov 2007 10:33:01 +0100
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
2007-12-28 18:07:59 +00:00
Sam Lantinga
9d3412b382 Oskar Linde fixed bug #507
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
2007-12-28 08:11:26 +00:00
Sam Lantinga
88294ae6a7 Stephen Hurd fixed bug #505
Borland compilers have the alloca() prototype in malloc.h as with WATCOM.

--HG--
branch : SDL-1.2
2007-12-28 08:06:36 +00:00
Sam Lantinga
00610f157f Brian Fisher fixed bug #513
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
2007-12-28 08:00:30 +00:00
Sam Lantinga
c686df2180 Fixed typo in docs, fixing bug #520
--HG--
branch : SDL-1.2
2007-12-28 07:52:19 +00:00
Sam Lantinga
4884098ba4 Removed stray C++ comment
--HG--
branch : SDL-1.2
2007-12-28 07:50:01 +00:00
Sam Lantinga
636bd6ff76 Fixed crash when given video modes > 32 bpp
--HG--
branch : SDL-1.2
2007-12-27 13:59:41 +00:00
Ryan C. Gordon
98e1fb5a80 Date: Mon, 24 Sep 2007 17:54:58 +0200
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
2007-09-25 09:59:26 +00:00
Ryan C. Gordon
a2d05ea5dd ANSI C fix (all variables need to be defined at start of block).
Fixes Bugzilla #487.

--HG--
branch : SDL-1.2
2007-09-01 17:25:24 +00:00
Sam Lantinga
9030ffc5d4 Fixed bugs #471 and #480
--HG--
branch : SDL-1.2
2007-08-21 06:52:33 +00:00
Ryan C. Gordon
d5084855e5 Set an error message when SDL_GL_SetAttribute() fails because we can't support
the attribute on X11.

--HG--
branch : SDL-1.2
2007-08-06 18:36:46 +00:00
Ryan C. Gordon
9fb3f4de89 Removed some C++ style comments from the public headers.
Fixes Bugzilla #474.

--HG--
branch : SDL-1.2
2007-08-05 03:21:18 +00:00
Sam Lantinga
6b93aa7b97 Fixed bug #458
------- 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
2007-07-24 04:21:05 +00:00
Sam Lantinga
629240bd8e Switched afxres.h to winresrc.h
--HG--
branch : SDL-1.2
2007-07-23 18:36:58 +00:00
Sam Lantinga
54c57a6e47 Fixed window titles on Windows 95/98/ME
--HG--
branch : SDL-1.2
2007-07-23 01:19:56 +00:00
Sam Lantinga
38d037c3a9 I'm not sure if this helps anything, but it was clearly wrong.
--HG--
branch : SDL-1.2
2007-07-20 08:17:45 +00:00
Sam Lantinga
57c3c8e959 Merged window position fix from windib code
--HG--
branch : SDL-1.2
2007-07-20 03:30:41 +00:00
Sam Lantinga
9f2bd9da0f > Hi Ryan,
> 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
2007-07-20 03:25:40 +00:00
Sam Lantinga
57b5e688eb Fixed warnings in NO_STDIO mode
--HG--
branch : SDL-1.2
2007-07-20 02:58:28 +00:00
Sam Lantinga
d05d4532f7 Added patch note for bug #461
--HG--
branch : SDL-1.2
2007-07-19 08:12:45 +00:00