Sam Lantinga
2ac49a53bd
The SDL 1.3 tests have been cleaned up not to include any 1.2 compatibility code.
2009-12-14 23:29:37 +00:00
Sam Lantinga
1ee0e98c97
Implemented read/write pixels for the X11 renderer
2009-12-14 06:52:17 +00:00
Sam Lantinga
c49568972f
Added a test to check the read/write pixels API
2009-12-14 06:35:59 +00:00
Sam Lantinga
ff38dae142
Added support for SDL_PIXELFORMAT_RGB24 and SDL_PIXELFORMAT_BGR24 to SDL_PixelFormatEnumToMasks()
2009-12-14 06:35:27 +00:00
Sam Lantinga
1f4190a259
Added a BLENDMODE_MASK pixel shader so render tests succeed
2009-12-14 04:19:00 +00:00
Sam Lantinga
9bf59c5687
The SDL_PaletteWatch structure is really internal-only.
2009-12-13 08:00:25 +00:00
Sam Lantinga
ed8e1e54ad
Name the audio callback for documentation clarity.
2009-12-13 06:21:22 +00:00
Sam Lantinga
5edd3788ef
Note that the WritePixels call is unsupported right now.
2009-12-13 06:19:32 +00:00
Sam Lantinga
db0f3081da
Fixed windows.h include
2009-12-13 05:37:06 +00:00
Sam Lantinga
cbdba43759
Fixed line drawing for D3D
2009-12-12 20:31:28 +00:00
Sam Lantinga
4f4f40f930
Minor documentation fix
2009-12-12 20:30:25 +00:00
Sam Lantinga
8306adb559
Finished implementing RenderReadPixels()
2009-12-12 04:01:40 +00:00
Sam Lantinga
d423bfa8a8
Removed the obsolete testcdrom target
2009-12-12 01:04:57 +00:00
Sam Lantinga
159e0ed15f
Fixed building on iPhone
2009-12-12 00:55:13 +00:00
Sam Lantinga
d3941d1098
Allow points to be outside the window bounds, stress testing the clipping code.
2009-12-12 00:08:45 +00:00
Sam Lantinga
a127883a56
Added mouse position for button handling
2009-12-12 00:08:02 +00:00
Sam Lantinga
1ab0809779
minor notes to self
2009-12-12 00:07:26 +00:00
Sam Lantinga
54af8f9682
Fixed X11 line implementation - clip lines that are going to go outside the window.
2009-12-11 09:59:36 +00:00
Sam Lantinga
c0e3ce55fd
Make sure we fully clip the first point before starting to adjust the second point.
2009-12-11 09:57:54 +00:00
Sam Lantinga
0a3768436b
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.
2009-12-11 09:22:34 +00:00
Sam Lantinga
862fd5857b
Fixed constness in RenderRects() parameter
2009-12-11 09:13:51 +00:00
Sam Lantinga
e053affd71
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
2009-12-11 08:03:43 +00:00
Sam Lantinga
bd7e5fd72b
X11 driver compiles again, lines are not yet implemented
2009-12-10 09:27:23 +00:00
Sam Lantinga
dd8238d718
Switch to mixed case for consistency with other enumerations
2009-12-10 08:28:26 +00:00
Sam Lantinga
70a40d51b2
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()
2009-12-09 15:56:56 +00:00
Sam Lantinga
fd2629214e
Hey, those automated tests are coming in handy! Fixed GDI rendering semantics
2009-12-07 10:08:24 +00:00
Sam Lantinga
cf1e120bcb
Implemented RenderReadPixels() and RenderWritePixels() for GDI renderer.
2009-12-07 09:44:55 +00:00
Sam Lantinga
22a1cf4b25
This fixes the OpenGL rendering test, at least with my ATI card...
2009-12-07 08:02:20 +00:00
Sam Lantinga
8d70d2a2b2
Fixed crash initializing the dummy driver
2009-12-07 08:01:58 +00:00
Sam Lantinga
4969fa9624
On Windows the minimum window size may be larger than 80, so explicitly request the expected rectangle.
2009-12-07 08:01:20 +00:00
Sam Lantinga
3e60082b3f
The window position is display relative, at least for now...
2009-12-06 08:39:01 +00:00
Sam Lantinga
2f755299d8
Fixed crash
2009-12-06 08:16:23 +00:00
Sam Lantinga
586f3e0dda
Added an API function to query geometry of multiple monitors:
...
SDL_GetDisplayBounds()
Implemented multi-monitor window positions on Windows
2009-12-06 08:03:38 +00:00
Sam Lantinga
973e6e31d8
Fixed to use the correct display adapter
2009-12-06 06:21:39 +00:00
Sam Lantinga
cbe0bbeb02
Fixed compiler warnings
2009-12-05 22:13:36 +00:00
Sam Lantinga
08dd462d5a
Fixed compilation on Mac OS X 10.4
2009-12-05 19:57:49 +00:00
Sam Lantinga
489e0472a0
Allow overriding the number of build jobs
2009-12-05 19:46:24 +00:00
Sam Lantinga
a90e5b78ce
Made the window flag comments more consistent
2009-12-05 05:13:17 +00:00
Sam Lantinga
428aa51c43
Added related functions
2009-12-05 04:39:59 +00:00
Sam Lantinga
ab85a49998
Don't add any renderers if you can't add any displays
2009-12-04 09:01:48 +00:00
Sam Lantinga
624f566965
Fixed calls to SDL_AddRenderDriver()
2009-12-04 08:45:08 +00:00
Sam Lantinga
f11bc297a2
Fixed compiling the D3D renderer
2009-12-04 08:26:32 +00:00
Sam Lantinga
1b9db6b1d5
Added support for SDL 1.2 environment variables:
...
SDL_VIDEO_FULLSCREEN_DISPLAY, SDL_VIDEO_FULLSCREEN_HEAD
2009-12-03 08:43:12 +00:00
Sam Lantinga
6d60a7e907
Fixed mouse events for fullscreen windows on Mac OS X
2009-12-03 08:33:39 +00:00
Sam Lantinga
2c7165c6f4
Restore the video mode after shutting down the renderer, which fixes an error deleting the OpenGL context on Mac OS X.
2009-12-03 05:05:26 +00:00
Sam Lantinga
f6828e88f9
Missing pop over a jump
2009-12-03 04:33:05 +00:00
Sam Lantinga
262da78936
Added Ctrl-Z common key binding
2009-12-02 07:56:09 +00:00
Sam Lantinga
17424210d2
Restore the desktop mode when requested
2009-12-02 07:55:23 +00:00
Sam Lantinga
efacf93c19
If we're fullscreen on a single-head system and lose focus, minimize
2009-12-02 07:42:10 +00:00
Sam Lantinga
932374c12d
On multi-display systems it's perfectly reasonable to have focus on a window on another monitor while the application is fullscreen.
2009-12-02 07:38:28 +00:00