Commit Graph

1989 Commits

Author SHA1 Message Date
Sam Lantinga
8ea99c7b4e There's a bug with gcc 4.4.1 and -O2 where srcp doesn't get the correct value after the first scanline. Ugh. 2009-10-18 23:21:15 +00:00
Sam Lantinga
890a3b9f25 Merged improvements to SDL_SoftStretch() from SDL 1.2 2009-10-18 17:49:40 +00:00
Sam Lantinga
baf302ec39 Fixed bug #853
Ludwig Nussel      2009-10-18 05:34:18 PDT

src/joystick/linux/SDL_sysjoystick.c has some problems:

- test_bit() might break with strict aliasing
- test_bit() assumes array is Uint32 but its actually "unsigned long"
  on 64bit systems sizeof(long) != sizeof(Uint32).
- the keybit array is too small
- the arrays are unitialized so the number of
  detected buttons is quite random
2009-10-18 16:14:35 +00:00
Sam Lantinga
0874c3ae84 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.
2009-10-17 07:36:45 +00:00
Mike Gorchak
5d837d169e Working on fullscreen video modes support 2009-10-13 20:17:11 +00:00
Mike Gorchak
b098c35b96 All 2D operations in Photon driver have been finished. The driver is ready to use. There fullscreen modes and YUV textures are rest only. 2009-10-13 11:26:40 +00:00
Mike Gorchak
8d81134bc6 Fixed SDL_BLENDMODE_MASK for GL and GLES renderers, now blending works like in software renderer. 2009-10-13 06:51:20 +00:00
Mike Gorchak
04dc33353c Fixed OpenGL ES primitive alpha blending. 2009-10-13 06:28:31 +00:00
Mike Gorchak
8554a00051 Initial support for fullscreen application modes. 2009-10-12 19:47:01 +00:00
Mike Gorchak
6bf136c551 Photon SDL renderer almost finished, the double/tripple buffering is left only. 2009-10-12 11:45:01 +00:00
Sam Lantinga
46d753c1c0 Joystick patch from FreeBSD ports system 2009-10-12 09:42:50 +00:00
Mike Gorchak
efaf0e3ff1 Continue working on 2D support in Photon. 2009-10-12 08:21:43 +00:00
Mike Gorchak
db200ea8ad Continue working on 2D support in Photon 2009-10-11 18:45:39 +00:00
Mike Gorchak
45dab6140e Continue working on 2D support for Photon/QNX. 2009-10-10 20:15:20 +00:00
Sam Lantinga
44e7c1bd41 Debian patch: 218_joystick_memmove.diff 2009-10-10 10:02:17 +00:00
Sam Lantinga
f694f1de5e Whoops, FreeBSD 6.2 doesn't define __FreeBSD_kernel_version 2009-10-10 09:44:04 +00:00
Sam Lantinga
73b823bca8 Adapted from Debian patch: 215_kfreebsd_gnu.diff 2009-10-10 09:36:12 +00:00
Mike Gorchak
61a236b4a6 Support for the atomic operations for ARM, PPC, MIPS, SH, X86 platforms has been added. 2009-10-10 08:06:18 +00:00
Sam Lantinga
447cbc2563 Fixed bug #627
Increased accuracy of alpha blend calculation
2009-10-10 07:48:57 +00:00
Ryan C. Gordon
3842b74b75 Merged r4990:4991 from branches/SDL-1.2: ALSA 1.0 API and dlvsym() removal. 2009-10-10 07:34:15 +00:00
Sam Lantinga
f81eec596a typo 2009-10-10 06:51:42 +00:00
Sam Lantinga
a12027a028 Fixed bug #814
Daniele Forghieri      2009-09-30 15:40:53 PDT

To compile the source in libm the variable huge must be renamed, I choose
huge_val

The patch attached change it so it compiles
2009-10-04 09:51:04 +00:00
Sam Lantinga
c75e149ac8 Fixed a bug where when the audio starts paused all the DirectSound buffers
will end up getting locked and never unlocked and sound will never play.

Added a FIXME for Ryan to look at, too. :)
2009-10-04 09:18:48 +00:00
Sam Lantinga
f272e1dd85 Adam Strzelecki to SDL
Since current DirectFB implementation is incomplete for YUV surfaces (actually causes segmentation faults when trying Lock and use YUV planar textures) I decided to fix it a bit.
Here's a patch that should make DirectFB properly support YUV both packed and planar (3 planes).

(1) Removed SDL_BYTESPERPIXEL at all in favor of DFB_BYTES_PER_PIXEL(SDLToDFBPixelFormat(fmt)) which does return always proper BPP for YUVs too, coz SDL_BYTESPERPIXEL returns incorrect values for FOURCCs
(2) Fixed data->pixels allocation for planar YUVs in CreateTexture, it should allocate 150% more space
(3) Copy other planes for planar YUVs in UpdateTexture
(4) Moved checking if format is supported at all with DirectFB on CreateTexture at the beginning of the code

Waiting for comments,
--
Adam Strzelecki | nanoant.com
2009-10-04 04:03:37 +00:00
Sam Lantinga
63382d1cee [SDL] Bad math in SDL_RenderCopy
Mason Wheeler to sdl

When I tried to render an image using something other than NULL for srcrect, it got horribly distorted.  I traced it down to the fact that the math in the rectangle adjustments performed just before the call to renderer->RenderCopy is written inside out.  It should look like this:

       if (dstrect->w != real_dstrect.w) {
           int deltax = (dstrect->x - real_dstrect.x);
           int deltaw = (dstrect->w - real_dstrect.w);
           real_srcrect.x += (deltax * real_srcrect.w) / dstrect->w;
           real_srcrect.w += (deltaw * real_srcrect.w) / dstrect->w;
       }
       if (dstrect->h != real_dstrect.h) {
           int deltay = (dstrect->y - real_dstrect.y);
           int deltah = (dstrect->h - real_dstrect.h);
           real_srcrect.y += (deltay * real_srcrect.h) / dstrect->h;
           real_srcrect.h += (deltah * real_srcrect.h) / dstrect->h;
2009-10-03 16:23:16 +00:00
Sam Lantinga
676f56294f Temporary band-aid for bug #575
It looks like newer kernels do the logical device mapping in the driver,
so this code crashes.  I don't have one of these nor do I have remote
access to debug this, so I'm disabling the logical mapping for now.
2009-09-29 00:42:21 +00:00
Sam Lantinga
8532c67014 -0.5 is causing trouble according to comments in bug #783 2009-09-28 15:32:58 +00:00
Sam Lantinga
2415433b1c Fixed bug #716
Armin Burgmeier      2009-03-15 04:35:45 PDT

When I hold a mouse button down on another (non-SDL) window, then move the
mouse over an SDL window and releasing the mouse button there, then the
application does not receive an SDL_ACTIVEEVENT with state SDL_APPMOUSEFOCUS
and gain 1.

Furthermore, SDL_GetAppState() reports the application not having mouse focus
until moving the mouse out of the window and back in again.
2009-09-27 23:24:58 +00:00
Sam Lantinga
f8c7e7df22 Fixed 32-bit build 2009-09-26 21:39:56 +00:00
Sam Lantinga
9134eb02ab Fixed bug #797
Ryan C. Gordon      2009-09-19 08:25:21 PDT

This line in SDL_iconv_string (src/stdlib/SDL_iconv.c) ...

        if (!fromcode || !*fromcode) {
            tocode = "UTF-8";
        }

Is probably supposed to assign to "fromcode" and not "tocode".
2009-09-26 10:36:55 +00:00
Sam Lantinga
bd908a682f Fixed bug #777
Implemented SDL_GetPlatform()
2009-09-26 10:32:14 +00:00
Sam Lantinga
497088d257 Fixed bug #766
Mason Wheeler      2009-07-06 14:29:47 PDT

This adds some missing error reporting for SDL_SelectRenderer, and cleans up the logic a little bit.
2009-09-26 10:22:35 +00:00
Sam Lantinga
9b2bca8c06 Fixed bug #765
Added SDL_SetError case for SDL_UNSUPPORTED
2009-09-26 10:19:19 +00:00
Sam Lantinga
d9b39c9a69 Fixed bug #764
Added better error checking from Mason Wheeler
2009-09-26 10:17:49 +00:00
Sam Lantinga
38c3f80d5f Fixed bug #761
Mason Wheeler      2009-07-05 09:28:33 PDT

This patch fixes two issues with SDL_CreateTextureFromSurface.

1.  If no renderer is available, the function will return 0 without calling
SDL_SetError. (It does this in other places as well, but it appears that in
these cases, SDL_SetError was already called by a previous function call.)
2.  Removal of a dead code block that checks for an impossible return value.
2009-09-26 10:13:44 +00:00
Sam Lantinga
8c5ed7b905 Fixed bug #734
Nicholas Phillips      2009-04-26 21:34:05 PDT

I am using x64 Linux (using Intel Core 2 DUO), and I have noticed that there is
an error in SDL_cpuinfo.c, function CPU_getCPUIDFeaturesExt for my platform.
2009-09-26 10:04:38 +00:00
Sam Lantinga
453bd99553 Fixed crash with right side up BMP files 2009-09-26 06:21:36 +00:00
Bob Pendleton
f84f69d047 fixed a spelling error in the documentation. 2009-09-25 19:26:21 +00:00
Bob Pendleton
7a2031a379 This version actaully should work on Windows. 2009-09-25 19:17:16 +00:00
Sam Lantinga
1764e75bcc Possibly fixed bug #601, definitely fixed a potential issue with threads
stopping and starting in rapid succession.
2009-09-23 06:37:27 +00:00
Bob Pendleton
10e2dbb79d oops 2009-09-21 22:25:14 +00:00
Bob Pendleton
ccf0c93d64 Should now compile on 32 bit linux and 64 bit linux 2009-09-21 22:23:41 +00:00
Sam Lantinga
6215039632 Fixed bug #570
SDL_SemWaitTimeout in src/thread/generic/SDL_syssem.c line 179 (SVN trunk):

--sem->count;

should be

if (retval == 0) {
    --sem->count;
}

Without this, sem->count will underflow on timeout effectively breaking the
semaphore. It appears that the implementation has been wrong since the initial
revision.
2009-09-21 07:35:06 +00:00
Sam Lantinga
7b286700e7 Fixed build on Mac OS X 10.4 2009-09-21 05:24:54 +00:00
Sam Lantinga
2bf654253f Fixed compatibility with SDL 1.2 pixel format (24 bits per pixel of color data with 4 bytes per pixel == 32 bpp) 2009-09-20 22:47:28 +00:00
Sam Lantinga
2d97efbd4d Removed outdated Atari support 2009-09-20 04:15:19 +00:00
Sam Lantinga
95c8f7a517 Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009 2009-09-19 13:29:40 +00:00
Sam Lantinga
ecd63ace78 I think this fixes the texture pixel alignment 2009-09-19 12:48:52 +00:00
Sam Lantinga
78130bd9c4 Removed outdated VGL support 2009-09-19 07:30:29 +00:00
Sam Lantinga
17fbad0010 Removed outdated wscons support 2009-09-19 07:28:59 +00:00