Commit graph

3293 commits

Author SHA1 Message Date
Sam Lantinga
83fbb6981f Fixed bug #736
Don't use the SSE cache instruction in MMX code if SSE isn't available. :)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404326
2009-12-16 03:02:31 +00:00
Sam Lantinga
777b877a72 Added testfill to test raw fill performance
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404325
2009-12-16 02:08:59 +00:00
Sam Lantinga
ad28ede924 Nuffin'
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404324
2009-12-16 01:19:58 +00:00
Sam Lantinga
62991bd546 Fixed bug #685
Added missing keysym shortcuts

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404323
2009-12-16 01:06:48 +00:00
Sam Lantinga
21ee5c056f Fixed bug #666
Don't let the event queue overflow with resize events

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404322
2009-12-16 00:55:33 +00:00
Sam Lantinga
1ca4e2cee3 Fixed bug #642
Gerry JJ      2008-11-09 02:11:49 PST

The SDL_MouseMotionEvent struct has a field named "tilt" (currently marked "for
future use"), for tablet stylus tilt information.  However, one value is not
enough for this, as tilt is two-dimensional.  Reserving only one field for
future use is no good when you're going to need two, so there should be two
fields, tilt_x and tilt_y.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404321
2009-12-16 00:44:53 +00:00
Sam Lantinga
240b5fcaab Default to allow either accelerated or not
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404320
2009-12-15 20:53:09 +00:00
Sam Lantinga
fe2b42f86c OpenGL hardware acceleration defaults on
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404319
2009-12-15 20:36:31 +00:00
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
Sam Lantinga
ddbeadf670 Fixed bug #818
Daniele Forghieri      2009-10-12 02:52:02 PDT

Updated makefile & Doc for Open Watcom 1.8

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404317
2009-12-15 20:11:29 +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
08bbf9ac95 Fixed bug #905
Give the foreign window message proc more control over Windows events.

This may need to be adjusted when we add the capability for the app to specify whether it wants SDL to handle input for the window or not.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404315
2009-12-15 09:20:10 +00:00
Sam Lantinga
fb16cf8cac Fixed bug #906
Added better error reporting for OpenGL context creation failing.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404314
2009-12-15 08:11:06 +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
db04a493f2 Added notes from e-mail on desktop window implementation
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404312
2009-12-15 02:16:01 +00:00
Sam Lantinga
e4877f62c1 Need to test the multi-draw APIs
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404311
2009-12-15 00:00:30 +00:00
Sam Lantinga
a7733bcb17 Added svn checkout install step
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404310
2009-12-14 23:43:57 +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
1bd0c772d9 Implemented read/write pixels for the X11 renderer
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404307
2009-12-14 06:52:17 +00:00
Sam Lantinga
c2767e72dd Added a test to check the read/write pixels API
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404306
2009-12-14 06:35:59 +00:00
Sam Lantinga
9ea9c7518d Added support for SDL_PIXELFORMAT_RGB24 and SDL_PIXELFORMAT_BGR24 to SDL_PixelFormatEnumToMasks()
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404305
2009-12-14 06:35:27 +00:00
Sam Lantinga
e8b8ea1e0a Added a BLENDMODE_MASK pixel shader so render tests succeed
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404304
2009-12-14 04:19:00 +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
29aecb01bf Note that the WritePixels call is unsupported right now.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404301
2009-12-13 06:19:32 +00:00
Sam Lantinga
9b0681272d Fixed windows.h include
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404300
2009-12-13 05:37:06 +00:00
Sam Lantinga
c43ba5edd7 Fixed line drawing for D3D
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404299
2009-12-12 20:31:28 +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
15e7c4789c Finished implementing RenderReadPixels()
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404297
2009-12-12 04:01:40 +00:00
Sam Lantinga
d122df1db0 Removed the obsolete testcdrom target
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404296
2009-12-12 01:04:57 +00:00
Sam Lantinga
3be3a8db09 Fixed building on iPhone
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404295
2009-12-12 00:55:13 +00:00
Sam Lantinga
9888012562 Allow points to be outside the window bounds, stress testing the clipping code.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404294
2009-12-12 00:08:45 +00:00
Sam Lantinga
0e0b96d72f Added mouse position for button handling
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404293
2009-12-12 00:08:02 +00:00
Sam Lantinga
279b20b6d6 minor notes to self
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404292
2009-12-12 00:07:26 +00:00
Sam Lantinga
3e4cece769 Fixed X11 line implementation - clip lines that are going to go outside the window.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404287
2009-12-11 09:59:36 +00:00
Sam Lantinga
60b65d182a Make sure we fully clip the first point before starting to adjust the second point.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404286
2009-12-11 09:57:54 +00:00
Sam Lantinga
1ba0c1618e Added an automated test for rectangle routines, currently only testing line clipping.
Use the Cohen-Sutherland algorithm for line clipping which uses integer math and preserves ordering of clipped points.

Removed getopt() support in testsdl.c, replaced with simple argv scanning.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404285
2009-12-11 09:22:34 +00:00
Sam Lantinga
4672f074e0 Fixed constness in RenderRects() parameter
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404284
2009-12-11 09:13:51 +00:00
Sam Lantinga
74c8c77e81 Fixed bug #896
John Popplewell      2009-12-08 23:05:50 PST

Originally reported by AKFoerster on the mailing list.

Error decoding UTF8 Russian text to UTF-16LE on Windows, but specifically on
platforms without iconv support (the default on Windows).

Valid UTF8 characters are flagged as being overlong and then substituted by the
UNKNOWN_UNICODE character.

After studying the testiconv.c example program, reading the RFCs and putting
some printf statements in SDL_iconv.c the problem is in a test for 'Maximum
overlong sequences', specifically 4.2.1, which is carried out by the following
code:

      } else if ( p[0] >= 0xC0 ) {
        if ( (p[0] & 0xE0) != 0xC0 ) {
          /* Skip illegal sequences
            return SDL_ICONV_EILSEQ;
          */
          ch = UNKNOWN_UNICODE;
        } else {
          if ( (p[0] & 0xCE) == 0xC0 ) {    <<<<<<<< here
            overlong = SDL_TRUE;
          }
          ch = (Uint32)(p[0] & 0x1F);
          left = 1;
        }
      } else {

Here is the 2-byte encoding of a character in range 00000080 - 000007FF
    110xxxxx 10xxxxxx

The line in question is supposed to be checking for an overlong sequence which
would be less than
    11000001 10111111

which should be represented as a single byte.

BUT, the mask value (0xCE) is wrong, it isn't checking the top-most bit:
    11000001     value
    11001110     mask (incorrect)
       ^
and should be (0xDE):
    11000001     value
    11011110     mask (correct)

making the above code:

      } else if ( p[0] >= 0xC0 ) {
        if ( (p[0] & 0xE0) != 0xC0 ) {
          /* Skip illegal sequences
            return SDL_ICONV_EILSEQ;
          */
          ch = UNKNOWN_UNICODE;
        } else {
          if ( (p[0] & 0xDE) == 0xC0 ) {    <<<<<<<< here
            overlong = SDL_TRUE;
          }
          ch = (Uint32)(p[0] & 0x1F);
          left = 1;
        }
      } else {

I can supply a test program and/or a patch if required,

best regards,
John Popplewell

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404283
2009-12-11 08:03:43 +00:00
Sam Lantinga
021fe81f73 X11 driver compiles again, lines are not yet implemented
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404281
2009-12-10 09:27:23 +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
304a6bbb6c Hey, those automated tests are coming in handy! Fixed GDI rendering semantics
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404278
2009-12-07 10:08:24 +00:00
Sam Lantinga
5a45284f55 Implemented RenderReadPixels() and RenderWritePixels() for GDI renderer.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404277
2009-12-07 09:44:55 +00:00
Sam Lantinga
5d686e407c This fixes the OpenGL rendering test, at least with my ATI card...
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404276
2009-12-07 08:02:20 +00:00
Sam Lantinga
ea76da001c Fixed crash initializing the dummy driver
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404275
2009-12-07 08:01:58 +00:00
Sam Lantinga
ce410261ab On Windows the minimum window size may be larger than 80, so explicitly request the expected rectangle.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404274
2009-12-07 08:01:20 +00:00
Sam Lantinga
5c77d00a62 The window position is display relative, at least for now...
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404273
2009-12-06 08:39:01 +00:00
Sam Lantinga
712ccbd13c Fixed crash
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404272
2009-12-06 08:16:23 +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