Commit graph

643 commits

Author SHA1 Message Date
Sam Lantinga
d7637536ba *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40643
2003-07-01 01:18:27 +00:00
Sam Lantinga
3f73ea75d2 Date: 28 Jun 2003 22:42:52 +0100
From: Alan Swanson
Subject: Re: [SDL] New XFree 4.3 Video Mode Patch

I have a wee amendment that moves the qsort in set_best_resolution
to only occur after failing to find an exact match only. This would
make absolutely sure we get a user set mode.

While I've never had any problems for my normal resolutions (1280x1024,
1024x768, 800x600 & 640,480) while closely examining the output from
qsort I've noticed it doesn't seem to sort the modes fully. These is
one definite wrong at 1152x768 and a few that just look wrong to me.

From a program (attached) I made to examine this more easily. X has
sorted its mode list using the same method as ours (plus frequency),
and our user modes get inserted without any other movement.

On the patch I've made I've also changed cmpmodes to sort on vertical
resolution and then horizontal. Ie vertical is now most significant
bit.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40642
2003-06-28 21:52:26 +00:00
Patrice Mandin
01983c1d04 Bugfix: some Makefiles in subdirectories created before their upper-level ones
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40641
2003-06-28 21:38:14 +00:00
Sam Lantinga
2f767bd51c I'm American, does it show? ;-)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40640
2003-06-28 17:39:46 +00:00
Sam Lantinga
44a5555c34 Date: Sun, 11 May 2003 19:59:06 +0300
From: Pasi K?rkk?inen
Subject: [PATCH] fix SDL OpenGL segfault with DRI/Mesa drivers and Glew

Hello!

The attached patch fixes a bug in SDL which causes SDL to crash in
X11_GL_Shutdown() if you are using DRI/Mesa drivers AND glew
(http://glew.sf.net).

The bug is caused by a namespace collision affecting dlsym() to fetch wrong
pointer for glXReleaseBuffersMESA() (uninitialized pointer from glew because
the extension is NOT supported by the driver) and then SDL calling it in
X11_GL_Shutdown().

SDL should check if the glXReleaseBuffersMESA() is really supported by the
driver (from the extensions string) before calling it.

Attached patch adds extension string parsing to check if
glXReleaseBuffersMESA() is really supported (and this way
prevents the segfault).

Availability of the extensions should be _always_ checked from the
extensions string rather than using dlsym()!

Please add it to the next version of SDL.

Thanks to gltron and author of glew to help fixing this.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40639
2003-06-28 17:27:33 +00:00
Sam Lantinga
31731b66ce te: 27 Jun 2003 21:16:01 +0100
From: Alan Swanson
Subject: [SDL] New XFree 4.3 Video Mode Patch

The current patch to fix the issues with XFree 4.3 it is a bit of
overkill to a simple problem. Default screen settings should be set in
X, not selected by SDL with environment variables. Any program or user
using non-standard or unset display modes get what they deserve :-)

If you look at the unsorted list of modes returned by X, here's mine;

 1280 x 1024 @ 85.0  >
 1024 x 768 @ 100.3  > USER
 800 x 600 @ 125.5   > SET
 640 x 480 @ 124.9   >
 1280 x 1024 @ 75.0  ]
 1280 x 1024 @ 60.0  ]
 1280 x 960 @ 85.0   ] X11
 1280 x 960 @ 60.0   ] AUTO
 1152 x 864 @ 75.0   ]
 1152 x 768 @ 54.8   ]
 960 x 720 @ 120.0   ]
...
 640 x 400 @ 85.1    ] 256k
 576 x 432 @ 150.0   ] 249k PIXEL
 640 x 350 @ 85.1    ] 224k COUNT
 576 x 384 @ 109.6   ] 221k
...

The user set modes come first followed by X set modes which are ordered
by decreasing number of pixels and refresh.

The reason why every other library or program not using SDL was working
is due to SDL scanning the modes in reverse getting X11 provided modes
modes with the lowest refresh.

The solution is to scan forward for the first user set mode or highest X
mode. The qsort still keeps user set modes above higher refresh modes
added by X.

For the best match we still reverse search for the nearest larger size
and then try to find a higher version of it.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40638
2003-06-28 17:16:52 +00:00
Sam Lantinga
1b6ff6d1c7 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40637
2003-06-28 17:03:57 +00:00
Sam Lantinga
7aedcf24ca *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40636
2003-06-22 04:23:27 +00:00
Sam Lantinga
716b011e9c Date: Thu, 05 Jun 2003 09:36:40 +0100
From: "alan buckley" <alan_baa@hotmail.com>
Subject: Modification for RISC OS SDL port

My name is Alan Buckley and I have been working on the RISC OS SDL port.

I've attached a modification to SDL_WimpVideo.c to this email that ensures
the Window is displayed immediately when the video mode is set to a windowed
mode.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40635
2003-06-14 07:18:40 +00:00
Patrice Mandin
f1d4f57390 Add m68k assembly mixing routines
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40634
2003-06-03 19:35:10 +00:00
Sam Lantinga
e83605f1b4 Date: Sun, 1 Jun 2003 15:38:45 -0700 (PDT)
From: Jeff Brown <jabrown@caida.org>
Subject: [patch] SDL-1.2.5 + FreeBSD joystick axes, hat fixes

Hello again!  When I sent in some SDL fixes last December, I found out
they'd already been fixed in the CVS version.  This time, I checked the
repository before bugging you.  =)

I'm using SDL-1.2.5 on a FreeBSD 4.6.2-RELEASE system, and in the course
of getting my multi-analog-axis USB controller (with a hat switch!)
working with d2x-sdl -- the SDL port of the Descent 2 engine -- I came
across a few problems:

1) The second analog stick is reported as a slider in one direction, and
"Rz" in the other.  SDL was ignoring the Rz axis, so I added Rx/Ry/Rz to
the set of things SDL considers to be axes.

2) After the above change, the set of JOYAXE_* axes for my gamepad was
{0,1,3,7}; however, d2x-sdl expects the axes to be contiguously numbered
from 0, which seems like a pretty reasonable expectation, rather than
having to scan the entire space of axes that SDL may or may not have.
So, I added a table lookup which maps the JOYAXE_* axis numbers to 0,1,...
in the order they're detected by SDL_SYS_JoystickOpen(), when reporting
them to the application.  I also added a function "usage_to_joyaxe()"
which maps the USB HUG_* usage values to JOYAXE_values, since the repeated
case statements testing for HUG_* were getting out of hand.

3) The BSD joystick driver had no hat support, so I added it.  It looks
like our USB library can only support one hat switch per device, which
makes life easy.

The patch against SDL-1.2.5 which implements these changes is at:

        http://www.caida.org/~jabrown/patches/sdl-1.2.5-bsdhat.diff

After applying, SDL's "testjoystick" reports all activity from my gamepad
correctly, and d2x works too (though it needed some other fixes).

Moving on...

There is also a problem with slightly different USBHID library interfaces
on different versions of FreeBSD. I wasn't going to mention this since the
FreeBSD port for SDL-1.2.5 (and not SDL itself) was doing the FreeBSD
version-specific patching, so I e-mailed the port maintainer with this
change.  However, I see that you've incorporated the FreeBSD
version-checking stuff into the CVS version of SDL, so now it's relevant
for you too.

The problem is, the FreeBSD #if tests don't work right for FreeBSD
4.6.2-RELEASE.  There may be other versions with this problem, but I've
only tested 4.6.2-R.  The following patch against your latest CVS version
fixes this:

--- SDL_sysjoystick.c-1.16      Tue Apr 15 09:02:08 2003
+++ SDL_sysjoystick.c   Sun Jun  1 15:10:28 2003
@@ -420,6 +420,8 @@
 #  else
        len = hid_report_size(rd, repinfo[repind].kind, r->rid);
 #  endif
+# elif (__FreeBSD_version == 460002)
+       len = hid_report_size(rd, r->rid, repinfo[repind].kind);
 # else
        len = hid_report_size(rd, repinfo[repind].kind, &r->rid);
 #endif


I hope this is all useful to you.  I've been getting myself dizzy playing
Descent 2 with it, all morning!

        -Jeff Brown


P.S. My USB controller is a Thrustmaster Firestorm Dual Analog 2.  That's
probably irrelevant, but I threw it in for completeness.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40633
2003-06-02 14:50:22 +00:00
Sam Lantinga
4fc311ff37 Date: Mon, 5 May 2003 00:08:51 -0400
From: Darrell Walisser
Subject: SDL Active Events Patch

Hi Guys,
        I was reading sdl-devel the other day and remembered we don't handle
SDL_APPACTIVE and SDL_APPMOUSEFOCUS. I hacked together a quick patch to
do just this. One thing to note - there are actually two ways to
"iconify" the SDL window (which sets SDL_APPACTIVE): hiding the entire
application (for example, option-click on some other window) and
minimizing the window to the dock. I treat both as SDL_APPACTIVE, since
the window is no longer visible.

Cheers,
Darrell

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40632
2003-05-29 04:52:36 +00:00
Sam Lantinga
e8ce0bc197 Added initial support for RISC OS (thanks Peter Naulls!)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40631
2003-05-29 04:44:13 +00:00
Sam Lantinga
35f9bbcbd6 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40630
2003-05-29 04:37:17 +00:00
Sam Lantinga
7705734fbc *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40629
2003-05-29 04:29:13 +00:00
Sam Lantinga
29f7b2314b Fixed compile problem in SDL_stretch.c with gcc 3.3
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40628
2003-05-29 04:25:29 +00:00
Sam Lantinga
f1d97fe2fe *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40627
2003-05-29 04:23:03 +00:00
Sam Lantinga
4676ca9d3f The compiler option that makes enums having the size of an int must be enabled.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40626
2003-05-29 04:16:20 +00:00
Ryan C. Gordon
4b04f093fd More-than-three mouse button support for Quartz target.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40625
2003-05-27 07:33:11 +00:00
Ryan C. Gordon
06d4bfc1da God, this is the never-ending patch. Another USB joystick detection fix for
MacOSX/Darwin.  --ryan.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40624
2003-05-25 02:17:52 +00:00
Ryan C. Gordon
a72d475286 Attempt #3: Fixed boolean logic bug that caused all HID joysticks to be
rejected on MacOSX/Darwin. Works now. No, really this time.  --ryan.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40623
2003-05-22 20:42:37 +00:00
Ryan C. Gordon
15a4f84834 Whoops...typo prevented compiling. Fixed.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40622
2003-05-22 07:12:36 +00:00
Ryan C. Gordon
ae7a1484b4 Find just joysticks and gamepads (as opposed to, say, USB Audio devices), in
the MacOSX/Darwin joystick initialization code.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40621
2003-05-22 06:41:54 +00:00
Ryan C. Gordon
e52f9bb94e Disable MacOS X screensaver for duration of application run by triggering a
"UsrActivity" alert every five seconds in the Quartz PumpEvents implementation.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40620
2003-05-22 06:28:40 +00:00
Sam Lantinga
e25d3d0c78 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40619
2003-05-03 19:48:37 +00:00
Sam Lantinga
313819cc86 MacOS X joystick fix
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40618
2003-05-03 15:36:10 +00:00
Sam Lantinga
e2b0c74800 Oops...
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40617
2003-04-26 06:40:01 +00:00
Sam Lantinga
b28b2bb4c4 Date: Thu, 17 Apr 2003 23:27:34 -0400
From: Darrell Walisser
Subject: Yet another OS X cursor bug

The synopsis:

1. Call SDL_ShowCursor(0);
2. Call SDL_SetVideoMode();
3. Call SDL_GetEvent();
3. Call SDL_ShowCursor(1);

The result: Sometimes the cursor doesn't come back! Ack! Oddly enough,
it does come back when mousing over the dock or clicking in the menu
bar. But that's besides the point.

The reason why this is happening is a flaw in the handling of
activation/deactivation events. The short explanation is that the
HideCursor() and ShowCursor() calls must be balanced, but if the cursor
was initially hidden, HideCursor() was called again on the activate
event - so now the next ShowCursor() fails (as does the next, and the
next, for some reason).

So, here's the patch. All it does is keep track of the
HideCursor()/ShowCursor() calls so that they will always be balanced.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40616
2003-04-20 05:41:16 +00:00
Sam Lantinga
bedc128ac0 Date: Wed, 9 Apr 2003 18:21:33 -0230
From: Stephen Anthony <stephena@roadrunner.nf.net>
Subject: [SDL] First patch concerning  4.3 and refresh rates

OK, here's my first draft of the patch for the above subject.

A short explanation:

X 4.3 introduces many more modelines than older versions.  This would be
fine, except it introduces many modes with the *same* resolution but
different refresh rates.  And SDL won't necessarily pick the one with the
highest refresh rate.

So this patch restores SDL to X 4.2 functionality.  That is, there is only
ever one refresh rate *per* resolution, and it is the highest possible.
This functionality can be totally disabled by using the environment
variable 'SDL_VIDEO_X11_USE_ALL_MODES' set equal to 1.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40615
2003-04-20 05:36:52 +00:00
Sam Lantinga
c8ea4a77eb Added MacOS X CD-ROM audio support (thanks Max and Darrell)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40614
2003-04-15 16:33:56 +00:00
Sam Lantinga
e44379a4b6 Fixed video intitialization problem on Qtopia (thanks David!)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40613
2003-04-15 16:04:31 +00:00
Sam Lantinga
1d8cdd5504 Date: Wed, 9 Apr 2003 01:03:25 -0400 (EDT)
From: "Matthew N. Dodd"
Subject: SDL patch: FreeBSD joystick support.

This patch deals with the recent changes in FreeBSD.

We're making an effort not to diverge our libusbhid from NetBSD's.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40612
2003-04-15 16:02:08 +00:00
Sam Lantinga
108052b020 Date: Mon, 14 Apr 2003 22:08:27 +0100
From: Patrice Mandin
Subject: [SDL][PATCH] 2 patches for sdl

Here are 2 patches for SDL:

- One is to put the dummy video drivers at the end of the
video drivers list. It gave me problems, when
SDL_VIDEODRIVER is not set, and the dummy driver is used
instead of the platform's driver, just because it is
always available. So the dummy driver must always be at
the end of the list. I suppose picogui and dc video
drivers also don't work.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40611
2003-04-15 15:46:56 +00:00
Sam Lantinga
b76da3f35f *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40610
2003-03-22 17:39:26 +00:00
Sam Lantinga
c605928016 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40609
2003-03-09 21:38:18 +00:00
Sam Lantinga
429aea3075 Date: Sat, 1 Mar 2003 16:13:57 -0500
From: Wilbern Cobb
Subject: OpenBSD/sparc64 video init fix

This patch fixes remote X sessions on OpenBSD/sparc64.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40608
2003-03-06 06:22:33 +00:00
Sam Lantinga
88d4df37f2 Date: Fri, 28 Feb 2003 22:47:56 +0100
From: Denis Oliver Kropp
Subject: Makefile.am fix

I fixed the Makefile.am which lacked many defines.
With this patch SDL on DirectFB doesn't crash on
startup immediately.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40607
2003-03-06 06:18:24 +00:00
Sam Lantinga
205a296adf IRIX patches from Andrea Suatoni
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40606
2003-03-06 06:12:41 +00:00
Sam Lantinga
bb0214c5a3 Date: Mon, 24 Feb 2003 16:31:25 -0500
From: Ragnvald "Despair" Maartmann-Moe IV
Subject: SDL x11 video mode selection bug

Hi, I've found an oddity with video mode selection. I recently added a bunch of
oddball video modes to my XF86Config, to support weird resolutions xine &
mplayer need if I don't want to beat my cpu up with video scaling.

Since adding them, SDL started picking the biggest video mode it could find
that matched the height constraint. Getting a narrow vertical strip of
QuakeForge (I code for the project, so needless to say it's my favorite test)
in the middle of an 800x480 screen, instead of the 640x480 I asked for
annoys me tremendously.

So here's a patch that tries a bit harder to get an exact match. I didn't
touch the XiG section, since I can't test that, but I'd bet a similar patch
would prevent similar problems there.

--Ragnvald "Despair" Maartmann-Moe IV

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40605
2003-03-06 06:02:16 +00:00
Sam Lantinga
53598ce435 From: Jonathan Atkins
Subject: testoverlay...

here's a fun one:
./testoverlay -scale -h

it seems to print argv[optind-1] as the program name...

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40604
2003-03-06 05:57:29 +00:00
Sam Lantinga
0f60451463 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40603
2003-03-05 05:28:09 +00:00
Sam Lantinga
c1364be120 Updated Visual C++ projects
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40602
2003-02-26 16:58:49 +00:00
Sam Lantinga
9757a96a3c *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40601
2003-02-26 07:27:32 +00:00
Sam Lantinga
0595869199 Fixed building thread code under BSD/OS (thanks Steven!)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40600
2003-02-21 17:16:38 +00:00
Sam Lantinga
93db5107c9 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40599
2003-02-12 15:24:39 +00:00
Sam Lantinga
68c795de40 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40598
2003-02-10 00:39:33 +00:00
Sam Lantinga
f813db750f CVS should ignore files automatically generated by building on MacOS X
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40597
2003-02-09 02:58:40 +00:00
Sam Lantinga
b1b661bc3f Don't warp the mouse when a video mode hasn't been set
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40596
2003-02-07 05:47:15 +00:00
Sam Lantinga
582b9152ff Added support for HID sliders wheels and dials on MacOS X
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40595
2003-02-04 21:05:20 +00:00
Sam Lantinga
5fbc9a0e44 Date: Fri, 31 Jan 2003 15:17:30 +0100
From: Patrice Mandin
Subject: [SDL] Small patches for SDL

- One for SDL, which removes check for SDL_VIDEODRIVER in the Atari video
drivers. It is unnecessary 'cause it is done in SDL_video.c

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40594
2003-02-04 21:01:03 +00:00