Commit graph

1356 commits

Author SHA1 Message Date
David Ludwig
ef0a40b704 WinRT: build fixes and additional WinRT-related integrations with SDL 2.0.0 2013-08-13 20:09:52 -04:00
David Ludwig
88461d442a WinRT: merged with SDL 2.0.0 codebase (aka. SDL hg rev d6a8fa507a45)
--HG--
rename : README.iOS => README-ios.txt
2013-08-12 22:29:55 -04:00
Philipp Wiesemann
ba31f59f54 Removed SDL_HAPTIC_SQUARE from comments in header to prevent doxygen confusion. 2013-08-10 23:14:20 +02:00
Ryan C. Gordon
c35c4a6f18 Replaced SDL_HAPTIC_SQUARE with SDL_HAPTIC_LEFTRIGHT.
We needed a bit, so we're hoping no one needs this effect, especially when
it's fairly close to SDL_HAPTIC_SINE, we hope.

SDL_HAPTIC_LEFTRIGHT maps to XInput's functionality, so this removes the SINE
code for the XInput driver to keep things clean.

This also makes the simplified Rumble API use SDL_HAPTIC_LEFTRIGHT if
SDL_HAPTIC_SINE isn't available, to keep XInput working.

When we break the ABI, and can extend the supported capabilities field from
a Uint16, we'll add SDL_HAPTIC_SQUARE back in.

This patch is based on work by Ethan Lee.
2013-08-10 13:38:09 -04:00
Ryan C. Gordon
24097af6ac Fixed some typos in the headers. 2013-08-10 13:20:45 -04:00
Sam Lantinga
b47f785f57 Fixed whitespace 2013-08-08 12:20:22 -07:00
Sam Lantinga
da3326eb95 The return value of SDL_MostSignificantBitIndex32(0) is defined as -1.
--HG--
extra : rebase_source : b9f0ed0a769617991e6eadf9d6a3efa17112d1a4
2013-08-07 16:32:51 -07:00
Ryan C. Gordon
6b504a4f01 Removed function signature that doesn't actually exist yet.
--HG--
extra : rebase_source : ffcdb6b32d54d18c3eb02f0dd46adcdac7e7bb4a
2013-08-06 18:23:46 -07:00
Ryan C. Gordon
a052fa0ae8 Removed anisotropic option from SDL_HINT_RENDER_SCALE_QUALITY.
Anisotropic filtering is meant to be used for textures at a stark
 angle, not perpendicular to the camera.

--HG--
extra : rebase_source : e01c4da3bae7f1628de7c049f31f1208dbbbb24c
2013-08-06 00:23:04 -04:00
Sam Lantinga
3b4b3c17ea Fixed stack smashing crash when using the GCC compiled DLL with Visual Studio. 2013-07-29 23:28:25 -07:00
Sam Lantinga
56c6743a1b Added documentation saying the render API isn't for multi-threading. 2013-07-28 11:24:16 -07:00
Ryan C. Gordon
fac63fa2e4 Fixed return value documentation for SDL_HapticUpdateEffect().
It was a cut-and-paste error from SDL_HapticNewEffect(), right above it.
2013-07-27 13:18:54 -04:00
Sam Lantinga
0754901ca9 Fixed bug 1983 - SDL_thread.h broken under MinGW crosscompiling environment
q66

after updating SDL2 to the latest RC I'm unable to build my game engine under mingw crosscompiling environment for Windows (32bit, hosted on freebsd 64bit).

The error is in SDL_thread.h with messages like this: http://codepad.org/jEQXd3Yq

The problem is, while _beginthreadex return type is correctly mapped to uintptr_t (as specified by Microsoft), the return type under mingw is unsigned long int (same size, different signature), resulting in the error above.

The reason it didn't error before is this: http://codepad.org/8FAbKAxz

You can see the _beginthreadex case is only used without HAVE_LIBC defined; at one point though, SDL_config_windows.h was changed like this:

-/* Enabled for SDL 1.2 (binary compatibility) */
-#define HAVE_LIBC     1
+/* This is disabled by default to avoid C runtime dependencies and manifest requirements */

resulting in these errors.
2013-07-27 03:44:03 -07:00
Jørgen P. Tjernø
b01b128353 Mac: Codify SDK and OS requirements, and clean up.
This #errors if you're using an SDK or deployment target that is less
than 10.6 and 10.5, respectively, and cleans up uses of
MAC_OS_X_VERSION_MIN_REQUIRED and MAC_OS_X_VERSION_MAX_ALLOWED according
to those requirements.
2013-07-23 17:38:59 -07:00
Sam Lantinga
32188834b5 Updated blend semantics so blending uses the following formula:
dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
    dstA = srcA + (dstA * (1-srcA))
This allows proper compositing semantics without requiring premultiplied alpha.

Needs full unit test coverage and bug fixes!
2013-07-23 08:06:49 -07:00
Sam Lantinga
ef291a943f Fixed building with cygwin
Note that building with cygwin gcc results in a DLL that depends on cygwin1.dll
2013-07-21 23:01:01 -07:00
Ryan C. Gordon
30b6bedb57 Fixed some compiler warnings that Visual Studio reported. 2013-07-20 19:51:51 -04:00
Philipp Wiesemann
5875c163cf Changed documentation comment for SDL_CreateShapedWindow().
See bug #1667.
2013-07-20 21:55:15 +02:00
Jørgen P. Tjernø
e5ffe6b633 Fix #1667: Docs about SDL_CreateWindow and flags.
Updates the docs to say you can use SDL_WINDOW_HIDDEN, instead of (the ignored)
SDL_WINDOW_SHOWN.
2013-07-14 15:46:43 -07:00
Sam Lantinga
c43e19485b Fixed code example for SDL_GetWindowWMInfo() 2013-07-14 11:57:01 -07:00
Sam Lantinga
414ff3106c Fixed bug 2121 - GCC throws error on SDL_FORCE_INLINE when compiling with -ansi 2013-09-30 22:35:32 -07:00
Sam Lantinga
0a805ff137 Fixed bug 2119 - compiler warnings (-pedantic) SDL_video.h:111:42 2013-09-30 21:57:03 -07:00
Sam Lantinga
06caf6a344 Call AddRef() on the device so it doesn't accidentally get released from underneath the caller. 2013-09-28 14:07:17 -07:00
Sam Lantinga
2ef24caf1d Make it clear we're just returning a D3D9 device, allowing for new functions to get other D3D versions 2013-09-28 14:07:14 -07:00
Sam Lantinga
f86e83feba Added a hint to create the D3D device in thread-safe mode: SDL_HINT_RENDER_DIRECT3D_THREADSAFE 2013-09-28 14:07:08 -07:00
Sam Lantinga
70c993af2b Added platform specific call: SDL_RenderGetD3DDevice() 2013-09-28 14:07:05 -07:00
Sam Lantinga
43cc5c1cbb Added optimized YUV texture upload path with SDL_UpdateYUVTexture() 2013-09-28 14:06:47 -07:00
Sam Lantinga
edf503e870 Fixed bug 1820 - building SDL as a static library with static runtime doesn't compile/link with visual studio
norfanin

Adds a condition so only the MSVC 2012 compiler defines the macros for the functions of its version.

Attaching a patch that adds a condition so that the HAVE_X supported by MSVC 2012 only get defined with that compiler. MSVC 2008 and 2010 will then build without any modification to the SDL source code.

Also moved HAVE_M_PI to a separate check. The Microsoft headers require _USE_MATH_DEFINES to be defined before they define the constants.

--HG--
extra : rebase_source : 5a348adc971f36b3e524a3f30759c6b4c04c400d
2013-09-28 10:30:51 -07:00
Gabriel Jacobo
c7f38347b7 Raspberry Pi support (also unified UDEV and EVDEV support) 2013-09-28 13:28:19 -03:00
Philipp Wiesemann
e0b5831e14 Fixed doxygen warning. 2013-09-28 12:55:32 +02:00
Sam Lantinga
1a91f80586 Fixed the name of the environment variable to match the name of the hint. 2013-09-27 23:19:22 -07:00
Edward Rudd
3a11d95444 add in High DPI support (aka Retina)
- based on Jørgen's patch with a few bug fixes
2013-09-20 13:43:00 -04:00
Sam Lantinga
0d7001777d Added SDL_Direct3D9GetAdapterIndex(), which returns the adapter index you would pass into CreateDevice to get your device on the right monitor in full screen mode. This fixes the default adapter in SDL_render_d3d.c, which means that tests will work fullscreen off the main monitor now.
CR: Sam
2013-09-13 17:42:46 -07:00
Ryan C. Gordon
f049ab5e9f Workaround for compiling with /W4 warnings on Visual C++. 2013-09-07 13:57:20 -04:00
Sam Lantinga
494f3f253e Fixed bug 2081 - Add name to SDL_Point structure
Dmitry Marakasov

Unlike SDL_Rect (typedef struct SDL_Rect {} SDL_Rect), SDL_Point (typedef struct {} SDL_Point) structure is unnamed. This feels inconsistent and makes it impossible to use forward declaration for SDL_Point, having to include whole SDL_rect.h instead.
2013-09-05 07:02:27 -07:00
Ryan C. Gordon
d7839b7827 The SDL_PixelFormat* passed to SDL_ConvertSurface() should be const. 2013-09-04 23:40:11 -04:00
Edward Rudd
2bd35f683d make the examples in the doc comments match the actual output of the SDL_GetPrefPath function 2013-08-24 09:43:14 -04:00
Gabriel Jacobo
65f76b93b9 Separate EGL / GL ES detection in CMake 2013-08-22 14:56:07 -03:00
Ryan C. Gordon
20512dd292 Added SDL_VIDEO_OPENGL_ES2 to the SDL_config.h templates (Thanks, Kerim!). 2013-08-22 13:00:05 -04:00
Gabriel Jacobo
298ce1c1a7 OCD fixes: Adds a space after /* (glory to regular expressions!) 2013-08-21 09:47:10 -03:00
Gabriel Jacobo
271e0d67c4 OCD fixes: Adds a space before */ 2013-08-21 09:43:09 -03:00
Ryan C. Gordon
2b9a2802b2 Added SDL_GetBasePath() and SDL_GetPrefPath() in new filesystem module.
--HG--
extra : rebase_source : c1fac232063443a2880e64f1abda85e0bdb2e710
2013-08-20 19:57:11 -04:00
Ryan C. Gordon
5b99be4382 Added SDL_DEPRECATED #define.
--HG--
extra : rebase_source : 865047af634b49c9f5101656e1055d0278720633
2013-08-20 14:21:35 -04:00
Ryan C. Gordon
8a69509af3 Added SDL_assert_always (never disabled).
--HG--
extra : rebase_source : ff08944ae7b6f86458840f29a3bf82ccb89b0307
2013-08-20 14:17:48 -04:00
Gabriel Jacobo
5e78879e76 More non C89 compliant comments 2013-08-20 20:34:40 -03:00
Gabriel Jacobo
ef4a588d99 Fixes bug #2037, common EGL code for Android and X11 2013-08-19 16:29:46 -03:00
Sam Lantinga
7960e55671 Fixed warnings building with gcc 2 and gcc 4 on Haiku 2013-08-18 23:18:11 -07:00
Philipp Wiesemann
7a4e8a1021 Replaced introduction in header file with more recent version from README.txt. 2013-08-18 11:15:30 +02:00
Philipp Wiesemann
dbd31e454a Corrected file names in header file comments. 2013-08-18 11:12:46 +02:00
Philipp Wiesemann
8900fb0a7e Changed some documentation comments in header files to be used by doxygen. 2013-08-18 11:08:52 +02:00