Commit graph

1419 commits

Author SHA1 Message Date
Sam Lantinga
064c583f72 Eliminate duplicate video modes
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401736
2006-05-08 04:19:03 +00:00
Sam Lantinga
c9fe6a7e45 SDL_strncpy doesn't exist
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401735
2006-05-08 03:49:51 +00:00
Sam Lantinga
e869c2f9b8 Date: Sun, 7 May 2006 19:22:33 -0400
From: Mike Frysinger
Subject: [SDL] [patch] fix building with DirectFB-0.9.25.1

another DirectFB release, another small bit of API breakage :)

this time around, DIKI_ALTGR has been removed and DIKI_ALT_R is supposed to be
used ... DIKI_ALT_R is not a new define, so there shouldnt be any need for
checking the DirectFB version ... it should work with older DirectFB's as
well

thanks to Sascha Schwarz for pointing this out on the Gentoo bugzilla:
http://bugs.gentoo.org/132571
-mike

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401734
2006-05-08 02:09:34 +00:00
Sam Lantinga
21a8ab74a3 Fixed bug #102
Improved GPM mouse protocol detection.
The original patch had a bunch of bugs, so I completely rewrote it to hopefully fix them, and to support more protocols.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401731
2006-05-07 06:20:39 +00:00
Sam Lantinga
3a0d72c6e5 Fixed bug #217
Sort the DirectX video modes largest to smallest

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401730
2006-05-07 04:02:48 +00:00
Sam Lantinga
b4ba6518d6 Fixed bug #215
The current SVN trunk is missing the SDLCALL specifier at numerous locations.

It has to be added for all (possibly user provided) callbacks.

I stumbled over this while creating a makefile for the OpenWatcom compiler for
Win32.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401728
2006-05-07 03:40:06 +00:00
Sam Lantinga
cab8a203a7 Fixed bug #80
Date: 21 Apr 2003 17:20:20 +0100
From: Alan Swanson <swanson@uklinux.net>
Subject: [SDL] New XFree 4.3 Video Mode Patch


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   ]=20
 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 working is
due to SDL scanning the modes in reverse getting X11 provided modes
modes with the lowest refresh.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401727
2006-05-05 05:50:26 +00:00
Sam Lantinga
572d530a66 Fixed bug #196
Use the title and icon stored in the SDL video info, when creating X11 windows.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401726
2006-05-05 05:09:10 +00:00
Sam Lantinga
732fcc2ab0 --HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401725
2006-05-04 16:52:53 +00:00
Sam Lantinga
daab242a93 Fixed bug #45
Improved Xinerama support.
Added support for the SDL_VIDEO_FULLSCREEN_HEAD environment variable, currently supported on X11 Xinerama configurations.
Only use the VidMode extension on the primary head.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401724
2006-05-04 16:51:07 +00:00
Sam Lantinga
b74b770864 Patch from Dmitry Yakimov to fix building on WinCE
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401719
2006-05-03 04:11:38 +00:00
Sam Lantinga
083bef0d9c Yeah, that's what I meant. :)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401716
2006-05-01 23:13:16 +00:00
Sam Lantinga
0526b1fc8a Using the SDL C runtime functions
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401715
2006-05-01 11:07:04 +00:00
Sam Lantinga
1a4e90b856 Date: Sun, 30 Apr 2006 14:20:05 +1000
From: Rob
Subject: [SDL] SDL pre-release

OpenGL fails on the zipped pre-release source accessible from
http://www.libsdl.org/svn.php.

Appears to be following lines in sdl_wing.c (lines 341-345):

wglext = (const char *)this->glGetString(GL_EXTENSIONS);
    if ( !SDL_strstr(wglext, "WGL_EXT_swap_control") ) {
        this->gl_data->wglSwapIntervalEXT = NULL;
        this->gl_data->wglGetSwapIntervalEXT = NULL;
    }

glGetString is a null pointer, as are other gl function pointers, so call
fails.  Never looked at sdl source before, so no further than that as yet.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401713
2006-05-01 07:15:35 +00:00
Sam Lantinga
c3d59105d9 SDL_dummy_main.c:12: warning: ISO C does not allow extra â;â outside of a function
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401711
2006-05-01 06:41:17 +00:00
Sam Lantinga
27fdaa8880 SDL_sysjoystick.c:983: warning: 'return' with a value, in function returning void
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401710
2006-05-01 06:40:00 +00:00
Patrice Mandin
39b3be9d6b Declare volatile variables modified by interrupt routines
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401709
2006-04-30 21:01:25 +00:00
Sam Lantinga
85028a30ad ------- Comment #1 From Max Horn 2006-04-17 03:08 [reply] -------
Created an attachment (id=106) [edit]
Patch for src/joystick/win32/SDL_mmjoystick.c

I am not even a Windows user, so take the following with a grain of salt:

SDL_mmjoystick.c  has a function GetJoystickName which obtains the joystick
name by looking at the registry. The way it does that seems very fishy to me.
Namely, it uses the parameter "index" to construct a registry value name (BTW,
those variables used in the code are really badly named). The value of "index"
in turn equals the current value of "numdevs", as called from
SDL_SYS_JoystickInit.

I read through the MSDN docs at
<http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarinput/html/msdn_extdirect.asp>,
and I believe the simple fix is to replace line 183 of said file
  SYS_JoystickName[numdevs] = GetJoystickName(numdevs, joycaps.szRegKey);
by the following:
  SYS_JoystickName[numdevs] = GetJoystickName(SYS_JoystickID[i],
joycaps.szRegKey);

However, that is only *hiding* the real issue. Problem is, the list of
joysticks as returned by windows may contains "gaps", and the code deals
incorrectly with that. Namely those gaps occur if joysticks are
removed/(re)added, as the reporter observed.

The attached patch fixes this and another (off-by-one) issue in the code. But
since I have no Windows machine, I can't even test-compile it, so use with
caution.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401706
2006-04-29 20:22:31 +00:00
Sam Lantinga
2efcd9c6dc --HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401705
2006-04-29 17:56:06 +00:00
Sam Lantinga
41c2e03aa4 Disable the XRandR extension by default, since KDE maximizes windows which are larger than the new resolution, and then doesn't restore their size and positition when the old resolution is restored.
The extension can be enabled with the environment variable SDL_VIDEO_X11_XRANDR=1

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401704
2006-04-29 17:54:32 +00:00
Sam Lantinga
42d0cb5f28 Fixed bug #101
If we lose focus at all, unlock the mouse.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401677
2006-04-27 10:44:43 +00:00
Sam Lantinga
5deaddd7c3 Fixed compile errors on Mac OS X
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401673
2006-04-27 09:08:44 +00:00
Sam Lantinga
37adc6aae8 Implemented bug #5
Added SDL_GL_ACCELERATED_VISUAL to guarantee hardware acceleration.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401672
2006-04-27 08:39:51 +00:00
Sam Lantinga
b32d3f9c24 Implemented bug #2, 117:
Date: Mon, 21 Mar 2005 12:06:14 +0100
From: Per Inge Mathisen
Subject: Re: [SDL] Outstanding patches?

The patch adds support for setting SDL_GL_SWAP_CONTROL to Windows and
X11. In Windows you can also query this enum to check that it is
working, or see what the default is - such functionality does not
exist in GLX. For more information on the standards implemented:
http://oss.sgi.com/projects/ogl-sample/registry/SGI/swap_control.txt
http://oss.sgi.com/projects/ogl-sample/registry/EXT/wgl_swap_control.txt

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401671
2006-04-27 07:59:16 +00:00
Sam Lantinga
a0fa14aca9 subversion conversion complete!
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401658
2006-04-26 20:30:11 +00:00
Sam Lantinga
d3375d8aba Mac OS X fat build works! :)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401655
2006-04-22 19:17:14 +00:00
Sam Lantinga
0923d2b9fc Added a note so I remember what the heck I was doing later. :)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401651
2006-04-17 07:03:13 +00:00
Sam Lantinga
0416307588 More general fix for bug #189
The clipping is done at a higher level, and the low level functions are
passed clipped rectangles.  Drivers which don't support source clipping
have not been changed, so the image will be squished instead of clipped,
but at least they will no longer crash when the destination rect was out
of bounds.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401650
2006-04-17 06:47:23 +00:00
Sam Lantinga
a4f336faee Fixed bug #189
Clip the overlay destination rectangle to the screen area on X11

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401649
2006-04-17 05:38:33 +00:00
Sam Lantinga
fccd61bcf4 Fixed bug #197
On servers with the composite extension enabled, visuals with 32-bit depth
have an alpha mask.  This is pretty neat, but SDL needs a bit more work to
handle these properly, so for now, we'll just use 24 bit depth visuals.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401648
2006-04-17 04:54:08 +00:00
Sam Lantinga
2072cdd857 Make sure code is only compiled if the appropriate subsystem is enabled
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401642
2006-04-14 04:46:47 +00:00
Sam Lantinga
1f2f61915e Fixed compile error
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401637
2006-04-13 14:27:58 +00:00
Sam Lantinga
9568645775 Fixed bug #55
From Christian Walther:
When writing my patch for #12, I ended up doing all sorts of changes to the way
application/window activating/deactivating is handled in the Quartz backend,
resulting in the attached patch. It does make the code a bit cleaner IMHO, but
as it might be regarded as a case of "if it ain't broken, don't fix it" I'd
like to hear other people's opinion about it. Please shout if some change
strikes you as unnecessary or wrong, and I'll explain the reasons behind it. As
far as I tested it, it does not introduce any new bugs, but I may well have
missed some.

- The most fundamental change (that triggered most of the others) is irrelevant
for the usual single-window SDL applications, it only affects the people who
are crazy enough to display other Cocoa windows alongside the SDL window (I'm
actually doing this currently, although the additional window only displays
debugging info and won't be present in the final product): Before, some things
were done on the application becoming active, some on the window becoming key,
and some on the window becoming main. Conceptually, all these actions belong to
the window becoming key, so that's what I implemented. However, since in a
single-window application these three events always happen together, the
previous implementation "ain't broken".

- This slightly changed the meaning of the SDL_APPMOUSEFOCUS flag from
SDL_GetAppState(): Before, it meant "window is main and mouse is inside window
(or mode is fullscreen)". Now, it means "window is key and mouse is inside
window (or mode is fullscreen)". It makes more sense to me that way. (See
http://developer.apple.com/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html
for a discussion of what key and main windows are.) The other two flags are
unchanged: SDL_APPACTIVE = application is not hidden and window is not
minimized, SDL_APPINPUTFOCUS = window is key (or mode is fullscreen).

- As a side effect, the reorganization fixes the following two issues (and
maybe others) (but they could also be fixed in less invasive ways):

* A regression that was introduced in revision 1.42 of SDL_QuartzVideo.m
(http://libsdl.org/cgi/cvsweb.cgi/SDL12/src/video/quartz/SDL_QuartzVideo.m.diff?r1=1.41&r2=1.42)
(from half-desirable to undesirable behavior):

Situation: While in windowed mode, hide the cursor using
SDL_ShowCursor(SDL_DISABLE), move the mouse outside of the window so that the
cursor becomes visible again, and SDL_SetVideoMode() to a fullscreen mode.
What happened before revision 1.42: The cursor is visible, but becomes
invisible as soon as the mouse is moved (half-desirable).
What happens in revision 1.42 and after (including current CVS): The cursor is
visible and stays visible (undesirable).
What happens after my patch: The cursor is invisible from the beginning
(desirable).

* When the cursor is hidden and grabbed, switch away from the application using
cmd-tab (which ungrabs and makes the cursor visible), move the cursor outside
of the SDL window, then cmd-tab back to the application. In 1.2.8 and in the
current CVS, the cursor is re-grabbed, but it stays visible (immovable in the
middle of the window). With my patch, the cursor is correctly re-grabbed and
hidden. (For some reason, it still doesn't work correctly if you switch back to
the application using the dock instead of cmd-tab. I haven't been able to
figure out why. I can step over [NSCursor hide] being called in the debugger,
but it seems to have no effect.)

- The patch includes my patch for #12 (it was easier to obtain using cvs diff
that way). If you apply both of them, you will end up with 6 duplicate lines in
SDL_QuartzEvents.m.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401636
2006-04-13 14:17:48 +00:00
Sam Lantinga
458c2abbc5 Fixed bug #179
SDL_SemValue() always returns 0. That's because the underlying POSIX
sem_getvalue() is implemented as a noop in Mac OS X. Apart from that,
semaphores do work properly (at least according to test/testsem), so I'm not
sure if this is worth fixing at all.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401634
2006-04-13 14:04:13 +00:00
Sam Lantinga
be0f0ff107 Fixes bug #195:
The proper name of Apple's operating system is "Mac OS X" not "MacOS X", as can
bee seen in many places, for example http://www.apple.com/macosx/). This
contrasts the naming of the old operating system, which was called "MacOS" and
today is often refered to as "MacOS Classic".

The attached patches fixes the misuse of the name "MacOS X" in both the SDL12
and sdlweb CVS modules.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401628
2006-04-13 13:08:26 +00:00
Sam Lantinga
20e18895f0 Patch from Alex to fix reverted code
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401624
2006-04-12 14:19:11 +00:00
Sam Lantinga
a3f6fa51eb *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401623
2006-03-31 06:30:16 +00:00
Sam Lantinga
403b4f89bd Date: Wed, 29 Mar 2006 17:26:55 +0200 CEST
From: "Fran���is Revol"
Subject: [SDL] BeOS port fix: PrintScreen key crashing

It seems the latest SDL crashes when someone hits the PrtScrn key in
ZETA (BeOS R6), somewhere it gets a negative value as key code (or a
big unsigned maybe ?), and uses it as an index in the keysym table...
I'll investigate the cause for the negative value, but it's always
better to check for bounds correctly when indexing a table. The
attached diff fixes it.

Fran���is Revol
--
Software Architect
yellowTAB GmbH

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401621
2006-03-31 06:16:20 +00:00
Sam Lantinga
26cb9c7c80 Fixed some ultra-pedantic gcc warnings
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401619
2006-03-24 06:10:24 +00:00
Ryan C. Gordon
fee3805600 SDL_X11_LoadSymbols() was reporting success when required symbols weren't
found!

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401617
2006-03-24 03:49:37 +00:00
Ryan C. Gordon
092d48fc0f Fixed compiler warning.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401616
2006-03-23 22:11:29 +00:00
Sam Lantinga
e847bdc465 Fixed bug #175
Removed obsolete .cvsignore files... whee!

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401612
2006-03-23 21:39:58 +00:00
Ryan C. Gordon
635e991de1 More dynamic X11 mangling...should fix NetBSD builds. And hopefully doesn't
break 6 other platforms.  :)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401606
2006-03-23 08:43:37 +00:00
Sam Lantinga
29098a80cb Need time.h for nanosleep too...
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401605
2006-03-23 08:37:36 +00:00
Sam Lantinga
2ac61483a9 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401603
2006-03-23 07:38:32 +00:00
Ryan C. Gordon
5969b6854f Updated my email address.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401600
2006-03-23 06:48:12 +00:00
Ryan C. Gordon
19882a1bfb Consolidate all the X11 libraries, so you don't have to update 12 different
places in the source when adding a new one. Also handles build systems that
 don't define a given library.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401598
2006-03-23 02:47:56 +00:00
Ryan C. Gordon
2c90fe6bf1 Close off warning about setAppleMenu on Mac OS X 10.4 SDK.
Fixes Bugzilla #97.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401596
2006-03-22 22:33:23 +00:00
Sam Lantinga
95e9bf51db Don't detect Altivec on MacOS X Intel
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401595
2006-03-22 22:29:44 +00:00
Ryan C. Gordon
be7a5193c8 Xrandr support in the X11 target.
Fixes Bugzilla #109, and as a bonus, Bugzilla #145, too!

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401594
2006-03-22 11:13:58 +00:00