Commit Graph

933 Commits

Author SHA1 Message Date
Sam Lantinga
a4ed545193 Use the canonical glext.h on MacOS X as well (#define NO_SDL_GLEXT if you don't want this) 2004-08-20 22:32:05 +00:00
Sam Lantinga
04b9a5d276 *** empty log message *** 2004-08-20 19:42:44 +00:00
Sam Lantinga
c6c5bee36f Date: Fri, 20 Aug 2004 08:31:20 +0200
From: "Markus F.X.J. Oberhumer"
Subject: [SDL-CVS][patch] add missing SDLCALL to headers

the small patch attached below (against current CVS) adds some missing SDLCALL
decorations to callback types and arguments.

Unfortunately one of these changes breaks your gen{def,exp}.pl scripts which
should be changed to use non-greedy regular expression matching...
2004-08-20 18:57:01 +00:00
Sam Lantinga
8f5b9bfe09 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)".
2004-08-18 21:41:39 +00:00
Patrice Mandin
047f5ccdaa Forgot to initialize maximum position for mouse 2004-08-10 20:58:47 +00:00
Patrice Mandin
1dd936f4e8 Wrong check for minimum mouse position 2004-08-10 18:59:58 +00:00
Patrice Mandin
e8dbeda86d Give mouse position relative to window position, and do not generate mouse button event if outside of the window 2004-08-10 18:53:38 +00:00
Patrice Mandin
4da8d4978a Do not destroy window on resize, so we can go back to original size from maximized size 2004-08-09 11:53:14 +00:00
Patrice Mandin
7dac7fa77a Too much backslash-n at end of line 2004-08-05 19:50:06 +00:00
Patrice Mandin
8eded785ac Correctly center window on creation 2004-08-05 19:43:07 +00:00
Patrice Mandin
94b9098d2a Correctly set window size if resized or maximized 2004-08-05 19:40:23 +00:00
Patrice Mandin
3cff3e3ccd Use meaningful define instead of numeral value 2004-08-05 19:37:45 +00:00
Patrice Mandin
16d3a9e749 Use SDL_SetError instead of fprintf 2004-08-05 19:34:44 +00:00
Patrice Mandin
9113c987ea Absolute mouse position was given as relative movement to SDL 2004-08-03 15:40:18 +00:00
Patrice Mandin
366ac2d66b Wrongly test if width multiple of 16 2004-08-03 08:50:52 +00:00
Patrice Mandin
ee49809e28 Lock the screen before doing its backup 2004-08-02 18:39:50 +00:00
Sam Lantinga
642e013da0 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.
2004-07-25 19:43:56 +00:00
Sam Lantinga
15fba045d8 You can't free locked surfaces! 2004-07-25 18:43:07 +00:00
Sam Lantinga
32a76c379b 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.
2004-07-25 18:31:50 +00:00
Sam Lantinga
cca32f0898 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.
2004-07-25 17:33:33 +00:00
Sam Lantinga
6149a658d4 *** empty log message *** 2004-07-21 04:53:26 +00:00
Sam Lantinga
08c158c94b 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?
2004-07-18 22:57:40 +00:00
Sam Lantinga
ddf57c3389 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 :)
2004-07-18 19:46:38 +00:00
Sam Lantinga
f284dce184 *** empty log message *** 2004-07-18 19:44:06 +00:00
Sam Lantinga
bcd78b0748 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.
2004-07-18 19:42:03 +00:00
Sam Lantinga
1fd5ea3b26 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 ;).
2004-07-18 19:36:06 +00:00
Sam Lantinga
15eebb8ffd 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 :).
2004-07-18 19:14:33 +00:00
Sam Lantinga
54d0c70c1e 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).
2004-07-18 19:05:06 +00:00
Sam Lantinga
13bc764867 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
2004-07-18 19:01:27 +00:00
Sam Lantinga
7a9c165a1c 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
2004-07-18 18:33:28 +00:00
Patrice Mandin
632cdc3d4f Forgot to initialize video mode list 2004-07-17 08:58:24 +00:00
Sam Lantinga
0a6926268b 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).
2004-06-25 05:24:50 +00:00
Sam Lantinga
e8954f1b31 *** empty log message *** 2004-05-27 22:57:30 +00:00
Sam Lantinga
f7597e6158 The tenth time is the charm... 2004-05-20 10:05:59 +00:00
Sam Lantinga
9c5353dc16 *** empty log message *** 2004-05-17 22:42:51 +00:00
Sam Lantinga
11d8dcb490 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.
2004-05-17 00:16:24 +00:00
Sam Lantinga
9a80383a8f 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.)
2004-05-16 22:48:06 +00:00
Sam Lantinga
4e9dd22b3e *** empty log message *** 2004-05-16 22:37:59 +00:00
Sam Lantinga
a6590f591a Don't crash if the stretch routines are used on hardware surfaces 2004-05-16 21:08:55 +00:00
Sam Lantinga
8cd47b4750 Fixed crash on exit 2004-05-16 19:02:19 +00:00
Sam Lantinga
f67acf7443 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.
2004-05-16 18:46:24 +00:00
Sam Lantinga
c87a399c21 *** empty log message *** 2004-05-16 18:09:20 +00:00
Sam Lantinga
1bb80615d4 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
2004-05-16 18:06:27 +00:00
Sam Lantinga
c5e9fb17f4 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).
2004-05-16 18:02:48 +00:00
Sam Lantinga
07073fa04a 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.
2004-05-16 17:40:32 +00:00
Sam Lantinga
faa0e1d28b 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
2004-05-16 17:19:48 +00:00
Sam Lantinga
356c197ebd 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.
2004-05-06 15:55:06 +00:00
Sam Lantinga
e073227440 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.
2004-04-30 18:33:30 +00:00
Sam Lantinga
327a62cd62 Increment version... 2004-04-23 14:00:08 +00:00
Sam Lantinga
4423b9c455 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.
2004-04-11 19:54:40 +00:00