Commit graph

1333 commits

Author SHA1 Message Date
Sam Lantinga
8bc08d11c7 Update from Alan Buckley
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401336
2006-02-06 08:47:44 +00:00
Sam Lantinga
ed90299388 A few fixes to get this building on Linux again
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401335
2006-02-06 08:46:14 +00:00
Sam Lantinga
6c3f928cd8 It's now possible to build SDL without any C runtime at all on Windows,
using Visual C++ 2005

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401334
2006-02-06 08:28:51 +00:00
Sam Lantinga
5372bfd326 Seek back to start on error
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401333
2006-02-04 22:01:44 +00:00
Sam Lantinga
2e0199fd76 Date: Sat, 04 Feb 2006 19:47:23 +0900
From: Hayashi Naoyuki
Subject: Re: [SDL] Character Composition problem on X

The compilation fails.
cc: Error: SDL_x11events.c, line 717: In this statement, "XK_dead_hook"
is not declared. (undeclared)
        ODD_keymap[XK_dead_hook&0xFF] = SDLK_COMPOSE;
-------------------^
cc: Error: SDL_x11events.c, line 718: In this statement, "XK_dead_horn"
is not declared. (undeclared)
        ODD_keymap[XK_dead_horn&0xFF] = SDLK_COMPOSE;

Neither XK_dead_hook nor XK_dead_horn are defined on Tru64.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401332
2006-02-04 16:29:22 +00:00
Sam Lantinga
83dd6ffbdd Resolved bug #130
Use XFilterEvent() to handle dead-key composition under X11
Cleaned up the code in preparation for 1.3 API changes

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401331
2006-02-04 08:35:11 +00:00
Sam Lantinga
2a89b508cf From: Hayashi Naoyuki
I tried to compile with gcc on Tru64, and got the following error.
SDL_systimer.c:45:45: error: operator '&&' has no right operand

It succeeds if changing
#if (defined _POSIX_TIMERS && _POSIX_TIMERS > 0)
to
#if (defined _POSIX_TIMERS && _POSIX_TIMERS + 0 > 0)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401329
2006-02-03 07:43:42 +00:00
Sam Lantinga
a50283a155 Resolve bug #120
Use the real executable's name for the window class, if it's available.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401328
2006-02-03 07:39:02 +00:00
Sam Lantinga
a7df9020de Favor using pthread_mutexattr_settype() on Linux.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401327
2006-02-03 06:33:54 +00:00
Sam Lantinga
17858398d5 Fixed compile warning
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401326
2006-02-03 06:01:23 +00:00
Patrice Mandin
f4ce91d5d6 Update for mintlib 0.57.6 (m68k-atari-mint libc)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401325
2006-02-02 21:27:24 +00:00
Sam Lantinga
69105bfa92 Date: Wed, 1 Feb 2006 18:20:33 -0800
From: Eric Wing
Subject: SDL/Universal Binary updates

Hi Sam,
Attached is a big set of changes to the Xcode projects to support
Universal Binaries. I have also included .dmgs that include the
prebuilt frameworks.

Ryan, I also updated SMPEG which is also in the package.

The SDL and smpeg binaries were built against the CVS version (pulled
maybe a month ago?).

I do not have an Intel Mac to test on so I have no idea if this stuff
actually works. However, Christian Walther has been a big help in
testing 10.2.8 and 10.3.9 so I'm fairly confident we got the build
settings correct for at least PPC.

I have attempted to document the important things for producing these
Universal Binaries. Documentation is somewhat scattered through out
everything, but there is a big centralized piece of documentation in
the UniversalBinaryNotes.rtf in the SDL.dmg.

As far as Universal Binaries are concerned, the big things were:
- Build with gcc 3.3 on PPC, 4.0 on Intel.
- We couldn't get any of the MMX/SSE code to compile/link (SDL and
smpeg).
- All 3rd party dependencies had to be rebuilt as Universal

There were also a bunch of non-Universal things that have been updated:
- I converted the SDL-satellites to create .dmg's instead of .pkg
installers
- Updated all 3rd party static libraries with current versions. (I
think libpng was the most dramatic going from 1.0.? to 1.2.8 with API
breakage. I haven't found any problems so far in doing this.)
- Changed some compiler optimization settings
- Finally updated the exports list for SDL_mixer
- Tried to include a static smpeg in SDL_mixer (multiple build
variants in Xcode project now)
- Enabled Altivec in SDL (we forgot to add the flags to Xcode last time)
- More documentation

Since so many things have changed, there might be new problems
introduced. The big issue I've found so far is with SDL_mixer. As I
mentioned on the mailing list, MP3's produce an assertion failure.
And the MikMod problem reported on Bugzilla continues to persist.

There's probably a bunch of other stuff I'm forgetting. There really
were hundreds of little things I mucked with so it's hard to remember
them all.

If you have any questions, feel free to ask.

Thanks,
Eric

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401324
2006-02-02 06:26:39 +00:00
Ryan C. Gordon
3ec23b39e1 AAlib driver was using C runtime string functions without including string.h.
Fixes Bugzilla #131.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401323
2006-02-02 05:35:42 +00:00
Ryan C. Gordon
1f6bc947a3 Logic bug in X11 Unicode input shutdown...was checking for == NULL
when it should be != NULL.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401322
2006-02-01 19:59:02 +00:00
Sam Lantinga
67ecc5318b Eliminate duplicate modes with different refresh rates
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401321
2006-02-01 09:28:42 +00:00
Sam Lantinga
a3a33b0acc Updated exports
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401320
2006-02-01 09:01:12 +00:00
Sam Lantinga
f96c07e0f4 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401319
2006-02-01 08:24:32 +00:00
Sam Lantinga
3a3a919df5 Merged useful fixes from 1.3 branch
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401318
2006-02-01 08:17:54 +00:00
Ryan C. Gordon
4c392943ac Fixed dynamic X11 for now, I think.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401317
2006-02-01 08:03:04 +00:00
Sam Lantinga
2fb09900d2 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401316
2006-02-01 07:12:14 +00:00
Sam Lantinga
eea4857268 Updated copyright information and removed rcs id lines (problematic in branch merges)
I batch edited these files, so please let me know if I've accidentally removed anybody's
credit here.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401315
2006-02-01 06:32:25 +00:00
Sam Lantinga
71bd9c65a3 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401314
2006-02-01 04:23:41 +00:00
Patrice Mandin
38fa054d3c Add flag to post mouse button events or not, and use defined function to post them
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401313
2006-01-31 21:33:35 +00:00
Sam Lantinga
323d0d149d Bah, I don't know what I'm doing.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401312
2006-01-31 19:46:26 +00:00
Sam Lantinga
0fffaabf20 Quit building the frigging F77 libtool configuration!
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401311
2006-01-31 19:40:25 +00:00
Sam Lantinga
d1ff42252a We're no longer doing compile checks on the X11 extensions which we include.
(Resolves bug #114)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401310
2006-01-31 19:09:09 +00:00
Ryan C. Gordon
dc8dc16fd6 Changed references to XFree86 to Xext to match change in directory structure.
Reference Bugzilla #116.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401309
2006-01-31 18:39:32 +00:00
Sam Lantinga
1310074b9a Reverted in favor of this one:
https://bugzilla.libsdl.org/attachment.cgi?id=3

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401308
2006-01-31 18:08:33 +00:00
Sam Lantinga
47251659fb XFree86 directory renamed to Xext
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401307
2006-01-31 17:56:44 +00:00
Sam Lantinga
f437ac4112 Date: Tue, 05 Jul 2005 21:43:26 +1000
From: Sean Childs
Subject: [SDL] Compiling SDL 1.2.8 with the free Borland compiler

When compiling SDL 1.2.8 with the free Borland compiler, I received this
error (there is a similar error that occurs in
src\video\windx5\sdl_dx5events.c):
Error E2342 ..\..\src\video\windib\sdl_dibevents.c 189: Type mismatch in
parameter 'lpPrevWndFunc' (wanted 'int (__stdcall *)()', got 'long
(__stdcall *)(void *,unsigned int,unsigned int,long)') in function
DIB_HandleMessage


I checked the MSDN library at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/
windowsuserinterface/windowing/windowprocedures/windowprocedurereference/wind
owprocedurefunctions/callwindowproc.asp

and it had this to say:
If STRICT is not defined, the lpPrevWndFunc parameter has the data type
FARPROC. The FARPROC type is declared as follows:

int (FAR WINAPI * FARPROC) ()

In C, the FARPROC declaration indicates a callback function that has an
unspecified parameter list. In C++, however, the empty parameter list in
the declaration indicates that a function has no parameters. This subtle
distinction can break careless code. Following is one way to handle this
situation:

#ifdef STRICT
   WNDPROC MyWindowProcedure
#else
   FARPROC MyWindowProcedure
#endif
...
   lResult = CallWindowProc(MyWindowProcedure, ...)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401306
2006-01-31 15:30:42 +00:00
Sam Lantinga
dd7245a17c Date: Sat, 14 Jan 2006 15:16:01 -0500
From: Andrew Fuller
Subject: [SDL] [PATCH] ML-8866 PS2->USB converter

This converter seems to go by several names --  Super Dual Box, Dual
USB Joypad, and who knows what else.  Also branded differently with
different colour cases, etc.  But it seems to all be the same
internals.  It is a common converter used for StepMania, with several
posts Googleable trying to make it work in Linux.  I got mine
yesterday and wanted to play stepmania, so I went ahead and made a
crude patch for libsdl to split this baby into two logical joysticks.

A couple notes about the patch:

This patch works well for two dance mats hooked up and playing
stepmania, however the mapping of the other buttons may be off.  I
have no joystick which uses all the buttons the converter reports, so
I have no way of testing them.

The name I used 0925:8866 which is the USB ID, and what SDLjoytest-GL
reported is the name, even though lsusb shows Wisegroup, Ltd MP-8866
Dual USB Joypad, and the existing virtual joystick mapping uses the
Wisegroup... name.  Not sure why the discrepency.

I'm not subscribed to this mailing list, so please CC me on any
comments to this.

-Andrew

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401305
2006-01-31 14:59:43 +00:00
Sam Lantinga
da27ab0763 Oops
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401304
2006-01-31 01:16:21 +00:00
Ryan C. Gordon
d56868ac0a Removed some old Mac OS X cruft.
Fixes Bugzilla #64.

--ryan.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401303
2006-01-30 18:56:30 +00:00
Ryan C. Gordon
a8366ab97d Corrects dynamic X11 code on Tru64 systems.
Fixes Bugzilla #87.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401302
2006-01-30 18:21:44 +00:00
Sam Lantinga
1432f548f2 This library is now available under the LGPL 2.1, the major change of which
is allowing linking with a shared object to be considered sufficient for
complying with section 6 of the LGPL.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401301
2006-01-30 14:27:56 +00:00
Sam Lantinga
3030ebfad9 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401300
2006-01-30 13:32:31 +00:00
Sam Lantinga
4218be9275 Fixed crash:
#include <SDL.h>

int main(int argc, char** argv)
{
        SDL_Init(SDL_INIT_EVERYTHING);
        SDL_SetVideoMode(640, 480, 0, SDL_FULLSCREEN);
        SDL_ShowCursor(SDL_DISABLE);
        SDL_Delay(1000);
        SDL_SetVideoMode(640, 480, 0, SDL_FULLSCREEN | SDL_OPENGL);
        SDL_Quit();
        printf("Everything okay\n");
}

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401299
2006-01-30 13:30:44 +00:00
Sam Lantinga
039ea90113 Date: Sun, 6 Mar 2005 17:06:20 +0100
From: Per Inge Mathisen
Subject: [SDL] Fullscreen refresh on win32

Windows has a terrible default for fullscreen 3D apps of 60mhz refresh
rate. This can be fixed  by the user by going into his driver's
control panel and forcing the refresh rate higher. However, this not a
very user friendly way about it, and in any case SDL contains no code
that could figure out this that condition has afflicted the user.

So the question is, could SDL fix this for the user? It is possible
under Windows to request a higher refresh rate. The danger is of
course that if the user has an old monitor, and you request a too high
refresh rate, the monitor could be damaged. However, I believe there
might be a way around that: Check before switching what refresh rate
the user's desktop runs in, and if our fullscreen dimensions are equal
or less than those of the desktop, use the higher refresh rate of 60
and the desktop rate.

Since most users run their desktops in the same or higher resolution
something sane, this should fix this problem for most users.

Thoughts?

An alternative is to add an SDL_GL_GetAttribute(SDL_GL_REFRESH_RATE)
option so that programs can bitch at their users at their own
convenience.

  - Per

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401298
2006-01-30 06:56:10 +00:00
Sam Lantinga
d2ded39e88 Date: Fri, 18 Feb 2005 20:49:35 +0200 (EET)
From: ville
Subject: [SDL] Changing, at least some, anonymous enums to named enums.

Howdy,

Could, some if not all, enums be named rather than being anonymous enums?
I ran into troubles with the enum describing event types in SDL_events.h.
The problem is that an anonymous enum cannot be used in C++ templates like
so:

enum { C };

template< typename T >
void
f( T ) {
}


f( C );

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401297
2006-01-29 23:14:04 +00:00
Sam Lantinga
ed6a111bc6 Added some useful command line arguments for testing
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401296
2006-01-29 23:06:05 +00:00
Sam Lantinga
838b802349 Fixed palette bug on non-WinCE
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401295
2006-01-29 22:23:54 +00:00
Sam Lantinga
e051a43d15 Only save the window position if we're in windowed mode
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401294
2006-01-29 22:09:26 +00:00
Sam Lantinga
b8df286813 The event code was fine, and calculated the SDL_windowX/Y correctly.
What we really needed to do was avoid doing client rect adjustment on
zoomed windows. :)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401293
2006-01-29 18:17:35 +00:00
Sam Lantinga
b49e57abdf Date: Fri, 18 Feb 2005 07:58:00 +0200
From: "Mike Gorchak"
Subject: [SDL] [PATCH] QNX6 and not only QNX6 fixes

1) Update SDL.qpg.in for the QNX 6.3.
4) video/photon/SDL_phyuv.c - fixed bug with swapped U and V planes, using
YV12 mode with radeon cards.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401292
2006-01-29 09:19:55 +00:00
Sam Lantinga
f708868dbd Cleaned up the app registration stuff a bit
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401291
2006-01-29 09:13:36 +00:00
Sam Lantinga
31d40ce879 Date: Tue, 15 Feb 2005 21:28:48 +0900 (JST)
From: "Michael Leonhard"
Subject: [SDL] resize bug on Win32 and patch

This is my first post to this mailing list.  In this email I will detail a
bug in the behavior of resizable SDL windows on Win32.  Then I will
explain the solution and provide a patch.

Symptoms:

Under Windows, an SDL display created with the SDL_RESIZABLE flag exhibits
quirky behavior when being maximized.  The window is resized to the proper
size, but it is shifted upwards about half the height of the title bar.
Similarly, a window whose origin is above the top of the screen will
spontaneously move its upper-left origin upon being resized.  After two
such resize-induced moves, the title bar will be entirely off the top edge
of the screen.  Subsequently, when the mouse is clicked and released on
the window border, the window will shrink its height spontaneously.  This
height shrinkage occurs even if the user did not resize the border.

To observe this curious situation, please invoke:
SDL-1.2.8/test/testwm.exe -resize

Cause:

A pair of integers, SDL_windowX and SDL_windowY, are defined in
video/wincommon/SDL_sysevents.c.  They are used by the DirectX video
driver and the DIB video driver:
video/windx5/SDL_dx5video.c
video/windib/SDL_dibvideo.c
As I understand the source code, the primary use of these variables is to
create a rectangle that represents the surface area in CLIENT SPACE.
Client space refers to a coordinate system that originates at the upper
left corner of a Win32 Window's drawable area.  This is just inside the
window border and title bar.  This client space rectangle, called bounds,
is subsequently converted to screen space with a call to
AdjustWindowRectEx.  The problem is found in SDL's handling of the
WM_WINDOWPOSCHANGED message.  According to MSDN,

  "The WM_WINDOWPOSCHANGED message is sent to a window whose
   size, position, or place in the Z order has changed as a
   result of a call to the SetWindowPos function or another
   window-management function."

I have confirmed that this message is indeed being sent to the SDL window
when the mouse is clicked on the window border, even if the window border
is not dragged.

In video/wincommon/SDL_sysevents.c, on line 464, in response to the
WM_WINDOWPOSCHANGED message, the (potentially) new client rectangle is
obtained.  This rectangle is translated into screen coordinates and THEN
assigned to the SDL_windowX and Y variables.  Thus screen coordinates are
being assigned to client coordinate variables.  Once this is understood,
the solution is apparent:  assign SDL_windowX and Y before translating the
rectangle to screen coordinates.  This is accomplished by the following
patch.

-Mike_L

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401290
2006-01-29 08:50:06 +00:00
Sam Lantinga
16857d624d Use the executable directory, not the current directory, for stdio output files
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401289
2006-01-29 08:39:35 +00:00
Sam Lantinga
baaae734d7 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401288
2006-01-29 08:19:27 +00:00
Sam Lantinga
dd2c4cfcfd Report both absolute and relative motion
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401287
2006-01-29 08:18:56 +00:00
Sam Lantinga
c6c791fee6 Date: Fri, 14 Jan 2005 21:52:46 +0100
From: "SkunkGuru"
Subject: [SDL] Repeated mousemotion event on notebook

it seems that every ~500ms something fires a mousemotion event,
but with the same x and y position.
I tryed with both directx and windib video driver.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401286
2006-01-29 08:18:06 +00:00