930 Commits

Author SHA1 Message Date
Sam Lantinga
c05a3f257e Date: Mon, 05 Jul 2004 14:37:59 +0200
From: Yves Maurischat
Subject: [SDL] Crashes when using aRts on Linux

We had a problem with my app using SDL. It always crashed after SDL_OpenAudio(),
if the artsd was running on a Linux machine with KDE. After some investigation
(and searching for differences in other apps using arts) we found out, that the
problem resulted from loading, calling arts_init(), calling arts_free() and
unloading the aRts-Library in .../src/audio/arts/SDL_artsaudio.c twice: first in
"static int Audio_Available()", the second time in "static SDL_AudioDevice
*Audio_CreateDevice(int devindex)".

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40930
2004-08-18 21:41:39 +00:00
Patrice Mandin
7df9f8266a Forgot to initialize maximum position for mouse
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40929
2004-08-10 20:58:47 +00:00
Patrice Mandin
beeb39367a Wrong check for minimum mouse position
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40928
2004-08-10 18:59:58 +00:00
Patrice Mandin
aab65909fe Give mouse position relative to window position, and do not generate mouse button event if outside of the window
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40927
2004-08-10 18:53:38 +00:00
Patrice Mandin
957b40a020 Do not destroy window on resize, so we can go back to original size from maximized size
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40926
2004-08-09 11:53:14 +00:00
Patrice Mandin
a5687fe059 Too much backslash-n at end of line
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40925
2004-08-05 19:50:06 +00:00
Patrice Mandin
a1135ef524 Correctly center window on creation
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40924
2004-08-05 19:43:07 +00:00
Patrice Mandin
d8a54a0f4a Correctly set window size if resized or maximized
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40923
2004-08-05 19:40:23 +00:00
Patrice Mandin
745040d205 Use meaningful define instead of numeral value
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40922
2004-08-05 19:37:45 +00:00
Patrice Mandin
39debe6a83 Use SDL_SetError instead of fprintf
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40921
2004-08-05 19:34:44 +00:00
Patrice Mandin
899423b986 Absolute mouse position was given as relative movement to SDL
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40920
2004-08-03 15:40:18 +00:00
Patrice Mandin
8c1f9b7977 Wrongly test if width multiple of 16
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40919
2004-08-03 08:50:52 +00:00
Patrice Mandin
b1493fe892 Lock the screen before doing its backup
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40918
2004-08-02 18:39:50 +00:00
Sam Lantinga
b9185e54c2 Date: Sun, 25 Jul 2004 23:10:03 +0800
From: Chris Taylor
Subject: SDL for Macintosh Programmer's Workshop: removed dynamic loading

I'm working on a game called D2X which uses SDL, and I recently ported
it to Mac OS 9. I used MPW to build it. It uses OpenGL. To get it to
work, I had to build SDL so it doesn't dynamically load OpenGL. This is
because I don't think MPW supports dynamic loading. The following patch
makes sure when SDL is built under MPW, dynamic loading of shared
libraries is disabled.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40917
2004-07-25 19:43:56 +00:00
Sam Lantinga
ee92972637 You can't free locked surfaces!
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40916
2004-07-25 18:43:07 +00:00
Sam Lantinga
a69bbd4764 Date: Wed, 23 Jun 2004 17:05:33 -0400
From: Chris Nelson
Subject: [SDL] [Patch] WiseGroup MP-8800 / MP-8866 (PS2 Joystick)

In the current cvs version, SDL doesn't handle these Playstation2
controller => USB adapters correctly, in linux.

It will always assume that the maximum number of joysticks (2 in the
case of the MP-8866, 4 in the case of the 8800) are plugged in. This is
bad not only because it allows SDL to exaggerate the number of logical
joysticks, but primarily because the joystick axes are mapped
incorrectly, all over the place, such that the devices are effectively
unusable unless you have the maximum number of joysticks plugged in.

My changes to src/joystick/linux/SDL_sysjoystick.c build on another's
previous work (which was a special case for this very joystick,
actually), and fix both of these problems, as well as making the current
code a little more general, to allow for others to more easily drop in
code for quirky joysticks such as these.

I've tested this code under 2.6.7 as well as 2.4.24... Both work as
advertised (provided you load the JOYDEV linux code as a module,
otherwise they won't work at all, new code or old, but that's another
issue entirely).

Though this sounds horribly formal, you have my permission to distribute
all of my work on this issue under the LGPL. So there.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40915
2004-07-25 18:31:50 +00:00
Sam Lantinga
564da8e6d2 Date: Mon, 28 Jun 2004 23:15:55 +0200
From: Ivo Danihelka
Subject: [SDL] [PATCH] SDL_WM_SetCaption with UTF-8

This patch enables UTF-8 suport for SDL_WM_SetCaption() in x11.

XFree86 >= 4.0.2 supports text strings in UTF-8. Presence of this
feature is indicated by the macro X_HAVE_UTF8_STRING.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40914
2004-07-25 17:33:33 +00:00
Sam Lantinga
dd48804e18 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40913
2004-07-21 04:53:26 +00:00
Sam Lantinga
f70b972d49 Date: Mon, 3 May 2004 03:15:01 +0100
From: David Symmonds
Subject: SDL Typedef Structs

Hi, Thanks for the SDL libraries, I have been using them for about a year
now and they are really brilliant. One thing that I have just found whilst
using them through C++ (and needing forward declarations) is that when you
typedef structs you sometimes use

typedef struct Name
{
...
}Name;

e.g. SDL_Surface


and other times use

typedef struct
{
...
}Name;


e.g. SDL_Rect

The first type works fine, when I define a header file I can just put
'struct Name;' at the top and use the Name throughout. However, the second
type is harder to use in a header, and I haven't found a way yet, other than
to include 'SDL.h' in the header file (undesirable). Would there be any harm
in changing the definition of SDL_Rect and such like to the second form?

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40912
2004-07-18 22:57:40 +00:00
Sam Lantinga
1ac1efb053 Date: Sat, 26 Jun 2004 14:58:42 +0300
From: "Mike Gorchak"
Subject: QNX 6.3 fixes for SDL

Sam, I've added new OpenGL framework for SDL, which appeared in the new QNX version - 6.3. I've leave compatibility with previous QNX versions. And I've moved all GL specific functions to the separate module, like it done for the other platforms.

SDL is now ready for the QNX 6.3 :)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40911
2004-07-18 19:46:38 +00:00
Sam Lantinga
7a8d040a8c *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40910
2004-07-18 19:44:06 +00:00
Sam Lantinga
2e7908c36f Date: Mon, 28 Jun 2004 19:58:08 +0900
From: Hayashi Naoyuki
Subject: SDL_types.h - fix for Tru64 MME

The following two problems are fixed.
1. Type of Uint64 is "long long" in SDL_types.h,
   but is "long" in mmbasic.h(Tru64 UNIX MME header file).
2. Uint8, Uint16 and Uint32 are redefined
   if you compile a file including mmbasic.h and SDL_types.h.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40909
2004-07-18 19:42:03 +00:00
Sam Lantinga
b84dba5751 Date: Mon, 21 Jun 2004 16:52:47 +0200
From: Marcin Konicki
Subject: SDL 1.2.7 patch for BeOS (new input handling code)

I rewrote input handling code for BeOS. It should be faster now (i got
report that mouse is faster, keyboard should be too, but it's harder to
observe).

I'll try to add mouse wheel support too, soon.

Stefano Ceccherini (a.k.a Jack Burton) helped me beautify code (working
version was less clean), and it was he who asked me to write this thing ;).

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40908
2004-07-18 19:36:06 +00:00
Sam Lantinga
3eaf8adb30 Date: Sat, 03 Jul 2004 02:23:48 +0200
From: Marcin Konicki
Subject: [PATCH] Add missing functions and bring back OpenGL

This patch adds missing functions:
IconifyWindow
GetWMInfo
GL_LoadLibrary
GL_GetProcAddress
GL_GetAttribute
GL_MakeCurrent

Adding GL_* functions brings back working OpenGL in SDL for BeOS :).
With addd GL_* functions there are few changes in Window class to handle
changes better.

Patch also fixes bug which freezed window when using MesaGL instead of
BeOS r5 GL - it just needed Window->Quit() added into BE_VideoQuit().
THX to Michael Weirauch (a.k.a emwe) who worked on that bug before and
found that it freezes because of lock somewhere.

THX to Matti "Mictlantecuhtli" Lev��nen for testing, Rod��ric Vicaire
(a.k.a. Ingenu) for OpenGL wisdom, and Stefano Ceccherini (a.k.a Jack
Burton) for asking me to fix SDL on BeOS :).

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40907
2004-07-18 19:14:33 +00:00
Sam Lantinga
249a5dcd55 Date: Wed, 7 Jul 2004 12:57:58 +0200
From: "Markus F.X.J. Oberhumer"
Subject: [SDL-CVS] [patch] small fix for SDL_joystick.h

the tiny patch below (against current CVS) fixes a syntax error
(not allow compilers allow multiple __cdecl).

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40906
2004-07-18 19:05:06 +00:00
Sam Lantinga
fc16e92976 Date: Fri, 16 Jul 2004 17:25:45 +0200
From: "A. Umbach"
Subject: Patch for bug in SDL cdrom resume handling

Black| pointed out a bug on #sdl today, that when you pause CD playback,
and then Resume it, it'll play until the end of the disk, and not until
the track you specified.

Attached is a patch that fixes the issue, by saving the desired end position
in the SDL_CD struct, and seting it again upon resume

- Andreas

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40905
2004-07-18 19:01:27 +00:00
Sam Lantinga
c496d3e3b8 Date: Sun, 18 Jul 2004 16:46:44 +0200
From: Georg Schwarz
Subject: Compiling SDL on IRIX 5.3

in order to make SDL compile on IRIX 5.3 I had to apply the following patch

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40904
2004-07-18 18:33:28 +00:00
Patrice Mandin
d2ee3368ef Forgot to initialize video mode list
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40903
2004-07-17 08:58:24 +00:00
Sam Lantinga
a43c7bf823 Date: Thu, 24 Jun 2004 15:13:40 +0300 (EEST)
From: Martin_Storsj�
Subject: Small patches for SDL/win32

I've tried playing with running SDL compiled for Windows with Wine (and
WineX) under Linux. It didn't originally work too well, but I somehow
managed to make it work. Most of the fixes was patches to Wine(X), but I
also found something in video/windx5/SDL_dx5video.c which, as far as I can
tell, actually is a bug in SDL. The result from the COM method Release,
which returns the new reference count, is compared to DD_OK. Because
QueryInterface is called immediately before, the reference count shouldn't
be DD_OK (== 0).

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40902
2004-06-25 05:24:50 +00:00
Sam Lantinga
b8d2b6a0c5 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40901
2004-05-27 22:57:30 +00:00
Sam Lantinga
c1fba56529 The tenth time is the charm...
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40900
2004-05-20 10:05:59 +00:00
Sam Lantinga
e442725177 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40899
2004-05-17 22:42:51 +00:00
Sam Lantinga
17d60ba5d4 Date: Tue, 11 May 2004 22:05:32 -0400
From: Bob Ippolito
Subject: [SDL] SDL_QuartzWM patches

I've sent in two small patches to SDL_QuartzWM directly to Sam over the
past few months (well, I think I sent both anyway) and neither of them
have been implemented.  I didn't receive a response, so I'm sure he was
just busy and/or they got lost, so I decided to sign up to the list and
post them here.

This patch rolls both of them together:
- Mouse cursor becomes visible if hidden when it moves outside of the
game window.  If you want it to stay invisible you should warp it
because if it's not warped a user might click some random other
application!  Commercial games behave in this way (or at least Warcraft
III does, which is the only one that uses a custom mouse cursor and no
warping that I've played in recent memory).
- Right mouse button emulation is changed from Command-Click to
Control-Click, which is how OS X behaves.

Consider copyright assigned to whomever needs it under whichever
license it needs to be under.. yadda yadda yadda.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40898
2004-05-17 00:16:24 +00:00
Sam Lantinga
77e3c78bf3 Date: Tue, 16 Mar 2004 12:40:33 +0000
From: Alan Swanson
Subject: [SDL] [PATCH] Linux joystick evdev axis count fix

The event device configuration under Linux does not check the returned
ioctl value when reading the axis information. This means extra
undefined axes are returned.

Note, in EV_HandleEvents, the default for case EV_ABS is to return any
axis information which is fine as we have already checked for all valid
absolute axes. No new axes should be returned after opening the device.

(Unless, of course, the evdev allows closing and reassigning a new
device while in use and I can't believe that happens.)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40897
2004-05-16 22:48:06 +00:00
Sam Lantinga
4893c025e6 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40896
2004-05-16 22:37:59 +00:00
Sam Lantinga
f410c37f35 Don't crash if the stretch routines are used on hardware surfaces
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40895
2004-05-16 21:08:55 +00:00
Sam Lantinga
fd0bae8ce1 Fixed crash on exit
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40894
2004-05-16 19:02:19 +00:00
Sam Lantinga
01baa89827 Date: Sun, 18 Apr 2004 16:09:53 -0400 (EDT)
From: David MacCormack
Subject: [SDL] Linux joystick patch

I recently got myself a PS2 -> USB converter (a super joybox 5).  It
accepts 4 PSX/PS2 controllers.  It's implemented as a HID, which is nice
because it doesn't require its own driver, but the problem is that it's
implemented as a *single* HID -- that is, it shows up as a single
joystick with 19 axes, 4 hats, and 48 buttons.  This poses a problem for a
number of apps which use SDL (stella, fce ultra, zsnes, to name a few) and
see only a single (physical) joystick even though there are really 4
(logical) joysticks.  There are a number of these types of devices on the
market, and I've seen others post messages (in the zsnes forum, for
example) with the same problem, so I came up with what I think is a pretty
generic solution.

I patched src/joystick/linux/SDL_sysjoystic.c to include support for
logical joysticks; basically, it's a static array and supporting functions
that map a single physical joystick to multiple logical joysticks.  The
attached patch has the new code.  It's wrapped inside #ifndef
statements so that you can get the old behavior if you want.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40893
2004-05-16 18:46:24 +00:00
Sam Lantinga
19f49cc2b0 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40892
2004-05-16 18:09:20 +00:00
Sam Lantinga
867534f752 Date: Sat, 10 Apr 2004 10:05:46 +0200
From: Christian Walther
Subject: [SDL] OpenGL Accumulation Buffer on Mac OS X

Is there a reason for not having OpenGL accumulation buffer support in
SDL 1.2.7 (and as far as I have checked also in the current CVS) on Mac OS
X?

Maybe I am doing something wrong, but it seems very easy to add (at least
it works for for me in 10.3.3) - just add

  if ( this->gl_config.accum_red_size + this->gl_config.accum_green_size + this->gl_config.accum_blue_size + this->gl_config.accum_alpha_size > 0) {
    attr[i++] = NSOpenGLPFAAccumSize;
    attr[i++] = this->gl_config.accum_red_size + this->gl_config.accum_green_size + this->gl_config.accum_blue_size + this->gl_config.accum_alpha_size;
  }

to QZ_SetupOpenGL() in SDL_QuartzGL.m

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40891
2004-05-16 18:06:27 +00:00
Sam Lantinga
f17f1c0175 ate: Fri, 09 Apr 2004 20:07:10 +0200
From: Hibernatus
Subject: [SDL] BUG: changing video mode in opengl + windows

In WIN_GL_SetupWindow (SDL12/src/video/wincommon/SDL_wingl.c) you call
WIN_GL_ResetWindow when SetPixelFormat fails.
WIN_GL_ResetWindow cannot properly work in its current state, because there
are several things to update once you've created a new window. At least
DirectInput doesn't work anymore here (which is somewhat annoying for the
player :).
I think you can simply remove that function. Many games don't try to
recover from that exception, that's why the newest ATI drivers emulate 16
bpp display in 32 bpp mode so the error never occurs (but the games may run
much slower).

Having SDL_SetVideoMode return NULL would be better than actually setting
the video mode and losing focus, directinput and maybe directsound too. It
also made my previous drivers crash (when switching from 32 bpp windowed to
16 bpp fullscreen).

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40890
2004-05-16 18:02:48 +00:00
Sam Lantinga
2156b93394 Date: Sun, 28 Mar 2004 16:38:32 +1200
From: Paul Eggleton
Subject: [SDL] Possible memory leak in SDL 1.2.7

Taking a look at this function X11_CreateWMCursor and its companion
X11_FreeWMCursor (in src/video/x11/SDL_x11mouse.c), I can see that
X11_CreateWMCursor is making several calls to XCreatePixmap, but there are no
corresponding calls in X11_FreeWMCursor to XFreePixmap.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40889
2004-05-16 17:40:32 +00:00
Sam Lantinga
7fe0dc0b01 Date: Mon, 10 May 2004 10:17:46 -0400
From: Mike Frysinger
Subject: Re: [SDL] gcc-3.4.0 / PIC fix

here's a combined patch (yours and the one i mentioned earlier) that i tested
with gcc-3.4.0 and gcc-3.3.3

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40888
2004-05-16 17:19:48 +00:00
Sam Lantinga
edba2cc827 Date: Sat, 24 Apr 2004 15:13:32 +0300
From: "Mike Gorchak"
Subject: SDL updates for the QNX6

1. Updated the README.QNX
2. Updated libtool scripts, which are shipped with SDL for QNX6 support.
3. Added some code to support the new QNX 6.3.0, which is in beta now.
4. Added code to detect the hw features, which driver supports.
5. Added hw alpha blits code.
6. Fixed bug when application switches to fullscreen more the 2 times. (afte\
r that window becames always stay on top).
7. Updated a bit README for the tests.
8. Added information about acceleration show in the testalpha.c test.
9. Added small fixes to the testoverlay2.c test.
10. Added alpha and cc+alpha blits benchmarks to the testvidinfo.c test.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40887
2004-05-06 15:55:06 +00:00
Sam Lantinga
2ca2c6c186 Date: Wed, 28 Apr 2004 16:52:41 -0400
From: "Damien A"
Subject: testdyngl fix

The test program you included in the latest version of SDL crashes on startup in Window (XP). The reason for this is that OpenGL functions on Windows use the __stdcall calling convention, not the C convention.  Placing APIENTRY infront of the * operator solves this problem.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40886
2004-04-30 18:33:30 +00:00
Sam Lantinga
e930e4a0da Increment version...
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40885
2004-04-23 14:00:08 +00:00
Sam Lantinga
c1cea1b5c8 Date: Sat, 10 Apr 2004 02:25:33 -0400
From: Glenn Maynard
To: sdl@libsdl.org
Subject: [SDL] SDL_SetVideoMode() failing and not setting an error (patch)

Running an OpenGL SDL application off 1.2.7, at SDL_InitSubSystem(SDL_INIT_VIDEO) time:

Warning: Unable to initialize AAlib mouseUsing AAlib driver: Slang driver 1.0 (slang)

SDL_SetVideoMode then fails; SDL_GetError() returns "".

The installation problem is straightforward: X (the higher priority
driver) isn't running, so SDL is falling back on aalib.  However,
no error is being set when aalib fails to initialize.  This also
happens with the svgalib driver.

SDL_video.c line ~653 sets mode to NULL, since aalib didn't return an
OpenGL surface.  Line ~711 ("failed setting a video mode") returns NULL.
The attached patch sets an error.  It's a horrible, useless error
message--it should really say eg. "aalib does not support OpenGL"; this
should probably be done earlier in the individual drivers, too.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40884
2004-04-11 19:54:40 +00:00
Sam Lantinga
d666ee03ff Date: Sun, 11 Apr 2004 13:09:44 +0200
From: Stephane Marchesin
Subject: [SDL] [Patch] inlining memcpy functions

I (finally) did some benchmarking of the misc mmx & sse blitting
functions, and found a little bottleneck in the memcpy ones : you get
~10% more performance on small surface blitting if you inline them.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40883
2004-04-11 19:52:58 +00:00
Sam Lantinga
b310759c40 Date: Tue, 30 Mar 2004 18:18:13 -0600
From: Tyler Montbriand
Subject: [SDL] Detecting Opteron CPU features

I can now get SDL_cpuinfo.c to detect the AMD Opteron's RDTSC, MMX, MMXEXT,
3DNOW, 3DNOWEXT, SSE, and SSE2 instruction set extensions under Linux.  It
took one #ifdef'ed block of new asm code to account for the 64-bit flags
register, but the other two blocks worked fine without modification, just
needed to modify the #ifdef's a bit.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40882
2004-04-11 19:49:34 +00:00
Sam Lantinga
b078fb1950 Date: Tue, 30 Mar 2004 21:26:47 -0600
From: Tyler Montbriand
Subject: [SDL] Opteron MMX patches for SDL_blit.c and SDL_blit_A.c

The inline MMX assembly in SDL_blit.c and SDL_blit_A.c compiles and runs fine
unmodified under AMD Opteron.  The inline assembly in SDL_yuv_mmx.c and
SDL_blit_N.c unfortunately isn't directly compatible.

I've included diffs from SDL_blit.c and SDL_blit_A.c that allow the MMX
assembly to be compiled when USE_ASMBLIT, __x86_64__, and __GNUC__ are all
defined.  All I had to modify was typedefs, the inline assembly itself wasn't
touched.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40881
2004-04-11 19:47:28 +00:00