Commit Graph

567 Commits

Author SHA1 Message Date
Sam Lantinga
e68974b2d1 Enable the glXGetProcAddressARB code (fixes problems with NVidia drivers) 2003-01-20 00:25:28 +00:00
Sam Lantinga
61e7ca331d David MacCormack fixed a bug in window sizing with Windows menus 2003-01-20 00:17:01 +00:00
Sam Lantinga
0e1284505c Test of the CVS mailing list 2003-01-19 23:01:35 +00:00
Ryan C. Gordon
64c6c74bc0 Massive Quartz input enhancements from Darrell Walisser. His email:
Enclosed is a patch that addresses the following:

--Various minor cleanups.
Removed dead/obsolete code, made some style cleanups

--Mouse Events
Now keep track of what button(s) were pressed so we know when to send
the mouse up event. This fixes the case where the mouse is dragged
outside of the game window and released (in which case we want to send
the mouse up event even though the mouse is outside the game window).

--Input Grabbing
Here is my take on the grabbing situation, which is the basis for the
new implementation.

There are 3 grab states, ungrabbed (UG), visible (VG), and invisible
(IG). Both VG and IG keep the mouse constrained to the window and
produce relative motion events. In VG the cursor is visible (duh), in
IG it is not. In VG, absolute motion events also work.

There are 6 actions that can affect grabbing:

1. Set Fullscreen/Window (F/W). In fullscreen, a visible grab should do
nothing. However, a fullscreen visible grab can be treated just like a
windowed visible grab, which is what I have done to help simplify
things.

2. Cursor hide/show (H/S). If the cursor is hidden when grabbing, the
grab is an invisible grab. If the cursor is visible, the grab should
just constrain the mouse to the window.

3. Input grab/ungrab(G/U). If grabbed, the cursor should be confined to
the window as should the keyboard input. On Mac OS X, the keyboard
input is implicitly grabbed by confining the cursor, except for
command-tab which can switch away from the application. Should the
window come to the foreground if the application is deactivated and
grab input is called? This isn't necessary in this implementation
because the grab state will be asserted upon activation.

Using my notation, these are all the cases that need to be handled
(state + action = new state).

UG+U = UG
UG+G = VG or IG, if cursor is visible or not
UG+H = UG
UG+S = UG

VG+U = UG
VG+G = VG
VG+H = IG
VG+S = VG

IG+U = UG
IG+G = IG
IG+H = IG
IG+S = VG

The cases that result in the same state can be ignored in the code,
which cuts it down to just 5 cases.

Another issue is what happens when the app loses/gains input focus from
deactivate/activate or iconify/deiconify. I think that if input focus
is ever lost (outside of SDL's control), the grab state should be
suspended and the cursor should become visible and active again. When
regained, the cursor should reappear in its original location and/or
grab state. This way, when reactivating the cursor is still in the same
position as before so apps shouldn't get confused when the next motion
event comes in. This is what I've done in this patch.
2002-12-27 20:52:41 +00:00
Ryan C. Gordon
fb8eba0ceb Added some code to toggle fullscreen and input grab for testing... --ryan. 2002-12-20 03:37:28 +00:00
Sam Lantinga
3ce86ce435 Date: Sat, 14 Dec 2002 13:33:05 -0500
From: Darrell Walisser
Subject: Re: crash in SDL / OSX

> Yes, compose keys and other "dead" keys should have unicode 0.
> As a hack, if you get multiple composed characters, you can send the
> sequence with a valid unicode and a keysym of 0.  It's because of
> things like this that I'm separating the key and char events in SDL 2.0

I've done this and here's the patch.
2002-12-15 09:09:31 +00:00
Ryan C. Gordon
384d2f742c Moved some cleanup stuff to QZ_VideoQuit() from QZ_UnsetVideoMode()...fixes
cursor hiding, etc when calling SDL_SetVideoMode() multiple times. Fixed by
 Darrell Walisser.
2002-12-13 21:09:52 +00:00
Sam Lantinga
fa194129e8 Fixed invalid memory access in DGA video driver (thanks ldb!) 2002-12-11 05:52:28 +00:00
Sam Lantinga
6c06857010 Fixed left/right shift detection on Windows (thanks Mike!) 2002-12-11 05:47:32 +00:00
Sam Lantinga
d1a8d6261c Updated Atari port for new system headers (thanks Patrice!) 2002-12-07 06:54:47 +00:00
Sam Lantinga
f5fa76f848 Fixed compile error if there is no X11 shared memory support. 2002-12-07 06:51:03 +00:00
Sam Lantinga
d651d82abb From: Darrell Walisser
Subject: Re: [SDL] OS X and power save

Here ya go. This works just fine. One might complain that it doesn't
generate the event until after wake as completed (there is about 5
seconds between the screen coming up and the expose event), but I think
that's OK.
2002-12-07 06:48:49 +00:00
Sam Lantinga
957178f75d Linux joystick cleanups from Alan Swanson 2002-12-02 03:11:36 +00:00
Sam Lantinga
7548e315b5 There's a bug in the VC7 optimizer relating to the duff loop optimization 2002-12-02 02:40:58 +00:00
Sam Lantinga
a503d7728e *** empty log message *** 2002-12-02 02:35:58 +00:00
Sam Lantinga
1ab4ea9aa8 Doh! Compile error if there was no X11 shared image support 2002-12-02 01:47:03 +00:00
Sam Lantinga
918f1dc76c *** empty log message *** 2002-12-02 01:10:20 +00:00
Sam Lantinga
0c25ddcb03 *** empty log message *** 2002-11-24 20:44:08 +00:00
Sam Lantinga
f57b251bc5 Open ALSA devices in non-blocking mode (thanks Aleksey!) 2002-11-17 20:02:26 +00:00
Sam Lantinga
9135e95302 Open the ALSA devices in non-blocking mode (thanks Aleksey!) 2002-11-17 20:01:54 +00:00
Sam Lantinga
a123c3e5f9 Updated for DirectDB 0.9.15 (thanks Denis!) 2002-11-17 19:36:49 +00:00
Sam Lantinga
5ed21ba69a Save the full pathname for stdout.txt and stderr.txt 2002-11-17 19:30:44 +00:00
Sam Lantinga
481bcc8000 Fixed bsd joystick detection ... again (thanks Wilbern) 2002-11-17 19:03:05 +00:00
Sam Lantinga
182dde0319 *** empty log message *** 2002-11-17 18:59:10 +00:00
Sam Lantinga
f5e10fed3b *** empty log message *** 2002-11-17 17:56:14 +00:00
Sam Lantinga
314e6e07e9 Support 1-bit alpha on surfaces passed to SDL_WM_SetIcon() (thanks Glenn!) 2002-11-17 17:55:45 +00:00
Sam Lantinga
06ea1caf17 Greatly improved X11 DGA video speed (thanks Cezary!) 2002-11-09 06:20:46 +00:00
Sam Lantinga
6b36d7ea48 Added MMX audio mixing code for gcc (thanks Stephane!) 2002-11-09 06:13:28 +00:00
Sam Lantinga
9cdb9f7cfd Added support for testing video flipping with graywin.c 2002-11-09 05:52:49 +00:00
Sam Lantinga
d349fa9828 *** empty log message *** 2002-11-09 05:51:13 +00:00
Sam Lantinga
ffcfc2f062 Fixed potential dropped events under DirectInput 2002-11-09 05:47:24 +00:00
Sam Lantinga
1b0f9865ec Fixed alpha blending bug (thanks Glenn!) 2002-10-22 21:41:21 +00:00
Sam Lantinga
9d462a34f7 Turn on enums always ints for CodeWarrior (thanks Darrell!) 2002-10-22 21:35:49 +00:00
Sam Lantinga
e8e0ebf933 *** empty log message *** 2002-10-20 00:15:33 +00:00
Sam Lantinga
5130675c66 Return an error with color fills on less than 8 bpp surfaces. 2002-10-15 05:22:50 +00:00
Sam Lantinga
0dcb9d0c4e Fixed joystick detection problem on Windows XP (thanks Maciej!) 2002-10-15 04:26:20 +00:00
Ryan C. Gordon
f5c21170db Added check for AMD x86-64 ("Hammer") architecture in byte order determination. 2002-10-14 05:05:04 +00:00
Sam Lantinga
392ac3b23b *** empty log message *** 2002-10-11 08:45:07 +00:00
Sam Lantinga
731a94f597 Removed unused function declarations 2002-10-11 08:41:48 +00:00
Sam Lantinga
8de527e64d Fixed mouse warp position bug with offset video modes 2002-10-11 08:09:26 +00:00
Sam Lantinga
d85c592155 Fixed a crash blitting RLE surfaces to RLE surfaces 2002-10-11 07:56:36 +00:00
Sam Lantinga
b6cc3d40b7 Removed an unnecessary header 2002-10-11 07:55:22 +00:00
Sam Lantinga
c0c0ed11bc *** empty log message *** 2002-10-08 16:29:01 +00:00
Sam Lantinga
aed8de3812 Fixed windows event handling for ActiveX controls (thanks Huib-Jan!) 2002-10-08 16:25:23 +00:00
Sam Lantinga
f6643a40a7 Updated the Project Builder stationary with SDLMain.* 2002-10-08 15:48:21 +00:00
Sam Lantinga
25750d0f2e Added Visual C++ 7 (.NET) projects (thanks James!) 2002-10-08 15:43:40 +00:00
Sam Lantinga
fd1c7f246f Bumped version to 1.2.6 in CVS 2002-10-08 15:34:19 +00:00
Sam Lantinga
a6bbfe8244 *** empty log message *** 2002-10-07 15:36:32 +00:00
Sam Lantinga
6536ceb29f Fixed compiler warning 2002-10-07 15:19:34 +00:00
Sam Lantinga
1df07d56fb Fixed building timer code on Windows CE 2002-10-07 15:19:17 +00:00