Commit graph

517 commits

Author SHA1 Message Date
Sam Lantinga
abec9e44fa Fixed bug #815
Daniele Forghieri      2009-10-12 02:57:03 PDT

Patch to use stdlib.h with Open Watcom

Open Watcom 1.8 has <stdlib.h> so instead of patch the single part when stdlib
features are used we use directly the include file as with GCC.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404318
2009-12-15 20:14:50 +00:00
Ryan C. Gordon
820021226c Added a warning comment to SDL_putenv().
"Fixes" Bugzilla #779.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404316
2009-12-15 18:00:16 +00:00
Sam Lantinga
9f5a112e87 Add a dummy function if SDL doesn't have STDIO support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404313
2009-12-15 05:34:58 +00:00
Sam Lantinga
0158b925d3 The SDL 1.3 tests have been cleaned up not to include any 1.2 compatibility code.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404309
2009-12-14 23:29:37 +00:00
Sam Lantinga
21611bcf67 The SDL_PaletteWatch structure is really internal-only.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404303
2009-12-13 08:00:25 +00:00
Sam Lantinga
e0e5f49b6a Name the audio callback for documentation clarity.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404302
2009-12-13 06:21:22 +00:00
Sam Lantinga
4b9d4ff36a Minor documentation fix
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404298
2009-12-12 20:30:25 +00:00
Sam Lantinga
d86e44de65 Switch to mixed case for consistency with other enumerations
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404280
2009-12-10 08:28:26 +00:00
Sam Lantinga
8ee9720297 Added interfaces for batch drawing of points, lines and rects:
SDL_DrawPoints()
    SDL_BlendPoints()
    SDL_BlendLines()
    SDL_DrawLines()
    SDL_FillRects()
    SDL_BlendRects()
    SDL_RenderPoints()
    SDL_RenderLines()
    SDL_RenderRects()
Renamed SDL_RenderFill() to SDL_RenderRect()

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404279
2009-12-09 15:56:56 +00:00
Sam Lantinga
52f2433c29 Added an API function to query geometry of multiple monitors:
SDL_GetDisplayBounds()

Implemented multi-monitor window positions on Windows

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404271
2009-12-06 08:03:38 +00:00
Sam Lantinga
e7a9fc5a82 Made the window flag comments more consistent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404266
2009-12-05 05:13:17 +00:00
Sam Lantinga
1f1d8b4e67 Added related functions
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404265
2009-12-05 04:39:59 +00:00
Sam Lantinga
1cd715e9db Work in progress on multi-display support:
* Added display parameter to many internal functions so video modes can be set on displays that aren't the public current one.
* The fullscreen mode is associated with fullscreen windows - not displays, so different windows more naturally have a mode associated with them based on their width and height.  It's no longer necessary to specify a fullscreen mode, a default one will be picked automatically for fullscreen windows.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404241
2009-12-01 05:57:15 +00:00
Sam Lantinga
215689096f Joe 2009-11-23 21:31:10 PST
If type is ::SDL_HAPTIC_CARTESIAN, direction is encoded by three positions
367     *  (X axis, Y axis and Z axis (with 3 axes)).  ::SDL_HAPTIC_CARTESIAN
uses
368     *  the first three \c dir parameters.  The cardinal directions would
be:
369     *   - North:  0,-1, 0
370     *   - East:  -1, 0, 0
371     *   - South:  0, 1, 0
372     *   - West:   1, 0, 0

typedef struct SDL_HapticDirection
{
    Uint8 type;         /**< The type of encoding. */
    Uint16 dir[3];      /**< The encoded direction. */
} SDL_HapticDirection;

An unsigned int can't store negative values and I don't see an alternate way to
encode them in the docs or source. The best I have been able to come up with is
using a negative magnitude for the effect but this will only get me 2 of the 4
quadrants in the plane for 2d effects. I looked at the win32 and linux
implementations and I believe is is safe to use signed ints in the direction
struct. I am unfamiliar with the darwin haptics API so I don't know if it is
safe.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404237
2009-11-27 19:29:27 +00:00
Sam Lantinga
88a5324d0d SDL_CreateWindowFrom() is actually going to be supported. :)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404234
2009-11-25 07:42:23 +00:00
Sam Lantinga
3dba28911a Clarified the windowID parameter
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404233
2009-11-25 06:24:15 +00:00
Sam Lantinga
6524589fad Eric Wing to Sam, hfutrell
This one is quite puzzling. I found a partial workaround, but I don't fully understand the reasons yet.

First, the console is complaining about not finding a nib for MainWindow.
I tried removing the entry for this in the info.plist, and the message went away, but it didn't really change anything.

Second, I stepped through this with the debugger and broke up some lines. It seems that the basic act of calling
       view = [SDL_uikitopenglview alloc];

or even
       view = [SDL_uikitview alloc]

will crash the program. The debugger messages plus the stack trace make me think it's not finding the SDL_uikitview classes for some reason. But I don't understand why this would be.

view = [UIView alloc] will not crash the program.

For kicks, I added a new definition of a class called SDL_object which subclasses NSObject in the same files as SDL_uikitopenglview and then call
       view = [SDL_object alloc];

This does not crash the program.

So, then I modified SDL_object to subclass UIView. No crash.

Next, I made SDL_object subclass UIView<UITextFieldDelegate> . This crashes.

So it is the act of conforming to the UITextFieldDelegate protocol that is crashing things.

I don't understand why it would crash on alloc though. I'm guessing either a delegate needs to be set somewhere or one of the required methods needs to be implemented. But in the former case, I would not expect a crash, but a silent message to nil and something else doesn't work. And in the latter case, I would expect a compiler warning and an exception thrown instead of a crash.

Anyway, my temporary workaround is to change the interface declaration for SDL_uikitview to look like:

#if SDL_IPHONE_KEYBOARD
@interface SDL_uikitview : UIView<UITextFieldDelegate> {
#else
@interface SDL_uikitview : UIView {
#endif

And then disable the keyboard support in the SDL_config_iphoneos.h file.
/* enable iPhone keyboard support */
#define SDL_IPHONE_KEYBOARD 0


-Eric

On Nov 23, 2009, at 1:43 AM, Sam Lantinga wrote:

> I ran into a blocking startup crash with the Happy demo on iPhone OS 3.1.2 on my new iPhone:
>
> #0    0x323fea14 in _class_isInitialized
> #1    0x323fea68 in _class_initialize
> #2    0x32403e92 in prepareForMethodLookup
> #3    0x32401244 in lookUpMethod
> #4    0x323fea10 in _class_lookupMethodAndLoadCache
> #5    0x323fe746 in objc_msgSend_uncached
> #6    0x323feb26 in _class_initialize
> #7    0x323fea58 in _class_initialize
> #8    0x32403e92 in prepareForMethodLookup
> #9    0x32401244 in lookUpMethod
> #10   0x323fea10 in _class_lookupMethodAndLoadCache
> #11   0x323fe746 in objc_msgSend_uncached
> #12   0x000554dc in UIKit_GL_CreateContext at SDL_uikitopengles.m:103
> #13   0x0004f89e in SDL_GL_CreateContext at SDL_video.c:3155
> #14   0x000579e8 in GLES_CreateRenderer at SDL_renderer_gles.c:282
> #15   0x0004d7b8 in SDL_CreateRenderer at SDL_video.c:1509
> #16   0x00002bc2 in SDL_main at happy.c:156
> #17   0x000571b2 in -[SDLUIKitDelegate postFinishLaunch] at
> SDL_uikitappdelegate.m:77
> #18   0x313f9ef2 in __NSFireDelayedPerform
> #19   0x32567bb2 in CFRunLoopRunSpecific
> #20   0x3256735c in CFRunLoopRunInMode
> #21   0x32912cbe in GSEventRunModal
> #22   0x32912d6a in GSEventRun
> #23   0x32b6276e in -[UIApplication _run]
> #24   0x32b61472 in UIApplicationMain
> #25   0x00057088 in main at SDL_uikitappdelegate.m:50
>
> Any ideas?
>
> See ya!
> --
>       -Sam Lantinga, Founder and President, Galaxy Gameworks LLC

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404228
2009-11-24 08:12:32 +00:00
Sam Lantinga
263c9febad Made the comment actually mean something. :)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404224
2009-11-22 20:00:00 +00:00
Sam Lantinga
82d400ccd4 Scott to slouken
Heres the wiz patch and additional files. (I think I got everything)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404177
2009-11-17 04:53:15 +00:00
Sam Lantinga
0f620b7fe4 You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
This code still doesn't quite work yet. :)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404174
2009-11-16 07:13:07 +00:00
Sam Lantinga
ea4fb3a1a4 Added a utility function to convert blocks of pixels
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404172
2009-11-15 09:21:46 +00:00
Sam Lantinga
fbaee18c6d Fixed gcc warning
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404164
2009-11-09 15:12:31 +00:00
Sam Lantinga
15e287332f Fixed bug #878
Jack Jansen      2009-11-05 14:20:22 PST

I'm building "fat" SDL 1.3 libraries for MacOSX, but now I am running into the
issue that audio does not work on PowerPC macintoshes if you build the library
on an Intel.

The problem is that configure hard-codes the byteorder, which is then stored in
SDL_config.h

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404162
2009-11-09 04:13:51 +00:00
Sam Lantinga
1cbfd5b6e0 Partial fix for bug #859
Header file update from Ken for improved doxygen output

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404127
2009-10-19 13:31:58 +00:00
Sam Lantinga
7df7cdde39 Merged improvements to SDL_SoftStretch() from SDL 1.2
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404113
2009-10-18 17:49:40 +00:00
Sam Lantinga
f2ae715bf4 iPhone interruption patch / SDL 1.3
Eric Wing to Sam

I've been sitting on this too long. I need to push.
It's untested because of the unrelated crashing bug I've been experiencing.
Also have a fix for SIZEOF_VOIDP in the config for both iPhone and Mac.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404102
2009-10-17 07:36:45 +00:00
Sam Lantinga
14343daa51 We don't need dlvsym() for ALSA anymore, yay!
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404075
2009-10-13 07:02:19 +00:00
Sam Lantinga
abf5cb8c2f Adapted from Debian patch: 215_kfreebsd_gnu.diff
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404023
2009-10-10 09:36:12 +00:00
Sam Lantinga
7075c8391a Made typedef for SDL_bool the same as the other typedefs.
If this causes problems on any compiler, please report a bug to
http://bugzilla.libsdl.org/
and include the platform and version of compiler you're using.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404021
2009-10-10 09:22:20 +00:00
Sam Lantinga
1d0273bd6e Eric Wing to Sam
Also noticed the SDL.h header in 1.3 didn't have the /** for the methods while testing. Attached is a quick fix patch.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403978
2009-10-06 03:34:10 +00:00
Sam Lantinga
e66e17ea31 Fixed bug #826
Ken Bull      2009-10-04 09:51:30 PDT

2009/10/4 E. Wing <ewmailing@gmail.com>:
> Hi Kenneth,
> I noticed that SDL_SetColorKey and SDL_GetColorKey start with
> /*
> instead of
> /**
> in SDL_Surface.h in SDL 1.3.
>
> I haven't scrutinized the headers and I don't know if you had an
> automated process to add these, but I thought I would let you know in
> case there might be others that have the same problem.
>
> Thanks,
> Eric
>

The attached patch corrects this and other documentation errors in
SDL_surface.h

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403966
2009-10-04 19:14:30 +00:00
Sam Lantinga
a305eb8541 Fixed bug #777
Implemented SDL_GetPlatform()

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403911
2009-09-26 10:32:14 +00:00
Sam Lantinga
36ff6e0aff Whoops, need both the header and the library!
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403867
2009-09-21 11:31:28 +00:00
Sam Lantinga
642078cce6 Fixed bug #714
fuzzyTew@gmail.com      2009-03-14 15:18:45 PDT

patch to change HAVE_ICONV to HAVE_ICONV_H

There are two separate iconv checks in configure -- one for the header file and
one for the library.  include/SDL_stdinc.h uses the library define to see
whether or not it should reference the types defined in the header, which
naturally breaks if the library exists and the header does not.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403863
2009-09-21 11:04:01 +00:00
Sam Lantinga
bfb982d926 Fixed bug #615
Scott McCreary      2008-08-21 10:48:14 PDT

This patch adds support for Haiku.
http://ports.haiku-files.org/browser/haikuports/trunk/media-libs/libsdl/SDL-1.2.13-haiku.diff
Haiku is an open-source recreation of BeOS.  It has better POSIX compliance
than beOS did, and other improved features, which in some cases causes us to
have to "undo" previous BeOS workarounds.
Here's our port log entry for it, showing the steps to force the changes into
configure and Makefile:
http://ports.haiku-files.org/wiki/media-libs/libsdl/1.2.13/1
Note that this was only tried on 1.2.13 stable so far.
Haiku is using a newer config.guess / config.sub that doesn't yet seem to be in
the released libtool, so we are having to copy it in for now.
http://haiku-files.org/files/optional-packages/

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403855
2009-09-21 09:21:00 +00:00
Sam Lantinga
ba55ec5f01 Oh yeah, we have GLX support too.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403852
2009-09-21 09:02:05 +00:00
Sam Lantinga
d2a37d9894 Fixed bug #577
Pierre Phaneuf      2008-05-01 10:29:16 PDT

SDL_VIDEO_DRIVER_X11 is not defined in SDL_config_macosx.h

There's a number of SDL_VIDEO_DRIVER_xxx defined in SDL_config_macosx.h, but
not that one, even though it is actually present.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403850
2009-09-21 08:40:04 +00:00
Sam Lantinga
4b968e37fc Removed outdated Atari support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403828
2009-09-20 04:15:19 +00:00
Sam Lantinga
d4f133c2bf Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403823
2009-09-19 13:29:40 +00:00
Sam Lantinga
948c701041 Removed outdated VGL support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403817
2009-09-19 07:30:29 +00:00
Sam Lantinga
5e78005b86 Removed outdated wscons support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403816
2009-09-19 07:28:59 +00:00
Sam Lantinga
b02edf2009 Removed outdated Nano-X support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403815
2009-09-19 07:26:51 +00:00
Sam Lantinga
351e3d48d9 Removed outdated OS/2 support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403814
2009-09-19 07:22:07 +00:00
Sam Lantinga
232c747269 Removed outdated Dreamcast support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403813
2009-09-19 07:21:22 +00:00
Sam Lantinga
76d2bc3e7f Removed outdated OS/2 support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403810
2009-09-19 06:43:45 +00:00
Sam Lantinga
303667b4b7 Removed outdated iPodLinux support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403809
2009-09-19 06:24:07 +00:00
Bob Pendleton
11921a8b7d The new, cleaner, version of the atomic operations. The dummy code is what you should start working with to port atomic ops.
The linux code appears to be complete and *should* be the base of all Unix and GCC based versions. The macosx and win32 versions
are currently just copies of the dummy code. I will begin working on the windows version as soon as this check in is done. I
need someone to work on the Mac OS X version.

I'm afraid that this check in will break QNX (Sorry!)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403802
2009-09-17 20:35:12 +00:00
Sam Lantinga
700b3bb677 Merged Martin's code changes from Google Summer of Code 2009
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403787
2009-09-07 04:51:29 +00:00
Sam Lantinga
d036689ab0 Fixed issues building 64-bit Windows binary
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403783
2009-09-05 23:37:35 +00:00
Sam Lantinga
633d710201 CD-ROM support is so passé :)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403773
2009-09-05 09:11:03 +00:00