Commit Graph

765 Commits

Author SHA1 Message Date
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
3aa17cd2e0 Date: Wed, 17 Dec 2003 18:07:29 -0800 PST
From: "Andrew Bachmann"
Subject: recent build changes

To ensure that I submitted all the changes to you I attempt to rebuild SDL from a clean cvs checkout.  Unfortunately it failed with this error:

/boot/develop/libsdl/SDL12/src/audio/baudio/SDL_beaudio.cc:35: SDL_BeApp.h: No such file or directory
2003-12-18 05:01:47 +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
97c7d1a3e4 *** empty log message *** 2003-11-24 22:52:28 +00:00
Sam Lantinga
f57ed0a33e Date: Mon, 24 Nov 2003 20:11:31 +0000
From: John Drinkwater <john@nextraweb.com>
Subject: SDL configure.in patch

On my cygwin compile environment, I get a script error with configure.

$ ./configure --enable-debug=no -q;
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
./configure: line 28135: : command not found
*snip the rest*

The supplied patch fixes the problem, just a minor oversight of some [ ] & t\
est.
2003-11-24 21:57:13 +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
0c9bad4370 Switched data files to binary format 2003-11-24 00:21:24 +00:00
Sam Lantinga
b99914f8a4 *** empty log message *** 2003-11-24 00:20:48 +00:00
Sam Lantinga
459ca6f009 Fixed building cpuinfo under mingw32 2003-11-19 08:03:10 +00:00
Sam Lantinga
3e788033ab Date: Mon, 17 Nov 2003 23:12:59 +0100
From: Max Horn
Subject: SDL building "the unix way" on OS X

I just noticed that building current SDL CVS "the unix way" (using
configure/make) is (and has been for some time, it seems) broken.
That's because Sam updated to a newer libtool version, which removed my
"-framework" patches.

Attached is a patch which once again makes ltmain.sh aware of
"-framework". Note that this is simply a backport of the corresponding
changes in libtool CVS (i.e. the next libtool release will contain
those same changes).
2003-11-18 14:25:12 +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
912dbc5edd Use a unique base address for each DLL.
Fixed ltmain.sh for MSYS development environment.
2003-10-06 08:34:08 +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
Patrice Mandin
3e38416231 Update MiNT CD-ROM driver 2003-10-01 07:52:33 +00:00
Ryan C. Gordon
7ea54764c6 SDL12: Disable screensaver in windib driver. 2003-09-30 07:16:20 +00:00
Sam Lantinga
7a8a6549fb *** empty log message *** 2003-09-28 18:31:07 +00:00
Patrice Mandin
f2c7d6a938 Atari CD-ROM support 2003-09-27 08:20:26 +00:00
Patrice Mandin
a71036cb2a Files now copied to build directory instead of source directory while configuring 2003-09-24 21:45:27 +00:00
Sam Lantinga
c82baf190a *** empty log message *** 2003-09-21 19:25:45 +00:00
Sam Lantinga
3bba94745b Date: Thu, 18 Sep 2003 14:24:35 -0400
From: Scott Watson
Subject: [SDL] Improper Windows message routine calling

If this hasn't been caught yet, there's an improper method of calling a
user's window message routine in the various SDL_xxevents.c files.

Calling it improperly can cause a crash under at least XP.
2003-09-21 18:40:51 +00:00
Sam Lantinga
971fb91ad9 N Sep 17 8791 Sam Lantinga Re: tks source released
Date: Sun, 07 Sep 2003 02:51:58 +0200
From: Stephane Marchesin
Subject: [SDL] Two little patches

Compiling SDL with a recent gcc (gcc 3.3.1, 3.3 doesn't have this
behaviour) gives some nasty warnings :

SDL_blit_A.c: In function `BlitRGBtoRGBSurfaceAlpha128MMX':
SDL_blit_A.c:223: warning: integer constant is too large for "long" type
SDL_blit_A.c:225: warning: integer constant is too large for "long" type
SDL_blit_A.c:227: warning: integer constant is too large for "long" type
[...]

The first attached patch (longlongfix.patch) tells gcc to really treat
those constants as unsigned long long and not long.

The second patch (nasinclude.patch) fixes an include problem I had while
compiling nas audio : when the <audio/audiolib.h> file lies in
/usr/X11R6/include, a -I/usr/X11R6/include  option is needed or the file
isn't found.
2003-09-21 18:32:04 +00:00
Sam Lantinga
b2aea0bd06 Date: Fri, 12 Sep 2003 18:04:19 -0400
From: Matthew Danish
Subject: patch for k*bsd support

I am forwarding this patch from Robert Millan <rmh@debian.org> for
supporting K*BSD systems (BSD kernel GNU userland, and hurd) in
configure.in.
2003-09-21 18:18:17 +00:00
Sam Lantinga
b43f702dee Date: Sat, 13 Sep 2003 15:50:43 +0300
From: "Mike Gorchak"
Subject: QNX fixes

improved sound code for the QNX, added workarounds for known bugs, fixed photon detect code. Update .qpg file.
2003-09-21 18:13:48 +00:00
Ryan C. Gordon
c827687714 Date: Sun, 14 Sep 2003 17:04:55 -0400
From: Philip D.S. Thoren <pthoren@cs.uml.edu>
Reply-To: "sdl@libsdl.org" <sdl@libsdl.org>
To: "sdl@libsdl.org" <sdl@libsdl.org>
Subject: [SDL] BUG in src/video/windx5/SDL_dx5events.c

   I tracked down a bug that crashed my program on Windows *all* the
time.

    FILE: src/video/windx5/SDL_dx5events.c

    FUNCTION: handle_mouse
    BUG:
        SDL_PublicSurface is being dereferenced when it is NULL.
               I added the following to the very begining of handle_mouse
        and it solved my crashing problems:

        if (SDL_PublicSurface == NULL) return;

~ Philip D.S. Thoren
2003-09-15 13:51:25 +00:00
Ryan C. Gordon
59afd118c0 SDL_JoystickInit: If malloc() fails, pretend no joysticks were detected. 2003-09-13 02:20:32 +00:00
Sam Lantinga
f63aa44400 Date: Mon, 01 Sep 2003 15:37:52 +0900
From: SUGIMOTO Sadahiro
Subject: [SDL] [PATCH] bsd joystick

Hi,
on FreeBSD systems, I had troubles using a USB joystick with SDL.
There are two problems in src/joystick/bsd/SDL_sysjoystick.c .

1. The macro __FreeBSD_version is compared to inappropriate numbers.

According to
http://www.jp.freebsd.org/cgi/cvsweb.cgi/src/lib/libusbhid/usbhid.h
http://www.jp.freebsd.org/cgi/cvsweb.cgi/src/lib/libusbhid/Attic/libusb.h
http://www.jp.freebsd.org/cgi/cvsweb.cgi/src/lib/libusbhid/Attic/libusbhid.h
the APIs of USB HID are common in each following groups of OS versions,
a. 4.1-4.5
b. 4.6-4.8, and 5.0
c. 5.1

2. open() error

$ uname -sr
FreeBSD 5.1-RELEASE
$ ls -l /dev/uhid0
crw-r--r--  1 root  operator  122,   0  8  3 14:06 /dev/uhid0

Then, open("/dev/uhid0", O_RDWR) fails.
It seems that this device file does not need to be writable, so O_RDONLY
may be suitable.
2003-09-05 15:20:47 +00:00