Commit graph

2144 commits

Author SHA1 Message Date
Sam Lantinga
3f36d970a0 From: "Alex Volkov"
Date: Thu, 10 Nov 2005 21:53:40 -0500
Subject: [SDL] BUG[?]: 32bpp RGBA->RGB colorkey blit, no SDL_SRCALPHA

It seems there is either a documentation vs. reality mismatch or a real bug
in SDL_blit_N.c:BlitNtoNKey().
The exact blit in question is a 32bpp RGBA->RGB, where RGBA has SDL_COLORKEY
and *no* SDL_SRCALPHA flags. The doc in SDL_video.h states:
* RGBA->RGB:
*     SDL_SRCALPHA not set:
*       copy RGB.
*       if SDL_SRCCOLORKEY set, only copy the pixels matching the
*       RGB values of the source colour key, ignoring alpha in the
*       comparison.

BlitNtoNKey(), however, forgets to "ignore alpha in the comparison". The
documentation makes perfect sense, so I think it is the code that is faulty.

The attached patch corrects the code.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401547
2006-03-15 15:43:15 +00:00
Sam Lantinga
3c69f94602 Fixed bug #15
SDL_blit_A.mmx-speed.patch.txt --
        Speed improvements and a bugfix for the current GCC inline mmx
        asm code:
        - Changed some ops and removed some resulting useless ones.
        - Added some instruction parallelism (some gain)
        The resulting speed on my Xeon improved upto 35% depending on
        the function (measured in fps).
        - Fixed a bug where BlitRGBtoRGBSurfaceAlphaMMX() was
        setting the alpha component on the destination surfaces (to
        opaque-alpha) even when the surface had none.

SDL_blit_A.mmx-msvc.patch.txt --
        MSVC mmx intrinsics version of the same GCC asm code.
        MSVC compiler tries to parallelize the code and to avoid
        register stalls, but does not always do a very good job.
        Per-surface blending MSVC functions run quite a bit faster
        than their pure-asm counterparts (upto 55% faster for 16bit
        ones), but the per-pixel blending runs somewhat slower than asm.

- BlitRGBtoRGBSurfaceAlphaMMX and BlitRGBtoRGBPixelAlphaMMX (and all
variants) can now also handle formats other than (A)RGB8888. Formats
like RGBA8888 and some quite exotic ones are allowed -- like
RAGB8888, or actually anything having channels aligned on 8bit
boundary and full 8bit alpha (for per-pixel alpha blending).
The performance cost of this change is virtually 0 for per-surface
alpha blending (no extra ops inside the loop) and a single non-MMX
op inside the loop for per-pixel blending. In testing, the per-pixel
alpha blending takes a ~2% performance hit, but it still runs much
faster than the current code in CVS. If necessary, a separate function
with this functionality can be made.

This code requires Processor Pack for VC6.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401546
2006-03-15 15:39:29 +00:00
Ryan C. Gordon
1d4a0106b4 Quartz implementation for SDL_DisplayYUVOverlay() was returning non-zero on
error, instead of zero, contrary to documentation.

    Fixes Bugzilla #165.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401545
2006-03-15 05:52:31 +00:00
Sam Lantinga
c257b720b8 Added disk/dummy audio and dummy video to the Visual CE projects
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401544
2006-03-15 04:32:49 +00:00
Sam Lantinga
1931f2f581 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401543
2006-03-15 04:29:35 +00:00
Sam Lantinga
0e4c01c332 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401542
2006-03-15 03:50:34 +00:00
Ryan C. Gordon
2b25e81b46 Corrected dummy audio callback firing to be realistic, cleaned up tabs.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401541
2006-03-14 19:12:49 +00:00
Sam Lantinga
48a79d3c30 WIN32 is no longer defined on Windows builds
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401540
2006-03-14 17:33:33 +00:00
Sam Lantinga
25e9da92f3 Added disk and dummy drivers to the Visual C++ projects
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401539
2006-03-14 17:21:49 +00:00
Sam Lantinga
8ebbad3462 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401538
2006-03-14 16:20:28 +00:00
Sam Lantinga
5e6d989ad4 By default all the real targets have dummy audio/video and disk audio.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401537
2006-03-14 16:19:32 +00:00
Ryan C. Gordon
66d3d81854 Implemented dummy audio driver.
Fixes Bugzilla #161.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401536
2006-03-14 08:53:33 +00:00
Ryan C. Gordon
2e50f15bed Fixed cut-and-paste error in DC audio target.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401535
2006-03-14 08:35:39 +00:00
Sam Lantinga
cc03465b60 Updated CodeWarrior export list with SDL_iconv
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401534
2006-03-14 08:01:30 +00:00
Sam Lantinga
94d103a051 Updated MacOS Classic and MacOS X exports list
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401533
2006-03-14 07:55:40 +00:00
Sam Lantinga
3ad866a41f The check for UTF-* isn't needed anymore since UTF-8 has the same code range.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401532
2006-03-14 07:45:15 +00:00
Sam Lantinga
a809f23289 Fixed bug #67
Re-enable OpenGL window resetting code for the windib driver

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401531
2006-03-14 07:40:33 +00:00
Sam Lantinga
710a6bc22a Fixed bug #124
Print Screen key events weren't reported on Windows

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401530
2006-03-14 07:06:06 +00:00
Sam Lantinga
38b0054e82 Fixed bug #38
I'm using SDL 1.2.9 with Visual C++ 7.0 on Windows 2000.

Here's the setup: my game starts in a window, with
SDL_WM_GrabInput(SDL_GRAB_ON) to constrain the cursor to the game window. The
mouse cursor is outside of the window when the game launches, and when the
window appears the cursor is grabbed and placed at the top left corner of the
inside of the game window. At this point, if I click the mouse without moving
it, the SDL_MOUSEBUTTONDOWN event's mouse coordinates are (65535,65535).

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401529
2006-03-14 06:00:30 +00:00
Sam Lantinga
c8264f636a Fixed bug #46
Date: Fri, 13 Jan 2006 18:09:45 -0500
From: mhall4400 vipmail kvcc edu
Subject: Possible SDL bug

Greetings

I believe Ive come across a bug in your SDL product (1.2.9), in the CD-ROM
control portion of the library.

When calling the SDL_CDPlay() function to play the last track of a CD using the
offset and length from an SDL_CD structure generated by SDL_CDOpen(), I get the
following error from a call to SDL_Error():

mciSendCommand() error: The specified parameter is out of range for the
specified command.

The code returning the error is:
SDL_CDPlay(g_playingDriveSDLCD,
g_playingDriveSDLCD->track[trackNumberInt].offset,
g_playingDriveSDLCD->track[trackNumberInt].length)

Subtracting one from the length of the provided length seems to repair the
problem:
SDL_CDPlay(g_playingDriveSDLCD,
g_playingDriveSDLCD->track[trackNumberInt].offset,
(g_playingDriveSDLCD->track[trackNumberInt].length) - 1)

Ive replicated this problem on Windows 98 SE (several months since last
patch), fully-patched Window ME, seldom-patched Windows XP SP1, and
fully-patched Windows XP SP2.

While investigating the issue, I came across a line in your librarys win32
source code in file \src\cdrom\win32\SDL_syscdrom.c (source code zip archive
from your download page), function: SDL_SYS_CDGetTOC(), line 226 where you add
1 to the value for length to fix MCI last track length bug.  This may be the
source of the issue (because subtracting 1 from the length seems to resolve the
issue).  Microsoft may have patched the referenced bug since you wrote that
line.

Mike Hall

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401528
2006-03-14 05:34:39 +00:00
Sam Lantinga
482c7c9258 (patch tweaked a bit)
Date: Tue, 14 Mar 2006 03:30:11 +0000
From: Peter Mulholland
Subject: [SDL] Windows MessageBox() strangeness fixes

Hello all,

I *think* this should fix the issues that people were seeing with
MessageBox() not working and therefore assert() on mingw/msvc. Forgive
me if i've screwed up making the diff file - I'm a total newb when it
comes to things like CVS and diff.

It modifies a few files as I saw that FlushMessageQueue() was in both
the windx5 and windib driver, so I moved this into wincommon. It was
also in the gapi driver, so I changed that too. The function is now
WIN_FlushMessageQueue() in src/video/wincommon/SDL_syswm.c

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401527
2006-03-14 04:00:03 +00:00
Sam Lantinga
e1c330b81f *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401526
2006-03-14 03:04:50 +00:00
Sam Lantinga
7c958aee64 CFLAGS are separate from EXTRA_CFLAGS
Fixed iconv.h detection on Cygwin32

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401525
2006-03-14 02:46:26 +00:00
Sam Lantinga
5aa43a48d5 Add the NAS library directory, since X11 is dynamically loaded now...
FIXME: See if we can dynamically load NAS

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401524
2006-03-13 18:01:34 +00:00
Sam Lantinga
7056c5dc5c RFC 3629 restricted the range of characters encoded with UTF-8 to 0000-10FFFF (the UTF-16 accessible range)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401523
2006-03-13 17:25:44 +00:00
Sam Lantinga
de88144cde Updated by Ryan Gordon
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401522
2006-03-13 16:56:01 +00:00
Sam Lantinga
78d1c55577 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401521
2006-03-13 05:44:14 +00:00
Sam Lantinga
61549bf6a5 Updated MacOS Classic build
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401520
2006-03-13 05:36:42 +00:00
Sam Lantinga
34d826583e The exports file isn't necessary on BeOS anymore
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401519
2006-03-13 04:35:59 +00:00
Sam Lantinga
b341d194bb Added SDL_iconv.c to the Embedded Visual C++ projects
Added missing target configurations

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401518
2006-03-13 02:35:32 +00:00
Sam Lantinga
134ae7ea08 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401517
2006-03-13 02:26:47 +00:00
Sam Lantinga
393b8049ba Added _strnicmp support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401516
2006-03-13 02:12:39 +00:00
Sam Lantinga
2dffc45236 Added SDL_iconv.c to MPW Makefile
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401515
2006-03-13 02:12:15 +00:00
Sam Lantinga
d99aa28246 Win32 fixes
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401514
2006-03-13 02:06:33 +00:00
Sam Lantinga
dda2653f17 Added SDL_iconv.c to the Dreamcast Makefile
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401513
2006-03-13 01:47:03 +00:00
Sam Lantinga
85ce0ac487 The Win32 exports file isn't used by mingw anymore
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401512
2006-03-13 01:43:18 +00:00
Sam Lantinga
d066241b5d Fixed bug #112
Added SDL_GetKeyRepeat()

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401511
2006-03-13 01:41:32 +00:00
Sam Lantinga
72dd8e4f2b Added SDL_iconv.c to the Visual C++ projects
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401510
2006-03-13 01:40:49 +00:00
Sam Lantinga
cf05f2fab8 Fixed bug #139
The text in SDL_WM_SetCaption() is in UTF-8 encoding.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401509
2006-03-13 01:33:58 +00:00
Sam Lantinga
ffbb789969 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401508
2006-03-13 01:20:05 +00:00
Sam Lantinga
293e158d84 props yo
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401507
2006-03-13 01:17:22 +00:00
Sam Lantinga
fbc44f92d6 UTF-32 by definition can't handle characters higher than 0x10FFFF
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401506
2006-03-13 01:16:16 +00:00
Sam Lantinga
3750cb6c4d Added UTF-8 <-> UTF-16 <-> UTF-32 <-> UCS-2 <-> UCS-4 conversion capability
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401505
2006-03-13 01:08:00 +00:00
Sam Lantinga
5f71e5a774 Blah
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401504
2006-03-12 01:47:23 +00:00
Sam Lantinga
fa0e211021 Fixed bug #150
memory leak in SDL_thread.c

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401503
2006-03-12 01:18:29 +00:00
Sam Lantinga
ee03e10187 Fixed bug #149
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401502
2006-03-12 00:57:50 +00:00
Sam Lantinga
cd3a1db9db Fixes from Dmitry Yakimov:
fixed bugs 159 and 160:

+ added threaded timers support
! fixed restoring sdl window focus (AV in windows message handler)
! disabled forgotten cdrom and joystick in config file.
* disabled minimizing sdl window while loosing focus.
  PocketPC does not have a task bar, so it is an inconvenient and unusual
  behaviour for PPC users.
+ added WIN_Paint handler for GAPI
! fixed loosing focus while using GAPI videi driver

+ added TestTimer project
* removed unnecessary macros (ENABLE_WINDIB ...) from projects

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401501
2006-03-11 23:46:45 +00:00
Sam Lantinga
a5db090e59 *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401500
2006-03-11 23:44:21 +00:00
Sam Lantinga
2a752c3732 Might have fixed 64-bit issues. :)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401499
2006-03-11 22:54:12 +00:00
Sam Lantinga
c2a4bb7b9a Fixed make distclean
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401498
2006-03-11 20:16:50 +00:00