Commit graph

2144 commits

Author SHA1 Message Date
Sam Lantinga
bfa61b6d48 Updated MacOS Classic version, added version resource to MPW build.
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402693
2007-12-31 03:04:31 +00:00
Sam Lantinga
30da51d04a Updated gcc-fat.sh to build on Mac OS X 10.5
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402692
2007-12-31 00:03:33 +00:00
Sam Lantinga
c75cd43670 Added symbian.zip to released files
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402691
2007-12-30 21:50:41 +00:00
Sam Lantinga
4c8bcc59f7 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
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402688
2007-12-30 05:00:20 +00:00
Sam Lantinga
1930946b08 Fixed bug #510
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
2007-12-29 21:41:48 +00:00
Sam Lantinga
46e4acae50 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
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402683
2007-12-29 21:31:26 +00:00
Sam Lantinga
c4370afc5f Fixed return value for iconifying the window in a couple spots.
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402682
2007-12-29 20:28:21 +00:00
Sam Lantinga
61b0ff7d8e J. Snell fixed bug #482
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
2007-12-29 20:08:51 +00:00
Sam Lantinga
b8dac67496 Fixed bug #478
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
2007-12-29 19:44:02 +00:00
Sam Lantinga
0b021f7b23 Added patch note for fixing bug #503
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402676
2007-12-29 19:01:13 +00:00
Sam Lantinga
39f17c1f3a Tony White fixed bug #503
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
2007-12-29 18:58:09 +00:00
Sam Lantinga
faa6f17fc5 Fixed bug #502
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
2007-12-29 18:50:33 +00:00
Sam Lantinga
cfa0e4cbda Support both 10.2 and 10.3 PPC runtime SDK
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402672
2007-12-29 17:13:21 +00:00
Sam Lantinga
eacd91866c Updated patch notes for 1.2.13
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402671
2007-12-29 06:21:47 +00:00
Sam Lantinga
ec15534467 Fixed bug #497
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
2007-12-29 06:16:35 +00:00
Sam Lantinga
4b26805089 Fixed bug #464
Added X1/X2 button constants

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402667
2007-12-29 06:08:17 +00:00
Sam Lantinga
e5dffeb513 Improved detection of mprotect()
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402666
2007-12-29 06:06:03 +00:00
Sam Lantinga
2377118c80 Updated version to 1.2.13
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402665
2007-12-29 05:30:20 +00:00
Sam Lantinga
5c9409188c Updated version to 1.2.13
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402664
2007-12-29 05:20:51 +00:00
Sam Lantinga
cec0823339 Made the mprotect() fix for SDL_SoftStretch() more general for hardened linux, etc.
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402663
2007-12-29 05:18:33 +00:00
Sam Lantinga
47781d53a0 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
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402662
2007-12-29 03:50:29 +00:00
Sam Lantinga
f037300cd2 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
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402660
2007-12-29 02:34:53 +00:00
Sam Lantinga
6a789765e3 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
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402659
2007-12-29 02:23:48 +00:00
Sam Lantinga
385c1a65d4 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
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402658
2007-12-28 22:05:17 +00:00
Sam Lantinga
9d00770a13 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
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402656
2007-12-28 20:39:31 +00:00
Sam Lantinga
2d4548f254 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
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402654
2007-12-28 18:15:43 +00:00
Sam Lantinga
56cc49a068 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
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402652
2007-12-28 18:07:59 +00:00
Sam Lantinga
e9c0e62075 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
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402650
2007-12-28 08:11:26 +00:00
Sam Lantinga
c89ec803e3 Stephen Hurd fixed bug #505
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
2007-12-28 08:06:36 +00:00
Sam Lantinga
567b94e941 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
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402647
2007-12-28 08:00:30 +00:00
Sam Lantinga
bcbbc6be84 Fixed typo in docs, fixing bug #520
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402645
2007-12-28 07:52:19 +00:00
Sam Lantinga
d4df68827b Removed stray C++ comment
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402644
2007-12-28 07:50:01 +00:00
Sam Lantinga
3858fed068 Fixed crash when given video modes > 32 bpp
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402643
2007-12-27 13:59:41 +00:00
Ryan C. Gordon
014d56cbbb 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
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402640
2007-09-25 09:59:26 +00:00
Ryan C. Gordon
77579d44ab ANSI C fix (all variables need to be defined at start of block).
Fixes Bugzilla #487.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402637
2007-09-01 17:25:24 +00:00
Sam Lantinga
ccf6e30b66 Fixed bugs #471 and #480
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402635
2007-08-21 06:52:33 +00:00
Ryan C. Gordon
66999cf699 Set an error message when SDL_GL_SetAttribute() fails because we can't support
the attribute on X11.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402578
2007-08-06 18:36:46 +00:00
Ryan C. Gordon
bf1bbf37de Removed some C++ style comments from the public headers.
Fixes Bugzilla #474.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402577
2007-08-05 03:21:18 +00:00
Sam Lantinga
784272518e 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
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402572
2007-07-24 04:21:05 +00:00
Sam Lantinga
ee495cbdf9 Switched afxres.h to winresrc.h
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402570
2007-07-23 18:36:58 +00:00
Sam Lantinga
f6fa658151 Fixed window titles on Windows 95/98/ME
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402568
2007-07-23 01:19:56 +00:00
Sam Lantinga
558a231a13 I'm not sure if this helps anything, but it was clearly wrong.
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402561
2007-07-20 08:17:45 +00:00
Sam Lantinga
3dc65ba614 Merged window position fix from windib code
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402560
2007-07-20 03:30:41 +00:00
Sam Lantinga
0a9a1e25b8 > 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
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402559
2007-07-20 03:25:40 +00:00
Sam Lantinga
482db6b458 Fixed warnings in NO_STDIO mode
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402558
2007-07-20 02:58:28 +00:00
Sam Lantinga
0b1d486568 Added patch note for bug #461
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402557
2007-07-19 08:12:45 +00:00
Sam Lantinga
99c118136b Fixed bug #461
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
2007-07-19 08:08:16 +00:00
Sam Lantinga
d2459bb368 Updating copyright date for Version.rc
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402555
2007-07-18 04:07:46 +00:00
Sam Lantinga
385916fd13 Better windres detection
--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402553
2007-07-18 04:04:24 +00:00
Sam Lantinga
62756e27c7 Always advertise hardware palette, since Windows will remap colors for us.
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
2007-07-16 05:08:20 +00:00