Commit graph

1004 commits

Author SHA1 Message Date
Sam Lantinga
1da8cb0143 Use only safe string functions
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401383
2006-02-19 23:46:34 +00:00
Sam Lantinga
a81db3ea34 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401382
2006-02-19 23:38:57 +00:00
Sam Lantinga
db567afe4b sprintf should have been snprintf
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401379
2006-02-19 18:46:58 +00:00
Sam Lantinga
4d1cb0597e *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401377
2006-02-19 16:42:18 +00:00
Sam Lantinga
0449d3bfca Fixes for BeOS and Solaris builds
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401371
2006-02-17 08:43:23 +00:00
Sam Lantinga
d3805eef09 New configure-based build system. Still work in progress, but much improved
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401365
2006-02-16 10:11:48 +00:00
Sam Lantinga
963b18d7ec *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401363
2006-02-10 07:03:22 +00:00
Sam Lantinga
684909fae2 More header massaging... works great on Windows. ;-)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401362
2006-02-10 06:48:43 +00:00
Sam Lantinga
c882586f78 Fixed build problem with SDL_string.c
Officially deprecated SDL_byteorder.h, SDL_getenv.h and SDL_types.h
Moved endian-related SDL_rwops code into SDL_rwops.c

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401358
2006-02-09 09:38:05 +00:00
Ryan C. Gordon
6c427bdf5c Changed X11 header order so it works on Solaris.
Fixes Bugzilla #138.

--ryan.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401355
2006-02-08 20:29:12 +00:00
Patrice Mandin
83e8409a41 Fixes for new SDL embedded libc stuff
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401354
2006-02-08 18:59:49 +00:00
Sam Lantinga
fc0f66b503 Date: Mon, 6 Feb 2006 11:41:04 -0500
From: "mystml@adinet.com.uy"
Subject: [SDL] ALT-F4 using DirectX

My game isn't getting SDL_QUIT when I press ALT-F4 using the DirectX
driver; it does get SDL_QUIT when I press the red X in the window.

I tracked this down to DX5_HandleMessage() in SDL_dx5events.c;
WM_SYSKEYDOWN is being trapped and ignored which causes Windows not to post
a WM_CLOSE, hence no SDL_QUIT is being generated.

The relevant code is this :

                /* The keyboard is handled via DirectInput */
                case WM_SYSKEYUP:
                case WM_SYSKEYDOWN:
                case WM_KEYUP:
                case WM_KEYDOWN: {
                        /* Ignore windows keyboard messages */;
                }
                return(0);

If I comment the WM_SYSKEYDOWN case, it falls through DefWindowProc() and
ALT-F4 starts working again.

I'm not sure about the best way to fix this. One option is handling ALT-F4
as a particular case somehow, but doesn't sound good. Another option would
be to handle WM_SYSKEYDOWN separately and breaking instead of returning 0,
so processing falls through and goes to DefWindowProc which does The Right
Thing (TM). This seems to be the minimal change that makes ALT-F4 work and
normal keyboard input continues to work.

Does this sound reasonable? Am I overlooking anything? Do I submit a patch?

--Gabriel

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401352
2006-02-08 17:19:43 +00:00
Sam Lantinga
940b39882a Default to build SDL without MSVCRT
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401350
2006-02-08 08:55:33 +00:00
Sam Lantinga
80444aefd9 Fixes for Visual C++ 6.0
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401349
2006-02-07 18:36:54 +00:00
Sam Lantinga
3a030bf60f G:\SDL-12-CVS\src\video\math_private.h(171) : error C4226:
nonstandard extension used : 'huge' is an obsolete keyword

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401348
2006-02-07 17:49:40 +00:00
Sam Lantinga
312ed38701 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401347
2006-02-07 17:46:19 +00:00
Sam Lantinga
6c005e80c2 Fixed it Hayashi Naoyuki's way. :)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401346
2006-02-07 12:15:46 +00:00
Sam Lantinga
78516b5663 Configure dynamically generates SDL_config.h
I'm still wrestling with autoheader, but this should work for now...
Fixed lots of build problems with C library support disabled

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401345
2006-02-07 12:11:33 +00:00
Ryan C. Gordon
dd8d77d906 Faster fades when changing to/from/between fullscreen modes on Mac OS X. Also,
it doesn't show the desktop between modes anymore.

 Fixes Bugzilla #100.

--ryan.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401344
2006-02-07 11:18:21 +00:00
Sam Lantinga
c5c8f9447a *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401343
2006-02-07 10:40:14 +00:00
Sam Lantinga
09cd73f1b5 Removed uses of stdlib.h and string.h
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401342
2006-02-07 09:29:18 +00:00
Sam Lantinga
098fe1b8e9 Don't touch code that we brought in from other sources
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401341
2006-02-07 07:03:29 +00:00
Sam Lantinga
5d53175e4d Use SDL_ prefixed versions of C library functions.
FIXME:
Change #include <stdlib.h> to #include "SDL_stdlib.h"
Change #include <string.h> to #include "SDL_string.h"
Make sure nothing else broke because of this...

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401340
2006-02-07 06:59:48 +00:00
Sam Lantinga
8b467b1a53 Proper credit to uClibc :)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401338
2006-02-06 17:26:47 +00:00
Sam Lantinga
16adab89bf *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401337
2006-02-06 08:58: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
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
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
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