Commit Graph

563 Commits

Author SHA1 Message Date
Sam Lantinga
4e8ab456b0 Date: Sat, 24 Jan 2004 14:49:58 +0100
From: Stephane Marchesin
Subject: Re: [SDL] 3DNow! detection on a P4 system

Well... I found another bug : 3dnow was detected on P2/P3 cpus. So I
took one more look at the code and found a mistake in
CPU_getCPUIDFeaturesExt :
The condition for having extended cpuinfo is that when we query extended
cpuinfo we get a result >=  0x80000001. So we must exit if eax < 0x80000001.
The attached patch does that.
2004-01-24 15:55:00 +00:00
Sam Lantinga
972de8363f *** empty log message *** 2004-01-24 05:57:56 +00:00
Sam Lantinga
1ac8626346 Fixed bugs in CPU feature detection and added extended feature detection 2004-01-24 05:47:19 +00:00
Sam Lantinga
d5ec6433eb *** empty log message *** 2004-01-17 20:37:06 +00:00
Sam Lantinga
ec862e1c9a *** empty log message *** 2004-01-11 21:43:13 +00:00
Sam Lantinga
cc5d6cbff3 Date: Tue, 6 Jan 2004 21:54:02 +0100
From: Max Horn
Subject: Auto hide mouse & other changes

the attached bug adds the auto-hide-mouse feature I talked about
earlier. Turned out it was a lot simpler than I thought, simply by
using our existing code :-). I actually spent much more time on fixing
various bugs in the code and correcting (IMO) some behavior (although,
due to the lack of real specs for SDL, it's probably arguable what
'correct' means...).

* adds auto (un)hiding of mouse depending on whether it is in- or
outside the game window
* computation of course coordinates is correct now (it often and
reproducible got out of sync with the old code, since the NSEvent
window was in some cases *not* our window anymore, so locationInWindow
returned wrong results)
* added a method which at any time returns the mouse coords, relative
to our window
* fixed handling of lost/gain input/mouse/app focus "events"
2004-01-07 15:01:51 +00:00
Sam Lantinga
b01a5e306e Date: Tue, 6 Jan 2004 12:42:19 +0100
From: Max Horn
Subject: SDL_HasAltiVec; BUGS file

the attached patch adds SDL_HasAltiVec to SDL CVS. Note that at this
point, this only works on MacOSX (and maybe darwin). I don't know how
to properly add a test for e.g. Linux/PPC at this point. I found an
email which might help in doing so:
http://zebra.fh-weingarten.de/~maxi/html/mplayer-dev-eng/2003-01msg00783.html
However, since I have no way to test on a non-OSX PowerPC system, I am
not comfortable blindly adding such code... I just hope that if
somebody from the Linux/PPC (or FreeBSD/PPC, or whatever) community
notices this, they'll jump up and provide a patch for us ;-)
2004-01-06 17:18:38 +00:00
Sam Lantinga
fb1f8f1b71 *** empty log message *** 2004-01-06 17:16:02 +00:00
Sam Lantinga
0c90c5c2e0 Added support for /dev/joy* on Free/Net/OpenBSD (thanks Christian!) 2004-01-06 04:07:12 +00:00
Sam Lantinga
9abfdc34dd Fixed playback problems with MacOSX 10.1 2004-01-05 12:08:38 +00:00
Sam Lantinga
ee4e716e49 Date: Mon, 5 Jan 2004 00:09:36 +0100
From: Anders_F_Bj?rklund
Subject: [SDL] Dynamic OpenGL lib support for Mac

Here's a patch that adds LoadLibrary and GetProcAddress
to the Carbon macintosh driver (for Mac OS 9 and Mac OS X):
http://www.algonet.se/~afb/SDL-1.2.6-macdynamicgl.patch
It just calls the corresponding function from SDL_loadso.

It also fixes one Mac bug in SDL_loadso.c, that made it fail
always when loading a library, and fixes the screen update
after receiving an update event - which caused the OpenGL
context to be overwritten by a blank window by UpdateRect...
2004-01-05 01:34:34 +00:00
Sam Lantinga
5004d1c95d Date: Sun, 4 Jan 2004 23:48:19 +0100
From: Max Horn
Subject: Re: Again Audio CD patch

Am 04.01.2004 um 22:38 schrieb Sam Lantinga:

>
> Okay, I fixed the buffering problems by simply using a 4 second buffer
> instead of a 1 second buffer.  However, using your code I can't play an
> entire CD - the playback stops after the first song.
>
Found the problem: FSReadFork returns eofErr when the file is finished.
However, we check its return value for errors, and if anything but
noErr occurs, the reader thread aborts its current iteration. That is
bad, because it aborts before it can ever set the flag which tells that
the file is over (also, any remaining data which FSRead did return is
lost - so you'd not hear about to 4 seconds from the end of the file.

Furthermore, the computed data size was 8 bytes to high (I forgot to
account for the fact that the size of an (A)IFF chunk always contains
the chunk header & size fields, too). This is enough to make it work.
However, the end condition is rather fragile, so I tuned some other
things to be pessimistic (check for <= 0 instead of == 0, when eofErr
is encountered enforce mReadFilePosition == mFileLength). You never
know...

The attached patch fixes the issue for me.
2004-01-05 00:57:51 +00:00
Sam Lantinga
6a7c426236 Fix buffer underrun problems on slow iBooks 2004-01-04 21:32:47 +00:00
Sam Lantinga
a0db91cab5 Fixed track detection on MacOS X 10.1 2004-01-04 18:50:26 +00:00
Sam Lantinga
44c336b863 *** empty log message *** 2004-01-04 17:04:54 +00:00
Sam Lantinga
32719e7429 Updated copyright information for 2004 (Happy New Year!) 2004-01-04 16:49:27 +00:00
Sam Lantinga
6510cc9eff Max has been reworking this code so it works on MacOS X 10.1 2004-01-04 16:20:28 +00:00
Sam Lantinga
ddc06286af Date: Mon, 17 Nov 2003 21:59:24 -0800
From: Pete Shinners
Subject: [SDL] directfb cursor patch

here is a quick and dirty patch that allows directfb to change the
visibility of the cursor. this display backend still has no way to change
the actual cursor shape, but being able to set the cursor visibility is a
simple change that should offer some benefits.

the code was largely based on the cursor code for other sdl backends. and
this documentation.
http://directfb.org/documentation/DirectFB_Reference/IDirectFBDisplayLayer_SetCursorOpacity.html
2004-01-04 15:57:16 +00:00
Sam Lantinga
a548930526 Date: Wed, 26 Nov 2003 01:52:02 +0800
From: "Andy Pfiffer"
Subject: [SDL] patch: PocketPC 2000 diffs for release_1_2_6

I was making a backup of my current workspace of SDL for PocketPC,
and thought I would send out my diffs.

Apologies in advance if the patch has become whitespace mangled.

These diffs are relative to CVS tag release_1_2_6, and contain (I think)
all changes that have been mentioned on the mailing list in the last
few months.

I only have PocketPC 2000 & an ARM-based device (iPaq 3635), and I
only use Embedded Visual Tools 3.0, so I can't say for sure if it
breaks other PocketPC 200[023] builds.
2004-01-04 15:48:44 +00:00
Sam Lantinga
b30474af9e Editors Note: The original patch was modified to use SDL_Delay() instead of
nanosleep because nanosleep may not be portable to all systems
              using SDL with the ALSA backend.  This may be a moot point with
              the switch to blocking writes anyway...

Date: Sat, 27 Dec 2003 21:47:36 +0100
From: Michel Daenzer
To: Debian Bug Tracking System
Subject: [SDL] Bug#225252: [PATCH] ALSA fixes

Package: libsdl1.2debian-all
Version: 1.2.6-2
Severity: normal
Tags: patch

For SDL 1.2.6, the ALSA backend was changed to call snd_pcm_open() with
SND_PCM_NONBLOCK. That's a good idea per se, however, it causes high CPU
usage, interrupted sound and stuttering in some games here. Taking a nanosleep
whenever snd_pcm_writei() returns -EAGAIN fixes this, but I think it's more
efficient to use blocking mode for the actual sound playback. Feedback from the
SDL and ALSA lists appreciated.

The patch also fixes the default ALSA device to be used.
2004-01-04 15:40:50 +00:00
Sam Lantinga
d8a58193ae Added function to create RWops from const memory: SDL_RWFromConstMem() 2004-01-04 15:18:08 +00:00
Sam Lantinga
70f75c90cf Updated for new APIs 2004-01-04 15:11:35 +00:00
Sam Lantinga
8858a659db *** empty log message *** 2004-01-04 14:56:35 +00:00
Sam Lantinga
57b5c41a0b Date: Wed, 31 Dec 2003 21:55:30 +0100
From: Max Horn
Subject: SDL: video/quartz cleanup

while doing some experimental changes in the quartz code, I was annoyed
by having to recompile that one big .o file over and over again. So I
decided to finally realize one TODO: properly splitting the code over
multiple files :-).

With two exceptions, I didn't make code changes, only rearranged files
and added new headers. Since there are several new files, making a
patch didn't work out so well, so I decided to just send you all the
new & modified files.

The one source change I made is related to showing/hiding the mouse. I
renamed cursor_visible to cursor_should_be_visible and cursor_hidden to
cursor_visible; I think that makes reading the code easier.
Then I added two new functions: QZ_ShowMouse and QZ_HideMouse. They
help manage cursor_visible (the former 'cursor_hidden'). Finally I
replaced the Carbon ShowCursor/HiderCuror calls by [NSCursor hide] and
[NSCursor unhide]. The API docs are not conclusive, but it might be
that with those the "cursor_visible" (former 'cursor_hidden') hack may
not be necessary anymore; however so far I didn't test this hypothesis,
so I left that in.

The other change was to remove in_foreground and use [NSApp isActive]
instead: Manually keeping track of whether we are in the foreground is
error prone. This should work better in some corner cases.
2004-01-04 14:55:35 +00:00
Sam Lantinga
f5c7a503f5 Oops, we only want to fail creation if the display surface is an OpenGL surface. 2003-12-31 04:48:38 +00:00
Ryan C. Gordon
6f64e21a20 From: Thomas Jarosch
To: Ryan C. Gordon
Subject: SDL: DirectFB videodriver segfault
Date: Sun, 21 Dec 2003 20:40:14 +0100

Hi Ryan,

attached is a patch to fix a segfault in DirectFB_VideoQuit.
When SetVideoMode never gets called (f.e. wrong command line arguments
for "testsprite"), this->screen->hwdata is NULL.

Cheers,
Thomas
2003-12-22 01:21:20 +00:00
Sam Lantinga
852bb177c1 Date: Sun, 14 Dec 2003 15:16:12 +0100
From: Stephane Marchesin
Subject: Re: [SDL] compile problem with sdl <-> alsa

The attathced patch does the trick (although there will have to be code
changes when the alsa 0.9 api get deprecated).

On a side-note, the good news is that using alsa 1.0.0rc1 solves the
previous issues I had with my ac97 via sound chipset.
2003-12-16 13:16:50 +00:00
Sam Lantinga
fa53565425 te: Mon, 15 Dec 2003 08:25:14 -0800 PST
From: "Andrew Bachmann"
Subject: libSDL patches for beos video

I created some patches to SDL:

1. YUV overlay support
2. maintain high refresh rate when changing resolutions to a lower resolution
2003-12-16 13:04:44 +00:00
Sam Lantinga
4c27c8cfe5 Date: Fri, 12 Dec 2003 11:51:21 +0900
From: Hayashi Naoyuki
Subject: Tru64 audio(mme) fix

./src/audio/mme/SDL_mmeaudio.c
Fix the sound skip problem which is caused
even if it recover from high load.
2003-12-14 06:28:07 +00:00
Sam Lantinga
268729cc33 Fixed "dist" make target for newer versions of automake 2003-12-14 06:25:53 +00:00
Sam Lantinga
de4558b428 Date: Thu, 4 Dec 2003 07:48:40 +0200
From: "Mike Gorchak"
Subject: SDL/QNX6 new patch

Here in attachment my patch for the SDL/QNX6 again :) It contain non-crtitical/cosmetic fixes:

1. Fixed window centering at other than the first consoles.
2. Fixed window centering algorithm in case when window height or width are greater than the desktop resolution.
3. Fixed window positioning on other than the first consoles.
4. Fixed occasional input focus lost when switching to fullscreen.
5. Removed the Photon's default chroma color for the overlays, added RGB(12, 6, 12) color instead (very dark pink).
6. Added more checks to the YUV overlay code (fixed crashes during resolution mode switches).
7. Added support for Enter/Backspace keys in unicode mode (used by Maelstrom and by other games).
8. Fixed window restore/maximize function. It works, finally.
2003-12-10 12:35:56 +00:00
Sam Lantinga
fb64cdce92 *** empty log message *** 2003-12-10 12:32:38 +00:00
Sam Lantinga
a729f00bde Updated Visual C++ support 2003-11-24 19:58:29 +00:00
Sam Lantinga
ba60f47e1c *** empty log message *** 2003-11-24 09:30:40 +00:00
Sam Lantinga
37366af6f8 Check for CPUID before checking for 3DNow! 2003-11-24 09:30:14 +00:00
Sam Lantinga
6c1f33bee2 Greatly simplified the SDL CPU info code 2003-11-24 09:22:12 +00:00
Sam Lantinga
4f535a0ef2 Greatly simplified the SDL CPU info code 2003-11-24 09:16:52 +00:00
Sam Lantinga
459ca6f009 Fixed building cpuinfo under mingw32 2003-11-19 08:03:10 +00:00
Sam Lantinga
7fe4f4e884 Actually hook the cpuinfo module into the library. :) 2003-11-18 02:16:57 +00:00
Sam Lantinga
9981325fda Added SDL_HasMMX(), SDL_Has3DNow(), SDL_HasSSE() in SDL_cpuinfo.h 2003-11-18 01:27:06 +00:00
Sam Lantinga
2ccfbcec7c Date: Mon, 10 Nov 2003 19:57:56 +0100
From: Stephane Marchesin <stephane.marchesin@wanadoo.fr>
Subject: [SDL] SDL and gcc >= 3.3.1 fix

Lately, I upgraded my gcc compiler and could trigger the error described
in this thread :
http://www.libsdl.org/pipermail/sdl/2003-September/056163.html

SDL_RLEaccel.c: In function `RLEClipBlit':
SDL_RLEaccel.c:845: error: invalid `asm': invalid expression as operand
SDL_RLEaccel.c:845: error: invalid `asm': invalid expression as operand
SDL_RLEaccel.c:845: error: invalid `asm': invalid expression as operand


The attached patch fixes this issue, and is smaller than the previous
one, as I was able to trigger the issue, so I could narrow it.
2003-11-14 20:21:22 +00:00
Patrice Mandin
2c2cea5689 Small fix for iconification 2003-11-14 19:48:13 +00:00
Patrice Mandin
afc0fa9915 Use new C2P routine + corrections for iconification window 2003-11-12 18:49:29 +00:00
Patrice Mandin
8dff64cb1c Use new C2P routine 2003-11-12 18:46:48 +00:00
Patrice Mandin
d0d2cea8d5 New C2P conversion routine 2003-11-12 18:45:48 +00:00
Sam Lantinga
69d321b27c Date: Mon, 13 Oct 2003 13:37:18 +0100
From: "alan buckley"
Subject: Modification for RISC OS SDL port (SDL_riscosevents.c)

This modification improves the key press to Unicode character translation.
2003-11-05 23:11:05 +00:00
Ryan C. Gordon
2ecdb69caa Date: Wed, 5 Nov 2003 21:27:47 +0100
From: Thomas Jarosch <xxx>
To: Ryan C. Gordon <xxx>
Subject: MGA CRTC2 update

Hi Ryan,

attached is a small update for the DirectFB MGA CRTC2 support:

- Video aspect ratio correct scaling (important for MAME)
- Small bugfix in previous scaling code
- Ability to control the TV picture overscan via the environment variable
  SDL_DIRECTFB_OVERSCAN.

Sounds worth enough for applying it to SDL CVS ;-)

Cheers,
Thomas
2003-11-05 21:07:29 +00:00
Sam Lantinga
c675c64d80 *** empty log message *** 2003-10-06 09:03:02 +00:00
Sam Lantinga
41698e66b6 Updated libtool support so Mingw32 builds work. 2003-10-06 07:13:16 +00:00
Ryan C. Gordon
0e722f8477 MGA CRTC2 support for DirectFB target contributed by Thomas Jarosch. 2003-10-03 18:26:39 +00:00