Commit Graph

1718 Commits

Author SHA1 Message Date
Sam Lantinga
5e83bc34c1 Added an API to get the amount of system RAM 2013-10-17 11:32:56 -07:00
Sam Lantinga
15cb545eb3 Fixed function feature test for Visual Studio 2012
norfanin

Fixes the version check for some functions that are only present with the MSVC 2013 CRT libraries.

I did my testing wrong and failed to see that 2012 doesn't have these functions. Microsoft implemented them in their upcoming 2013 version, though. The attached patch changes it to the check for the next version.

I also removed the HAVE_ITOA because that would require linking with oldnames.lib and it's easier to just let the SDL implementation take over.
2013-10-13 19:51:58 -07:00
Sam Lantinga
6fca598f55 Updated SDL to version 2.0.1 2013-10-10 21:50:25 -07:00
Gabriel Jacobo
8eae84fcf7 Adds gl_profile_mask to test framework, uses it in testgles 2013-10-10 00:49:57 -03:00
Gabriel Jacobo
4a1785a9ea SDL_TEXTINPUT support for EVDEV 2013-10-03 10:28:10 -03:00
David Ludwig
4dd121471c WinRT: unified the two, public, app-init functions
This function, SDL_WinRTRunApp, can be used to help launch either XAML or non-XAML/Direct3D-only based apps.
2013-09-22 12:26:53 -04:00
David Ludwig
e7a27315f9 WinRT: made SDL_GetWindowWMInfo return window data in a slightly easier-to-use format
Having the window pointer available as a WinRT IInspectable should make it a bit easier to use in conjunction with WRL-based weak references.
2013-09-16 11:02:18 -04:00
David Ludwig
77688b3323 WinRT: more renaming of "windowsrt" to "winrt" 2013-09-04 19:55:45 -04:00
David Ludwig
93507125de WinRT: experimental and preliminary support for XAML-based overlays on Windows 8/RT
The XAML support here is still rudimentary.  Bugs do exist.  You've been warned.

XAML support in Windows Phone 8 is not yet available (in SDL/WinRT).
2013-08-27 21:21:09 -04:00
David Ludwig
f34ae4e23f WinRT: more "Windows RT" to "WinRT" renaming 2013-08-27 12:20:35 -04:00
David Ludwig
669aa12b7e WinRT: renamed SDL_SYSWM_WINDOWSRT to SDL_SYSWM_WINRT
This is part of an overall effort to use the name, "WinRT", rather than "WindowsRT" (or "Windows RT"), as the shorthand name often seems to mean something different than the longhand name.  (WinRT is an API, Windows RT is a product name)
2013-08-27 11:44:43 -04:00
David Ludwig
3f511d900f WinRT: made sure SDL_main gets used in the latest SDL 2.0.0 based code 2013-08-13 20:28:10 -04:00
David Ludwig
1ae5d8dea3 WinRT: build fixes and additional WinRT-related integrations with SDL 2.0.0 2013-08-13 20:09:52 -04:00
David Ludwig
373ffd0dac WinRT: merged with SDL 2.0.0 codebase (aka. SDL hg rev d6a8fa507a45) 2013-08-12 22:29:55 -04:00
Philipp Wiesemann
07d62e2d9c Removed SDL_HAPTIC_SQUARE from comments in header to prevent doxygen confusion. 2013-08-10 23:14:20 +02:00
Ryan C. Gordon
2fbbecf909 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
67a0b6551b Fixed some typos in the headers. 2013-08-10 13:20:45 -04:00
Sam Lantinga
c1a94e232c Fixed whitespace 2013-08-08 12:20:22 -07:00
Sam Lantinga
d683eadde5 The return value of SDL_MostSignificantBitIndex32(0) is defined as -1. 2013-08-07 16:32:51 -07:00
Ryan C. Gordon
77b4978afb Removed function signature that doesn't actually exist yet. 2013-08-06 18:23:46 -07:00
Ryan C. Gordon
6282a112e5 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.
2013-08-06 00:23:04 -04:00
Sam Lantinga
a804c33317 Fixed stack smashing crash when using the GCC compiled DLL with Visual Studio. 2013-07-29 23:28:25 -07:00
Sam Lantinga
1d3d9d10fb Added documentation saying the render API isn't for multi-threading. 2013-07-28 11:24:16 -07:00
Ryan C. Gordon
8ee90e400d 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
7fcffeefe0 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ø
e1bbdec6b8 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
4862c1fc30 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
ca9a19ea4c 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
ee3cbb1fa6 Fixed some compiler warnings that Visual Studio reported. 2013-07-20 19:51:51 -04:00
Philipp Wiesemann
5b2d7ee0c6 Changed documentation comment for SDL_CreateShapedWindow().
See bug #1667.
2013-07-20 21:55:15 +02:00
Jørgen P. Tjernø
c96b5c574e 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
8ab710e751 Fixed code example for SDL_GetWindowWMInfo() 2013-07-14 11:57:01 -07:00
Sam Lantinga
7bab7a4662 Fixed bug 2121 - GCC throws error on SDL_FORCE_INLINE when compiling with -ansi 2013-09-30 22:35:32 -07:00
Sam Lantinga
3795e34c5a Fixed bug 2119 - compiler warnings (-pedantic) SDL_video.h:111:42 2013-09-30 21:57:03 -07:00
Sam Lantinga
c049a88aca 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
ac2735a4a4 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
c045f564ad 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
4eac5bc7be Added platform specific call: SDL_RenderGetD3DDevice() 2013-09-28 14:07:05 -07:00
Sam Lantinga
b7d5ed3b6f Added optimized YUV texture upload path with SDL_UpdateYUVTexture() 2013-09-28 14:06:47 -07:00
Sam Lantinga
4bfb868d6f 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.
2013-09-28 10:30:51 -07:00
Gabriel Jacobo
dd33e35895 Raspberry Pi support (also unified UDEV and EVDEV support) 2013-09-28 13:28:19 -03:00
Philipp Wiesemann
5d90db278a Fixed doxygen warning. 2013-09-28 12:55:32 +02:00
Sam Lantinga
b93ff3b6ef Fixed the name of the environment variable to match the name of the hint. 2013-09-27 23:19:22 -07:00
Edward Rudd
fab88c0df2 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
c1a125c267 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
4ec784c0d5 Workaround for compiling with /W4 warnings on Visual C++. 2013-09-07 13:57:20 -04:00
Sam Lantinga
32810bdaa3 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
4e510b3a87 The SDL_PixelFormat* passed to SDL_ConvertSurface() should be const. 2013-09-04 23:40:11 -04:00
Edward Rudd
c95bbc9ce2 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
0f8f61d79d Separate EGL / GL ES detection in CMake 2013-08-22 14:56:07 -03:00
Ryan C. Gordon
6832f3e1de Added SDL_VIDEO_OPENGL_ES2 to the SDL_config.h templates (Thanks, Kerim!). 2013-08-22 13:00:05 -04:00
Gabriel Jacobo
8515791f86 OCD fixes: Adds a space after /* (glory to regular expressions!) 2013-08-21 09:47:10 -03:00
Gabriel Jacobo
871473e032 OCD fixes: Adds a space before */ 2013-08-21 09:43:09 -03:00
Ryan C. Gordon
8fe1cf47f2 Added SDL_GetBasePath() and SDL_GetPrefPath() in new filesystem module. 2013-08-20 19:57:11 -04:00
Ryan C. Gordon
c3f2a8dbda Added SDL_DEPRECATED #define. 2013-08-20 14:21:35 -04:00
Ryan C. Gordon
0669807485 Added SDL_assert_always (never disabled). 2013-08-20 14:17:48 -04:00
Gabriel Jacobo
f93c78450b More non C89 compliant comments 2013-08-20 20:34:40 -03:00
Gabriel Jacobo
84f07d804a Fixes bug #2037, common EGL code for Android and X11 2013-08-19 16:29:46 -03:00
Sam Lantinga
8498376baa Fixed warnings building with gcc 2 and gcc 4 on Haiku 2013-08-18 23:18:11 -07:00
Philipp Wiesemann
7c8b4cdc44 Replaced introduction in header file with more recent version from README.txt. 2013-08-18 11:15:30 +02:00
Philipp Wiesemann
69fc4812b7 Corrected file names in header file comments. 2013-08-18 11:12:46 +02:00
Philipp Wiesemann
e0130f52c4 Changed some documentation comments in header files to be used by doxygen. 2013-08-18 11:08:52 +02:00
Sam Lantinga
8f2f5f59d2 Added a hint to control the Windows timer resolution: SDL_HINT_TIMER_RESOLUTION
Added an API to watch hint changes: SDL_AddHintCallback(), SDL_DelHintCallback()
You can now dynamically set the joystick background event hint.
2013-07-13 03:13:41 -07:00
Dimitris Zenios
9637ceba41 Fixed gcc warnings for apps using SDL headers with -Wstrict-prototypes flag. 2013-07-12 09:55:58 +03:00
Sam Lantinga
88d269ecd7 Fixed Azamat's patch for SIZEOF_VOIDP in SDL_config.h.in 2013-07-11 23:16:47 -07:00
Azamat H. Hackimov
214b051e50 Define universal answer of SIZEOF_VOIDP for 32/64-bit architectures.
This commit makes SDL_config.h universal, so it can be used with mixed
32 and 64 enviroment simultaneously.
2013-06-05 12:28:53 +06:00
Sam Lantinga
2172f538cc Fixed bug 1946 - OpenGL contexts in threads
The SDL OpenGL context code is now properly thread aware.  There are two new functions which return the current OpenGL window and context for the current thread.

There are still places in the cocoa driver where the OpenGL context needs to be updated when the view changes.  These will need a different solution and still use the last globally set context to avoid changing behavior.
2013-07-11 22:59:20 -07:00
Sam Lantinga
7889fcdc7d Added PowerPC and ARM versions of the memory barrier functions. 2013-07-10 20:17:20 -07:00
Sam Lantinga
f5306d72d0 Added release/acquire memory barriers to the atomic API
* Added a destructor to clean up TLS memory at thread shutdown
* Refactored the TLS code to have platform independent code and a small platform dependent core with a fallback to generic code if platform dependent functions fail.
* Fixed recursion issues with SDL_GetErrBuf()
2013-07-10 18:31:17 -07:00
Sam Lantinga
9c0dea8e15 Implemented an API for thread-local storage: SDL_TLSCreate(), SDL_TLSSet(), SDL_TLSGet() 2013-07-10 02:32:04 -07:00
Ryan C. Gordon
910e8a8155 Backout hg changset 898992405fa7; lots of things still use SDL_types.h. :/
Will remove this again at some point in the future, though.
2013-07-09 11:57:32 -04:00
Sam Lantinga
7be0e70524 Made the SDL_memset4() comment even clearer so we don't accidentally replace it with memset() in the future. 2013-07-09 08:01:40 -07:00
Sam Lantinga
09997d0e9f Backed out commit 898992405fa7 because memset() does a byte fill and SDL_memset4() does a uint32 fill and this change breaks SDL_FillRect() 2013-07-09 07:13:58 -07:00
Ryan C. Gordon
173b1e9280 Removed deprecated SDL_types.h header.
Fixes Bugzilla #1945.
2013-07-08 23:37:00 -04:00
Ryan C. Gordon
fca053548a Replaced SDL_memset4() implementation with a call to SDL_memset().
The implementation was slower than the C runtime on Mac OS X, Linux, and
 Windows...quite a bit slower when using the C fallback instead of the inline
 asm, too.

Fixes Bugzilla #1755.
2013-07-08 23:22:36 -04:00
Philipp Wiesemann
6f27bb0714 Corrected name of constant in header file comment. 2013-07-07 16:15:21 +02:00
Ryan C. Gordon
6174013522 Added an SDL2 OpenBSD sndio(7) audio target. 2013-07-07 02:03:07 -04:00
Sam Lantinga
8425cf5d1a Fixed bug 1911 - enable HAVE_GCC_ATOMICS for android platform 2013-07-06 12:39:56 -07:00
Sam Lantinga
e6a7f560a0 Make it possible to use SDL events separately from the video subsystem. 2013-07-06 12:28:57 -07:00
Sam Lantinga
69bede6d35 Removed the inline functions from SDL_stdinc.h
Having the SDL functions inline is causing build issues, and in the case of malloc(), etc. causing malloc/free mismatches, if the application build environment differs from the SDL build environment.

In the interest of safety and consistency, the functions will always be in the SDL library and will only be redirected to the C library there, if they are available.

See the following threads on the SDL mailing list for the gruesome details:
* SDL_stdinc.h inlines problematic when application not compiled in exact same feature environment
* Error compiling program against SDL2 with -std=c++11 g++ flag
2013-07-05 23:57:19 -07:00
Sam Lantinga
10f2d9ded3 Added SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS to the documentation for the joystick and game controller APIs 2013-07-03 12:31:40 -07:00
Sam Lantinga
822fa46bfe Not using SDLmain on Windows is just fine, don't fail the initialization if the program implements WinMain() and then doesn't call SDL_SetMainReady().
This broke Steam's Big Picture game controller support.

I also added some more documentation so people know why main() is overridden on various platforms.
2013-06-28 22:44:49 -07:00
Jørgen P. Tjernø
ac9d81df00 Remove / update references to 1.2. 2013-06-27 17:07:24 -07:00
Sam Lantinga
13787068f8 Fixed bug 1916 - SDL_Keysym contains a deprecated field for unicode which may be removed.
Philipp Wiesemann

SDL_Keysym contains a deprecated field for unicode which may be removed for SDL 2.0 release.

As far as I can tell the field is not set on all "major" platforms and therefore will not be useful for most users. Its existence in a public header therefore becomes (in my opinion) only confusing.
2013-06-18 00:39:47 -07:00
Philipp Wiesemann
39a52070c6 Changed comment to be used by doxygen. 2013-06-16 12:00:54 +02:00
Sam Lantinga
f35af890ee Allow users to define SDL_STDINC_NO_INLINES if they don't want the inline functions defined.
This is useful, for example, if the standard config defines HAVE_SETENV but you're building with C99 that doesn't include that feature.
2013-06-13 22:30:02 -07:00
Sam Lantinga
d8b6e04ab1 Fixed SDL building with the minimal configuration 2013-06-13 22:10:10 -07:00
Philipp Wiesemann
1e57fbb3ea Updated names of README files in source comments. 2013-06-09 11:58:31 +02:00
Sam Lantinga
cdc319cb12 This patch isn't needed because you have the window and can do [nswindow contentView] yourself.
I'm rolling this back so we minimize the things exposed that we have to keep consistent in the API.
2013-06-05 21:31:22 -07:00
Sam Lantinga
6a0ed22cdc Added some extra protection to notify the developer if they haven't initialized the application properly.
This will help reduce issues like that reported in bug 1819:

Wouter van Oortmerssen 2013-04-23 20:12:07 EDT
#0  0x01d1e881 in __HALT ()
#1  0x01c58971 in _CFRuntimeCreateInstance ()
#2  0x02e4acc1 in GSFontCreateWithName ()
#3  0x00adc0e1 in UINewFont ()
#4  0x00adc24c in +[UIFont systemFontOfSize:traits:] ()
#5  0x00adc298 in +[UIFont systemFontOfSize:] ()
#6  0x009fb5d9 in +[UITextFieldLabel defaultFont] ()
#7  0x00a8ccd5 in -[UILabel _commonInit] ()
#8  0x00a8ce14 in -[UILabel initWithFrame:] ()
#9  0x00a052eb in -[UITextField createTextLabelWithTextColor:] ()
#10 0x009fbede in -[UITextField initWithFrame:] ()
#11 0x00152ead in -[SDL_uikitview initializeKeyboard] at /Users/aardappel/lobster/external/SDL-2.0.0-7046/Xcode-iOS/SDL/../../src/video/uikit/SDL_uikitview.m:208
#12 0x0015290c in -[SDL_uikitview initWithFrame:] at /Users/aardappel/lobster/external/SDL-2.0.0-7046/Xcode-iOS/SDL/../../src/video/uikit/SDL_uikitview.m:50
#13 0x00153b5b in -[SDL_uikitopenglview initWithFrame:scale:retainBacking:rBits:gBits:bBits:aBits:depthBits:stencilBits:majorVersion:] at /Users/aardappel/lobster/external/SDL-2.0.0-7046/Xcode-iOS/SDL/../../src/video/uikit/SDL_uikitopenglview.m:53
#14 0x001524ff in UIKit_GL_CreateContext at /Users/aardappel/lobster/external/SDL-2.0.0-7046/Xcode-iOS/SDL/../../src/video/uikit/SDL_uikitopengles.m:114
#15 0x0015078f in SDL_GL_CreateContext at /Users/aardappel/lobster/external/SDL-2.0.0-7046/Xcode-iOS/SDL/../../src/video/SDL_video.c:2666
#16 0x000d8c5c in SDLInit(char const*, vec<int, 2>&) at /Users/aardappel/lobster/dev/xcode/lobster/../../src/sdlsystem.cpp:193
2013-06-05 21:23:59 -07:00
Jørgen P. Tjernø
3bff17cb2e Joystick: Only send joy events when focused.
This changes makes it so that you only receive joystick (and implicitly
gamecontroller) input events when your application has keyboard focus.
If you'd like to still receive events when your application is in the
background, set the SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS hint to "1".

This fixes http://bugzilla.libsdl.org/show_bug.cgi?id=1892
2013-06-05 15:11:38 -07:00
Philipp Wiesemann
6e78c6aff1 Fixed doxygen warnings and corrected documentation in header files. 2013-06-05 23:33:15 +02:00
Azamat H. Hackimov
3645242ba8 Fix compilation with libX11 >= 1.5.99.902.
These changes fixes bug #1769 for SDL2
(http://bugzilla.libsdl.org/show_bug.cgi?id=1769).
2013-06-02 20:20:18 +06:00
Philipp Wiesemann
d6dbb779f0 Changed documentation in header because LocalReferenceHolder not public API. 2013-06-02 14:27:54 +02:00
Sam Lantinga
b0b6b803fc Fixed bug 1882 - SDL_GetKeyboardState should return const.
Yuri K. Schlesner

The array returned by SDL_GetKeyboardState is also used internally by SDL to keep track of pressed/released keys and must not be modified, lest weird behaviour occurs. Because of this I believe it's return type should be changed to return a const pointer, which will provide a code indication of that fact.
2013-06-02 01:09:12 -07:00
Sam Lantinga
028c19b92b When the window is resized, the viewport is automatically reset.
This resolves lots of confusion around resizable windows.  Most people don't expect a viewport to be implicitly set when the renderer is created and then not to be reset to the window size if the window is resized.

Added common test command line parameters --logical WxH and --scale N to test the render logical size and scaling APIs.
2013-05-29 03:22:19 -07:00
Sam Lantinga
23f33cb76c Fixed bug 1622 - SDL_RenderSetViewport with empty SDL_Rect raises wrong error for OpenGL rendering backend
It's now legal to set an empty viewport rect - it will prevent any rendering.

Also added an API to query the output size: SDL_GetRendererOutputSize()
2013-05-29 03:07:55 -07:00
Sam Lantinga
85f91bdb30 Added a comment to say why C runtime is off by default 2013-05-26 16:08:15 -07:00
Sam Lantinga
c5701fe360 Don't use the C runtime library on Windows, to avoid C runtime dependencies and manifest issues. 2013-05-26 15:50:20 -07:00
Sam Lantinga
1e9722a016 Don't assume the XAudio2 APIs will never be available 2013-05-26 11:39:19 -07:00
Philipp Wiesemann
d06a0935e6 Corrected documentation errors in header file. 2013-05-26 12:30:52 +02:00
Sam Lantinga
d464d16a8f Fixed Haiku build issue with missing extension support.
The visibility attribute warnings in Haiku gl.h can be fixed by editing gl.h and changing the line:
#elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
to
#elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))

as described in: http://dev.haiku-os.org/ticket/8882
2013-05-21 22:48:50 -07:00
Ryan C. Gordon
723af2b82a Backed out changeset b69dfd56e1b0
This was clearly not the right fix.
2013-05-21 23:35:45 -04:00
Ryan C. Gordon
886e159e92 Attempt to fix Haiku buildbot (and other systems with an old glext.h). 2013-05-21 23:13:52 -04:00
Sam Lantinga
9f6a52c28a Fixed bug 1856 - (Patch) More bits for SDL_MouseMotionEvent.state
Gerry JJ

The state bitmask in SDL_MouseMotionEvent is stored in an Uint8. Unfortunately this doesn't actually have room for 8 buttons because SDL skips 4 button indices after the third mouse button (at least here on Linux x86-64, probably related to wheel handling?), so it's really just enough to track 4 buttons. For example, on a Logitech MX310 mouse I've got, even though the mouse has 6 buttons total, the left and right side buttons and extra middle button have indexes 8, 9 and 10, and the last two won't fit in the 8 bit button state.

The source of the button state (in SDL_Mouse) is already 32-bit, and the state field in SDL_MouseMotionEvent is 32-bit aligned and followed by three 8-bit padding fields. So simply changing the SDL_MouseMotionEvent state to an Uint32 and removing the padding fields fixes this, and I think it should be binary compatible, at least for little endian.
2013-05-20 23:57:10 -07:00
Sam Lantinga
91acc847ca Fixed bug 731 - No mechanism to extract the NSView for 3d library 2013-05-20 22:05:49 -07:00
Sam Lantinga
1063a72829 Fixed bug 1837 - Use error extension instead of glGetError()
Implemented support for GL_ARB_debug_output, but was unable to test it on Mac OS X.
2013-05-19 22:28:10 -07:00
David Ludwig
6356c76c2f WinRT: added preliminary joystick / game controller support (minus hotplugging) 2013-05-19 23:30:34 -04:00
Sam Lantinga
0d9b661db8 File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
Sam Lantinga
3beb70c4bc Added mobile application events, with implementations for iOS and Android 2013-05-18 12:48:50 -07:00
Andreas Schiffler
d99b036e08 Update test harness to handle test return codes; fix comment format in harness; update Main test suite to handle globally disabled features 2013-05-18 09:35:09 -07:00
Philipp Wiesemann
27e1a7ca41 Fixed Doxygen warnings. 2013-05-18 14:48:19 +02:00
Ryan C. Gordon
3928468bfa Made SDL_RectEmpty and SDL_RectEquals macros into SDL_FORCE_INLINE functions.
Fixes compiler warnings for things like this...

  if (SDL_RectEmpty(&rect)) {}

...where the macro turned into "if ( (!(&rect)) && etc )" which some compilers
thought might be a programmer mistake, as "&rect" is always "true".
2013-05-16 12:16:12 -04:00
Philipp Wiesemann
f9a69af2f0 Fixed Doxygen warnings. 2013-05-15 22:00:28 +02:00
Philipp Wiesemann
8da0b7d301 Corrected spelling in header file. 2013-05-13 23:00:50 +02:00
Philipp Wiesemann
d1cc72dd52 Fixed bug 1845 - SDL_GetNumTouchDevices() has incorrect prototype
nfxjfg

SDL_touch.h:63:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]

Is:

extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices();

Should be:

extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);
2013-05-12 13:42:20 +02:00
Philipp Wiesemann
f38eef4c83 Fixed bug 1843 - SDL_RenderClear prototype doxygen missing
Martin Gerhardy

SDL_RenderClear prototype misses documentation for the return value
2013-05-12 13:25:34 +02:00
Sam Lantinga
7253832be1 First pass on SDL render clip rect functionality 2013-05-04 04:46:00 -07:00
Philipp Wiesemann
8708a0a38d Corrected spelling in header files. 2013-04-27 17:52:58 +02:00
Philipp Wiesemann
a4858757cc Corrected spelling header file comments. 2013-04-27 14:33:27 +02:00
Philipp Wiesemann
6868b550db Corrected comment in header file. 2013-04-27 13:42:56 +02:00
Jørgen P. Tjernø
01c74a11b7 Add SDL_GetDefaultCursor.
This fixes http://bugzilla.libsdl.org/show_bug.cgi?id=1798
Thanks to Alex Szpakowski for suggestion & patch.
2013-04-24 10:42:44 -07:00
Gabriel Jacobo
d1ec7f2e3c Moved warning about SDL_AndroidGetActivity to SDL_system.h 2013-04-23 16:44:54 -03:00
David Ludwig
18180bc951 WinRT: removed the "generic" + C++/CX hack-fix, now that a better fix is in official-SDL 2013-04-21 12:49:15 -04:00
David Ludwig
6bf31495f9 WinRT: merged with latest, official, SDL 2.x sources 2013-04-21 12:38:44 -04:00
David Ludwig
95a3bba282 future-proofing for Microsoft's C++/CX extensions, whereby "generic" is a reserved keyword 2013-04-20 23:05:08 -04:00
David Ludwig
48c5ee264e WinRT: made SDL's inner WinRT CoreWindow be accessible to non-C++/CX code, in theory 2013-04-16 23:40:03 -04:00
Ryan C. Gordon
7cdcd5bebb Cleaned up the const_cast mess a little. 2013-04-16 01:38:08 -04:00
Ryan C. Gordon
98dc9306b5 Removed C++-style single-line comments from a public header (thanks, Martin!).
Fixes Bugzilla #1803.
2013-04-16 01:05:32 -04:00
Ryan C. Gordon
006f31e2ec Make the new SDL_RWops::hidden::unknown::data2 field a void*, not an int. 2013-04-14 18:05:14 -04:00
David Ludwig
f9531484c0 WinRT: hack-fixed C++/CX compile errors regarding the 'generic' field in SDL_Event, which conflicts with a C++/CX keyword 2013-04-14 11:45:01 -04:00
David Ludwig
49820874a9 WinRT: merged with latest, official, SDL 2.x sources (at rev. bea100d73d13) 2013-04-14 11:42:55 -04:00
Ryan C. Gordon
1e6e7727c6 Added a data2 field to the SDL_RWops::hidden::unknown.
This shouldn't change the ABI, since this struct had space left in the union.
2013-04-13 20:43:32 -04:00
Ryan C. Gordon
a5ca62ea98 Fixed a typo (thanks, Ethan!). 2013-04-10 22:18:10 -04:00
Ryan C. Gordon
f77b979436 More const_cast fixes for C++ apps using the public headers (thanks, Martin!). 2013-04-08 18:37:50 -04:00
Ryan C. Gordon
76435d933b Corrected some stdinc inline functions (thanks, Martin!).
qsort() returns void, so remove the "return" keyword, plus some C++
 const_casting magic.

 Fixes Bugzilla #1785.
2013-04-04 11:35:22 -04:00
Ryan C. Gordon
7635069643 Fixed compiler warnings in Mac Xcode builds. 2013-04-03 11:58:04 -04:00
Ryan C. Gordon
f3c21ea99e Another attempt at fixing compiler warnings for SDLTest_SurfaceImage_t. 2013-04-03 11:49:25 -04:00
Ryan C. Gordon
09c6b9cdfb Possibly fix compiler warnings, simplify SDLTest_SurfaceImage_t definition. 2013-04-03 11:38:05 -04:00
Sam Lantinga
d7bd3b7307 Fixed bug 1782 - SDL_opengl.h header disabled on FreeBSD
q66

The SDL_opengl.h header contains this:

#ifdef __FreeBSD__  /* !!! FIXME: temp compiler warning fix... */
#define NO_SDL_GLEXT 1
#endif

However, I can't seem to find what kind of compiler warning it was and it makes it unusable to use on FreeBSD. If I comment out these lines on my machine, everything works fine - I use FreeBSD 9-STABLE (x86_64, gcc and clang both, the same in a x86 chroot). All I could find is that this was causing an error on FreeBSD 8, but I can't test that on my machine (maybe if I set up some FreeBSD 8 chroot).

I set up a 8.2 chroot and investigated the problem. Apparently this issue was fixed in Mesa 7.6 (and in Git, June 4 2009, but it didn't get into 7.5). By the time those lines were added, FreeBSD contained the libGL port version 7.4.4, which suffered from the issue, but on April 2012 the version was updated to 7.6, which is available for FreeBSD 8 and FreeBSD 9 alike, which means those three lines should be safe to remove (it'll work fine for everyone with sufficiently up to date ports).
2013-04-01 23:15:21 -07:00
David Ludwig
44e81071eb WinRT: made WinRT path retrieval be available in both UCS-2 and UTF-8 flavors 2013-04-01 21:33:06 -04:00
Ryan C. Gordon
16cdc59bab Make SDL_SetError and friends unconditionally return -1.
This lets us change things like this...

    if (Failed) {
        SDL_SetError("We failed");
        return -1;
    }

...into this...

    if (Failed) {
        return SDL_SetError("We failed");
    }


 Fixes Bugzilla #1778.
2013-03-31 12:48:50 -04:00
Ryan C. Gordon
171ad2ddcd Corrected function signature on SDL_strtod_inline() (thanks, Axel!).
Fixes Bugzilla #1774.
2013-03-29 21:29:57 -04:00
Ryan C. Gordon
cf94d2de94 Don't use __builtin_clz() on gcc2. (thanks, Axel!)
Fixes Bugzilla #1771.
2013-03-29 21:16:30 -04:00
Ryan C. Gordon
a9eb1f14ea Fixed compiler warnings with SDL_FORCE_INLINE on gcc2. (Thanks, Axel!)
Fixes Bugzilla #1770.
2013-03-29 21:13:16 -04:00
Sam Lantinga
4d92e1780f We're using the alpha component of the palette entries, let's name it appropriately. 2013-03-24 09:56:45 -07:00
Sam Lantinga
ba643a7daa Updated the license listed in the header, fixing bug 1768 2013-03-23 13:03:36 -07:00
Sam Lantinga
20218f7e77 Fixed bug 1764 - Integer Precision Loss During Compilation
Phil Sampson

/Library/Frameworks/SDL2.framework/Headers/SDL_stdinc.h:345:28: Implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int'
2013-03-19 22:02:34 -07:00
Sam Lantinga
4b50e8b609 Fixed bug 1763 - Constify SDL_UpdateWindowSurfaceRects()
Ryan C. Gordon

With this function...
   SDL_UpdateWindowSurfaceRects(SDL_Window * window, SDL_Rect * rects, int numrects);
...is there any reason rects isn't "const SDL_Rect *" ?
2013-03-19 21:53:33 -07:00
Sam Lantinga
96627b3e6b The platform define for the PSP is __PSP__ 2013-03-17 09:45:40 -07:00
Sam Lantinga
f0af9a3e70 Removed Nintendo DS support since nobody has volunteered to maintain it for over a year. 2013-03-17 09:44:58 -07:00
Captain Lex
a18bccd5f3 Add PSP support 2013-03-17 20:07:02 +08:00
Sam Lantinga
562dfede27 Fixed more const issues with C++ 2013-03-16 11:00:04 -07:00
Sam Lantinga
561c6ca3d6 Fixed const correctness issue with C++, and fixed building SDL_memcpy4 with 32-bit gcc. 2013-03-15 11:56:28 -07:00
Sam Lantinga
ad801e12f4 Clarified inline function documentation, removed obsolete Metrowerks compiler directive. 2013-03-14 23:10:51 -07:00
Ryan C. Gordon
28a15d3609 Replace all the "static __inline__" functions with SDL_FORCE_INLINE. 2013-03-15 01:09:19 -04:00
Ryan C. Gordon
1fa34e72be Improvements to stdlib.
All SDL_* functions are always available as real symbols, so you can always
link against them as a stable ABI. By default, however, all the things that
might have dithered down to macros in your application are now force-inlined,
to give you the same effect as before and theoretically better performance,
but still solve the classic macro problems.

Elsewhere, we provide real functions for these things that simply wrap the
inline functions, in case one needs to have a real function available.

Also: this exposed bugs: SDL_abs() does something different if you had the
macro vs the libc function, SDL_memcpy() returns a void* in the function
but not the macro, etc.
2013-03-15 01:01:20 -04:00
Ryan C. Gordon
fae7c9cf7d Added an SDL_FORCE_INLINE macro. 2013-03-15 01:02:30 -04:00
Andreas Schiffler
157d9c6b00 Fix bug 122 - SDL_RWops bug fixes: set RWops.type field, add input validation, add test coverage 2013-03-13 08:35:03 -07:00
Andreas Schiffler
c6e3903e5b Fix bug 1560 - SDL_RWFromConstMem write operation returns -1 but should return 0. 2013-03-12 09:10:37 -07:00
Ryan C. Gordon
e097576967 First shot at Windows XInput haptics. 2013-03-10 13:05:47 -04:00
Andreas Schiffler
449a8da224 Add parameter checking to SetWindowSize functions; add tests to video suite 2013-03-08 23:33:07 -08:00
Sam Lantinga
b6d332f3ab Updated SDL_HINT_GAMECONTROLLERCONFIG documentation to reflect that it only takes effect before init. 2013-03-08 16:27:05 -08:00
Ryan C. Gordon
ec1318bf1a Changed SDL_INIT_EVERYTHING to only request currently-known subsystems. 2013-03-08 11:38:08 -05:00
Sam Lantinga
8c502e53f0 Don't re-read the hints when opening the game controller. Instead use SDL_GameControllerAddMapping() to add hints after initialization. 2013-03-08 10:09:51 -08:00
Sam Lantinga
e4ff0d5a17 Put the real SDL_AtomicCAS() and SDL_AtomicCASPtr() symbols into the library. 2013-03-07 20:42:55 -08:00
Sam Lantinga
2952d9bf48 Changed the name of SDL_mutexP() SDL_mutexV() 2013-03-07 20:12:40 -08:00
Sam Lantinga
e04e170169 The joystick events contain a joystick instance ID, which is a signed value, with -1 being invalid. 2013-03-06 11:59:21 -08:00
Sam Lantinga
74137ce784 Removed multi-input events, since we removed the unimplemented API recently. 2013-03-06 11:59:15 -08:00
Edward Rudd
e4d41effe3 Add SDL_TryLockMutex and implementations for all platforms 2013-03-05 18:54:55 -05:00
Edward Rudd
f6e2a00b15 add hint to allow disabling the use of Xinput. 2013-03-05 18:01:59 -05:00
Edward Rudd
3e7df38c71 add new gamecontroller APIs
- add mappings after init (or even before w/o using the hint)
- get string for axis
- get string for button
- get mapping string for controller or for GUID
- new event to notify when a controller is remapped. (e.g. mapping was changed via the AddMapping method)
2013-03-05 17:59:36 -05:00
Sam Lantinga
1916ec2de3 Updated touch API
* Normalized touch coordinates as floats in the 0...1 range
* Removed unused touchpad concepts from the API
* Added API functions to get active touch devices and current finger state
2013-03-03 01:01:33 -08:00
Sam Lantinga
a2aa3983b3 Added a mouse ID to the mouse events, which set to the special value SDL_TOUCH_MOUSEID for mouse events simulated by touch input. 2013-03-02 20:44:16 -08:00
Sam Lantinga
db3cba4095 Fixed the joystick id usage in the joystick and game controller events. 2013-03-02 17:51:32 -08:00
Sam Lantinga
834cbe125f Updated the link to the USB usage page document 2013-02-28 20:01:17 -08:00
Sam Lantinga
f0bf08280b Fixed gcc pedantic warnings in public headers 2013-02-26 20:41:28 -08:00
Jørgen P. Tjernø
a387ff7086 sdl2
- fix atomic header to compile happily under msvc 6.0
2013-02-25 16:52:48 -08:00
Jørgen P. Tjernø
e2b192f98d sdl2
- change the windows scancode logic to use the scan code value in lparam rather than VK's to get a stable scancode value across different KB layouts
2013-02-25 16:52:42 -08:00
Ryan C. Gordon
3104ca4190 Added SDL_GameControllerUpdate(). 2013-02-25 01:51:21 -05:00
Ryan C. Gordon
ad75661c46 Added SDL_haptic.h to SDL.h. 2013-02-25 01:50:59 -05:00
Ryan C. Gordon
b7b7f889c5 Changed the game controller enum types to match SDL naming conventions. 2013-02-25 00:56:21 -05:00
David Ludwig
7b0ad782e6 WinRT: build fixes 2013-02-23 20:12:14 -05:00
David Ludwig
db53df0697 WinRT: merged with latest, official, SDL 2.x code 2013-02-23 20:01:46 -05:00
Sam Lantinga
d486363049 The input API was never implemented, so removing it before release. 2013-02-19 05:39:19 -08:00
Sam Lantinga
019c60c1e8 Happy New Year! 2013-02-15 08:47:44 -08:00
Sam Lantinga
2cfcf17348 Updated documentation with info about the wiki
We're no longer under construction, baby!
2013-02-14 15:56:33 -08:00
Andreas Schiffler
857ddffc40 Add tests to SDLtest suite 2013-02-13 23:10:29 -08:00
Jørgen P. Tjernø
75626eac76 New SDL_MSBIndex, updated VS projects, cleanup gamecontroller.
- Updated Visual Studio 2010 project with SDL 2.0 library names
- Don't use a 256 byte LUT, but rather <32 bytes of data on the stack.
- Cleanups in SDL_gamecontroller.h
2013-02-13 17:19:21 -08:00
Andreas Schiffler
37203106e0 Fix fuzzer random boundary functions; add tests for fuzzer 2013-02-12 22:23:42 -08:00
Jørgen P. Tjernø
29f980d205 Check bounds in SDL_IsGameController. Switch two functions to SDL_bool.
Switches SDL_GameControllerGetAttached and SDL_IsGameController to
       return SDL_bool, instead of int.
2013-02-12 17:07:21 -08:00
Jørgen P. Tjernø
e8a48ee6c0 Don't clobber refcounting in SDL_Init.
- Fixes bug 1712 by not overwriting SDL_SubsystemRefCount in SDL_Init.
       - Removes the SDL_initialized variable, and makes SDL_SubsystemRefCount
         the canonical source of truth for whether or not a subsystem has been
         initialized.
       - Refactors SDL_InitSubSystem and SDL_QuitSubSystem to use helper
         functions to manage refcount.
       - Adds automated tests for SDL_Init/Quit*.
       - Adds SDL_bits.h which contains SDL_MostSignificantBitIndex.
2013-02-12 11:47:31 -08:00
David Ludwig
e73e2ca8d9 WinRT: consolidated all WinRT path-retrieval functions into one function 2013-02-09 22:48:19 -05:00
David Ludwig
aa44094749 WinRT: provided access, via SDL_GetWindowWMInfo, to SDL's WinRT CoreWindow 2013-02-09 14:35:06 -05:00
David Ludwig
11f36eaddb WinRT: added a function to retrieve the root path to the installed app 2013-02-03 12:49:12 -05:00
David Ludwig
2ef67300a3 WinRT: made path retrieval functions return wide-char strings 2013-02-03 12:34:34 -05:00
David Ludwig
7eb00a855c WinRT: use OS-native vsnprintf, which allows SDL_Log to format wide strings (via %ls) 2013-02-03 12:33:15 -05:00
David Ludwig
4f6ffdc590 WinRT: started refactoring Direct3D 11.1 code into a new SDL_Renderer backend 2013-02-02 19:32:44 -05:00
David Ludwig
4d3efcce33 WinRT: added platform-specific APIs to access common, writable folder paths 2013-01-22 21:45:59 -05:00
Sam Lantinga
b2bcc76cd9 Fixed building SDL under Xcode 2013-02-11 11:09:55 -08:00
Sam Lantinga
e070132e57 Fixed typo in documentation 2013-01-27 15:53:24 -08:00
Tim Angus
0057af3d90 Fix warning in SDL_keyboard.h 2013-01-17 11:54:14 +00:00
Andreas Schiffler
0720db59b2 Update SDL_InvalidParamError to take param name; add additional fuzzer function; add new tests to keyboard test suite; improve surface test suite 2013-01-12 22:58:12 -08:00
Andreas Schiffler
298c11033b Add new internal error message for invalid parameters; add validation of input rect in SDL_SetTextInputRect; add test cases for SDL_SetTextInputRect to keyboard suite 2013-01-11 20:36:39 -08:00
Gabriel Jacobo
f997d045c5 Android: Access APK files using AssetFileDescriptor 2013-01-08 09:30:53 -03:00
David Ludwig
1221e49e58 WinRT: added support for the SDL_loadso APIs, via LoadPackagedLibrary 2012-12-31 10:30:38 -05:00
David Ludwig
b2fc5e5186 WinRT: fixed XAudio2 crash bug + enabled XAudio2 backend 2012-12-30 12:57:33 -05:00
Sam Lantinga
30cf30ad23 Fixed bug 1653 - comma at the end of enum
Martin Gerhardy 2012-11-30 03:07:14 PST

SDL_gamecontroller.h:61:29: warning: comma at end of enumerator list [-pedantic]
2012-12-31 16:29:01 -08:00
Sam Lantinga
06f8fe85cf Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()
Also fixed Cocoa implementation so that it affects client area, not the whole window area.
2012-12-31 12:15:25 -08:00
Sam Lantinga
ad65f9e5a4 Added SDL_GetDisplayName(), with implementation for Mac OS X 2012-12-31 11:07:46 -08:00
Sam Lantinga
c856925d3e Renamed SDL_GetWindowDisplay() to SDL_GetWindowDisplayIndex() 2012-12-31 10:29:17 -08:00
Sam Lantinga
f425fe1358 Improvements from Alfred:
- Added new SDL_HINT_ALLOW_TOPMOST hint, when set to "0" then never set the topmost bit on a window. Useful when debugging fullscreen issues.
- fixed crash in windows joystick scanning if we failed to load the xinput dll
- added support for SDL_WINDOW_FULLSCREEN_DESKTOP under windows
- synthesize relative mouse movements if directinput fails to send relative moves, happens under virtual box.
2012-12-31 09:30:15 -08:00
Ryan C. Gordon
2d97db998b Better compiler warning fix for gcc2. 2012-12-28 20:01:41 -05:00
Ryan C. Gordon
a2d1bcb337 Fixing buildbot on Haiku.
Damn you, gcc2.
2012-12-28 18:15:02 -05:00
Ryan C. Gordon
b71c7f092b Replaced Gnome screensaver hack with D-Bus messages to org.gnome.ScreenSaver. 2012-12-28 03:46:55 -05:00
Andreas Schiffler
e00532130b Add surface test suite; minor improvements to render suite; refactor image saving into test lib compare function; fix for Haiku build 2012-12-26 22:26:44 -08:00
Andreas Schiffler
669e4e9a21 Added audio test suite; minor code cleanups in test lib 2012-12-24 14:43:57 -08:00
Sam Lantinga
cc09717698 Fixed const correctness in the test harness 2012-12-22 17:24:14 -08:00
Sam Lantinga
2269018714 Merged Andreas' changes 2012-12-22 16:52:00 -08:00
Andreas Schiffler
add645da12 Test lib updates: updated harness to support filtering, added surface comparer, updated interface to test images; added Render test suite from GSOC project 2012-12-22 16:06:55 -08:00
Sam Lantinga
6265362318 The latest version of MinGW-w64 has the necessary headers and libraries: http://mingw-w64.sourceforge.net/ 2012-12-22 11:23:18 -08:00
Andreas Schiffler
ead556e41f Add image data definitions (for render tests) to test lib 2012-12-20 08:50:36 -08:00
Ryan C. Gordon
7007dc6ac2 Patched to compile when SDL_ASSERT_LEVEL is zero. 2012-12-18 06:35:49 -05:00
David Ludwig
1d8ca8fb11 WinRT: merged with the latest official SDL source 2012-12-16 22:02:01 -05:00
Andreas Schiffler
f9c94c75e8 Refactor/fix test lib harness, assert and log component; add harness driver; port platform suite from GSOC code 2012-12-14 23:05:34 -08:00
Sam Lantinga
26cf48ded8 Improvements from Alfred:
- Add new SDL_WINDOW_FULLSCREEN_DESKTOP video mode, makes a fullscreen window the size of the desktop (i.e no window manager mode change)
- Fix crash in warp mouse if you specified null as the window
- Added new SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS Hint, if set to 0 then don't minimize a fullscreen window on focus lost (if not set or set to non-zero then minimize on focus loss)
2012-12-15 00:30:17 +00:00
Ryan C. Gordon
ed4988c379 Fixed comment on SDL_JoystickGetGUIDString(). 2012-12-11 16:53:38 -05:00
Sam Lantinga
eee39a0603 Don't build with X11 by default since it's not included with the latest versions of Mac OS X. Cocoa is the preferred path here. 2012-12-11 12:03:00 -08:00
Sam Lantinga
10abca2c02 Changes from Alfred:
- rename JoystickGUID -> SDL_JoystickGUID
- change SDL_JoystickGetGUIDString to take the string as an arg, rather than doing a malloc
2012-12-11 11:54:32 -08:00
Ryan C. Gordon
211e1cb7ec Updated Linux joystick code to support hotplug, GUIDs, etc.
This uses libudev for hotplug, but it's optional, so we'll just try to find
 some reasonable defaults without it (maybe an older Linux box or under
 FreeBSD's Linux emulation?).
2012-12-11 12:07:06 -05:00
Andreas Schiffler
e1c75c0fc9 Added existing common.c/.h functions to test lib; minor assert refactoring 2012-12-09 17:56:19 -08:00
Andreas Schiffler
e96fd5ab17 Added to harness in test lib (work in progress) 2012-12-04 19:21:10 -08:00
Andreas Schiffler
ca03267939 Update assert API in test lib; add to and harness; add test lib to VS2010 and VS2012 solution; fix VS2012 solution; fix compiler warning 2012-12-01 14:48:30 -08:00
Andreas Schiffler
7c313311a4 Add log, assert and harness (partial) to test lib 2012-11-30 23:25:34 -08:00
Andreas Schiffler
8515d11219 Add crc32 and md5 to test lib 2012-11-28 19:19:57 -08:00
Andreas Schiffler
2cfb6fbb8e Add fuzzer to test lib 2012-11-27 21:40:46 -08:00
Sam Lantinga
3f5fd55965 Organized joystick hotplug code a bit.
Cleaned up names, return types, etc.
2012-11-27 00:58:12 -08:00
Andreas Schiffler
8ee87a4da7 Add random module to test lib 2012-11-26 23:12:47 -08:00
Sam Lantinga
23950f0183 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds 2012-11-26 16:37:54 -08:00
David Ludwig
9fc6a63d06 Merged with latest official SDL code 2012-11-26 16:58:41 -05:00
Sam Lantinga
9c2cdf677b Work in progress on an SDL test library 2012-11-26 07:53:56 -08:00
David Ludwig
aca89bc12b WinRT: fixed Win32 builds by prevented __WINRT__ from being defined 2012-11-25 14:45:04 -05:00
David Ludwig
a88bd2513b WinRT: got timers working 2012-11-24 12:07:35 -05:00
David Ludwig
3df1f642d6 WinRT: cleaned up SDL_platform_windowsrt.h 2012-11-24 11:46:15 -05:00
David Ludwig
c728870637 WinRT: disabled the XAudio2 backend, pending work on stability and quality 2012-11-24 11:20:59 -05:00
David Ludwig
eb5bc65363 WinRT: cleanups in SDL_platform.h 2012-11-23 00:02:27 -05:00
David Ludwig
a10ba5bcb9 WinRT: added a skeleton SDL backend for C++11-based threads 2012-11-22 23:03:56 -05:00
David Ludwig
18cc7d9a0c WinRT: got the XAudio2 backend compiling (but not running, yet) 2012-11-22 22:34:50 -05:00
David Ludwig
7a6a66c59e WinRT: made SDL_platform.h auto-detect WinRT 2012-11-22 13:11:05 -05:00
DavidLudwig
4f845c6e57 Merged with latest official SDL sources. 2012-11-12 13:25:44 -05:00
Sam Lantinga
d3d6706dfc SDL no longer grabs the keyboard by default on X11.
You can re-enable that functionality by setting a new hint SDL_HINT_GRAB_KEYBOARD
2012-11-07 15:55:43 -08:00
Sam Lantinga
4ff7b0238c Added SDL_ReadU8() and SDL_WriteU8() for consistency with the rest of the API. 2012-11-04 23:44:13 -08:00
Sam Lantinga
9e89faaf15 Synchronized the on-screen keyboard state with whether we are accepting text input.
The functions to show/hide/toggle the on-screen keyboard have been folded into the text input state.
Calling SDL_StartTextInput() will automatically show the on-screen keyboard if it's available.
Calling SDL_StopTextInput() will automatically hide the on-screen keyboard if it's available.
There is a new API function SDL_IsTextInputActive() which will return whether text input is currently active.
Text input is disabled by default, you must call SDL_StartTextInput() when you are ready to accept text input.
SDL_HasScreenKeyboardSupport() no longer needs to be passed a window.
The iPhone-specific on-screen keyboard functions have been removed.
2012-11-04 21:53:28 -08:00
David Ludwig
d202bff7f5 merged with latest sources 2012-11-04 13:22:40 -05:00
David Ludwig
1621b95c10 WinRT: fixed SDL_main-related linker error when __WINRT__ is defined in an app 2012-11-04 13:17:18 -05:00
Sam Lantinga
2a972eadfe Added documentation on loading assets on Android. 2012-11-04 09:45:18 -08:00
DavidLudwig
3114de8407 Merge with latest, official SDL code 2012-11-04 09:46:59 -05:00
David Ludwig
345e645cb5 WinRT: created a skeleton for a video driver, using a copy of the dummy driver for a base 2012-10-27 22:48:04 -04:00
David Ludwig
7b60f488d9 WinRT: disabled threads to prevent SDL_Init(SDL_INIT_VIDEO) from crashing 2012-10-27 22:27:51 -04:00
David Ludwig
39084bc6b8 WinRT: made SDL.dll compile for ARM (and not just x86 or x64) 2012-10-27 18:39:09 -04:00
David Ludwig
db346c5593 WinRT: used Win32-style DECLSPEC and SDLCALL macros (for building a .dll) 2012-10-27 18:21:31 -04:00
Sam Lantinga
e7ea5f6646 Added an API to get the size of a file - WARNING! ABI CHANGE! 2012-11-03 18:43:36 -07:00
Ryan C. Gordon
6c4223b251 More compiler warning fixes. 2012-11-02 14:03:14 -04:00
Ryan C. Gordon
28fbd54ae5 Fixed compiler warnings about "/*" inside a multi-line comment. 2012-11-02 14:00:44 -04:00
Sam Lantinga
525b3ca0e9 Added some platform specific API functions for Android:
SDL_AndroidGetJNIEnv()
SDL_AndroidGetActivity()
SDL_AndroidGetInternalStoragePath()
SDL_AndroidGetExternalStorageState()
SDL_AndroidGetExternalStoragePath()
2012-11-02 02:22:32 -07:00
Sam Lantinga
017bece619 We might actually have PI 2012-11-01 00:12:57 -07:00
Sam Lantinga
4bbe3a7073 Added an assert log category, and NSLog support on Mac OS X and iOS 2012-10-30 12:30:02 -07:00
Sam Lantinga
07f0419650 Added some documentation on the behavior of SDL_ShowMessageBox() 2012-10-30 10:07:32 -07:00
Sam Lantinga
35feaaaf51 It turns out that UCS2 and UCS4 are defined as big-endian encodings 2012-10-28 13:03:45 -07:00
Sam Lantinga
82f91da2d0 Added API for simple messagebox, courtesy of Mike Sartain 2012-10-23 17:11:22 -07:00
Sam Lantinga
93902fa034 Updated the copyright date on the default config file 2012-10-23 15:59:07 -07:00
Sam Lantinga
73c7d679a0 Switch C++ comment to C comment 2012-10-21 22:18:36 -07:00
Sam Lantinga
49796bf2b6 Fixed another gcc <-> Visual C++ ABI issue 2012-10-20 00:49:08 -07:00
Sam Lantinga
9090fb9b4c Make it possible to build a DLL with mingw that's ABI compatible with Visual C++ built applications 2012-10-20 00:14:58 -07:00
David Ludwig
3c1316c04c Got a bare-bones version of SDL compiling for Windows RT. Dummy drivers are used in some places. Very little Windows-specific code (from the Win32 version of SDL) is used. 2012-10-17 21:43:20 -04:00
DavidLudwig
32ab0b21a7 merged with the latest, official, SDL 2 sources 2012-10-15 21:14:13 -04:00
Sam Lantinga
9a6b1c641a Added SDL_GetRenderTarget() API function
Also fixed a bug with setting logical size for a render target.
2012-10-12 02:20:10 -07:00
Sam Lantinga
a1f39a5854 I'm becoming more and more convinced that the application should never use XRandR, and it's the window manager's responsibility to track and manage display modes for fullscreen windows.
Because it's so broken, I'm going to disable XRandR by default.  You can still enable it via environment variable or application hint (SDL_HINT_VIDEO_X11_XRANDR)
2012-10-04 13:50:41 -07:00
Sam Lantinga
aab04f8c71 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize() 2012-10-01 22:30:07 -07:00
Sam Lantinga
8e121270fa Added SDL_RenderSetScale() and SDL_RenderGetScale() 2012-10-01 20:59:33 -07:00
Sam Lantinga
ed4f2e1ccf Made it clear that locking a streaming texture is a write-only operation. 2012-09-28 03:29:36 -07:00
Sam Lantinga
225faf6595 Turned the X11 mode extension environment variables into hints so they can be more easily set from applications. 2012-09-27 11:29:13 -07:00
Gabriel Jacobo
8408ace068 Make SDL_atomic.h depend on the void pointer size determined at compile time
rather than at configure time. As OS X supports lipo'ed versions of SDL for i386
and x86_64, a single set of headers that work for both architectures is desired.
2012-09-26 15:57:28 -03:00
Sam Lantinga
e52130b426 Fixed bug 1606 - SDL does not implement SDL_GetPowerInfo() for Android.
Philipp Wiesemann 2012-09-22 05:26:11 PDT

currently SDL (HG) does not implement the power management functionality of
SDL_GetPowerInfo() for Android.

I attached a patch which tries to implement this functionality (JNI only, API
5). It supports plugged state and battery percent return values but not
remaining seconds (which are not available on Android).
2012-09-23 01:37:44 -07:00
Ryan C. Gordon
b3b40aac16 Removed Windows CE support from SDL 2.0.
It's a long-dead platform, and we don't have any way to build for, test, or
maintain it, so there's no sense in doing acrobatics to support it.

If you need Windows CE support, use SDL 1.2. If you need Windows Phone support,
send SDL 2.0 patches for the newer Windows Mobile platform.
2012-09-15 10:59:39 -04:00
Ryan C. Gordon
0c926d9aea Fixed a typo in the docs. 2012-09-14 18:18:38 -04:00
Ryan C. Gordon
49d8c6fb12 Added SDL_SetWindowBordered() API. 2012-09-13 01:43:53 -04:00
Gabriel Jacobo
ceaf031283 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576) 2012-09-03 11:16:12 -03:00
DavidLudwig
693055adb2 Merged with latest SDL2 sources 2012-09-01 07:19:49 -04:00
Sam Lantinga
03410caaaf Renamed SDL_GL_CONTEXT_PROFILE_ES2 to SDL_GL_CONTEXT_PROFILE_ES 2012-08-12 23:10:16 -07:00
Sam Lantinga
c5eed5e522 Fixed bug 1565 - some small GL context creation enhancements
Matthias Bentrup 2012-08-09 12:53:17 PDT

With OpenGL 4.3 the ARB added a new context flag for context reset isolation
and renamed the existing ES2 profile bit to ES profile bit, as it can be used
to request GLES 3 compatible contexts, too.

This patch adds these changes to SDL on Linux and Windows.

Also SDL lacks the ability to create shared contexts. This patch also adds a
new GL attribute to enable context sharing. As casting a GL context to int is
not portable, I added only a boolean attribute
SDL_GL_SHARE_WITH_CURRENT_CONTEXT, which makes the new context share resources
with the context current on the creating thread.
2012-08-12 11:16:24 -07:00
Sam Lantinga
e6d37e6522 Fixed bug 1564 - SDL has no function to open a screen keyboard on Android.
Philipp Wiesemann implemented a general on-screen keyboard API for SDL, and I switched iOS code over to use it.
2012-08-11 10:15:59 -07:00
Ryan C. Gordon
4abe53d466 Fixed building on Mac OS X with Xcode 4.4 (OS X 10.8 SDK).
I think you'll need to install Xquartz, the external-but-official replacement
 for Apple's X11, to get the Xlib headers: http://support.apple.com/kb/HT5293
2012-08-09 15:43:39 -04:00
Ryan C. Gordon
f32956dc1b Add support for (GLX|WGL)_EXT_swap_control_tear.
This required a small public API change: SDL_GL_SetSwapInterval() now accepts
 negative values, and SDL_GL_GetSwapInterval() doesn't report errors anymore
 (if it can't work, it'll return zero as a reasonable default).

If you need to test for errors, such as a lack of swap_control_tear support,
 check the results of SDL_GL_SetSwapInterval() when you set your desired
 value.
2012-08-01 20:29:36 -04:00
Sam Lantinga
d4219579f2 Fixed clang -Weverything warnings 2012-11-22 11:55:11 -08:00
stopiccot
0bb179ae8a SetMinimumWindowSize for OS X 2012-11-18 15:45:12 +03:00
Ryan C. Gordon
b8d7fecdf7 Removed some tab chars. 2012-11-21 23:00:06 -05:00
Ryan C. Gordon
4380a1eacf Removed commas at the end of enums, to make gcc's -pedantic happy.
Fixes Bugzilla #1647.
2012-11-21 22:59:42 -05:00
Sam Lantinga
ee5bc4e7ab Added code to testwm2 to test the system cursor support 2012-11-19 20:38:52 -08:00
Michael Sartain
f4161f1ea6 Add SDL_CreateSystemCursor for Windows and Linux. 2012-11-19 15:11:10 -08:00
Gabriel Jacobo
1995df04e8 Adds CMake build system by Marcus Von Appen (bug #1597) 2012-11-16 09:23:18 -03:00
Sam Lantinga
105e4c7072 Nobody will EVER use more than 8 buttons. Oh wait... Nobody will EVER use more than 32 buttons... 2012-11-12 12:14:44 -08:00
David Ludwig
76266d0aae added UIViewController pointer to SDL_SysWMinfo for iOS 2012-07-18 22:26:47 -04:00
Sam Lantinga
5fd86fdeac Fixed bug 1542 - SDL_Touch should reserve tilt_x and tilt_y
Gerry JJ 2012-07-14 19:42:23 PDT
The SDL_Touch structure currently reserves fields for tablet tilt and rotation
(marked "for future use"), but a tablet stylus can tilt in both x and y
directions in addition to rotation around itself (or, put another way, it can
rotate in x, y and z). So, the struct should probably reserve fields for both
tilt_x and tilt_y, not just tilt.
2012-07-18 15:53:33 -07:00
Sam Lantinga
719eabe5ee Improved simultaneous support for OpenGL and OpenGL ES
From Scott Percival

Okay, I think I have something for this. Tested it on GL and GLES
machines, it seems to work okay.

- Add a new SDL GL attribute SDL_GL_CONTEXT_EGL:
        - Only useful for the X11 video driver at the moment
        - Set to 1 for an EGL context, 0 to use the default for the video driver
        - Default is 0, unless library is built for EGL only
        - Should be set after SDL init, but before window/context
creation (i.e. same place you'd specify attributes for major/minor GL
version)
- After a lot of agony pondering the least-terrible way to go about
it, made it so that X11_GL_LoadLibrary and X11_GLES_LoadLibrary check
SDL_GL_CONTEXT_EGL. If no GL context exists yet, and the attribute
choice doesn't match with the checking function, then it changes all
the function pointers in the video driver and passes control on to the
new LoadLibrary method.
- Likewise, make X11_CreateWindow check this attribute before firing
off a call to X11_GL_GetVisual/X11_GLES_GetVisual
- Added a sanity check to the start of X11_GL_LoadLibrary
- Tidied up SDL_x11opengles.h
- Moved ownership of the gles_data structure over to
X11_GLES_LoadLibrary/UnloadLibrary
- Should incorporate the 3 fixes posted by Andre Heider

This is obviously quite a bit to take in, but is (at least) a proof of
concept for the approach I think EGL/GLX mingling should take. Any
comments/criticism is much appreciated.
2012-07-18 15:17:27 -07:00
Ryan C. Gordon
641161f677 Patched to compile on FreeBSD 8.2. 2012-07-11 22:20:02 -04:00
Ryan C. Gordon
0cdd02b4de Patched to compile on Mac OS X with Xcode (Unix configure already worked). 2012-07-11 20:40:02 -04:00
Sam Lantinga
c45ef572c4 Disable the SDL event pump after the SDL main routine returns, since events will be dispatched by the Cocoa event loop. 2012-06-25 11:10:34 -04:00
Sam Lantinga
5160c3d202 Created a header file for system dependent API functions, and added SDL_iPhoneSetAnimationCallback() 2012-06-22 19:19:18 -04:00
Sam Lantinga
3da89b1dd0 Updated Mac OS X and iOS projects 2012-06-21 10:41:25 -04:00
Gabriel Jacobo
2e96488df0 RenderCopyEx,rotation and flipping for all hardware/software backends (#1308) 2012-06-01 19:51:08 -03:00
Dimitris Zenios
e387df94fc 1.Fixed a memory leak inside XInput2 code
2.Replaced XKeycodeToKeysym with XkbKeycodeToKeysym since XKeycodeToKeysym is deprecated in newer X11 version
3.Rewrote testime.c since it was disabled after SDL_compat.c removal
4.Take into account common arguments also in testrelative.c
2012-05-31 19:23:30 +03:00
Dimitris Zenios
689dd07956 1.Moved all xinput2 functionality to its own file
2.Implement touch events using Xinput2.Leave evtouch as a fallback when xinput2 is not supported
2012-05-31 13:37:02 +03:00
Sam Lantinga
ff4a156632 Fixed define for consistency 2012-05-30 11:45:09 -04:00
Sam Lantinga
94597260b7 Fixed compile error with both new and old Xext headers (bug 1498) 2012-05-30 11:44:57 -04:00
Sam Lantinga
a74c7583bc Initial support for XInput2 by Dimitris Zenios
1.initial work on XInput2 support
2.Implemented relative mouse motion when XInput2 is enabled
3.Created a test app to test relative mouse motion
4.Fixed Bug #1498
2012-05-30 11:25:35 -04:00
Gabriel Jacobo
a6c03533e0 Fixes issue #1500 "SDL_RWops fails under Android 4" by removing stale Local Refs
and replacing them for their global equivalents.
2012-05-25 15:35:41 -03:00
Sam Lantinga
c24538ae24 Add OpenGL 3.X context creation support
Matthias Bentrup 2011-10-30 03:58:24 PDT

I've updated the context creation patch to include the bugfixes by Martin
Schreiber and also included a profile bit to request a ES2 compatible profile.

The wgl context creation may use 2 call to wglChoosePixelFormat if no
acceleration attribute is selected, this should work around a bug with buggy
AMD drivers (see #1254).
2012-02-20 23:37:57 -05:00
Ryan C. Gordon
a6a93eaeae Check for _STDINT_H in SDL_config_minimal.h 2012-02-07 01:26:00 -05:00
Sam Lantinga
b5844a1c07 Added a convenience function SDL_CreateWindowAndRenderer() 2012-01-22 19:22:53 -05:00
Sam Lantinga
07b8dc102e Re-added SDL_SWSURFACE, because it looks silly to always pass 0 to SDL_CreateRGBSurface() 2012-01-22 18:37:46 -05:00
Sam Lantinga
9c4c023744 Removed the SDL 1.2 compatibility API... we'll see how painful this is. 2012-01-22 18:11:41 -05:00
Sam Lantinga
128821901c Removing some more references to SDL 1.3 2012-01-22 17:26:45 -05:00
Sam Lantinga
c484f884c5 Updated to SDL 2.0, and SDL 2.0 can now be installed coexisting with SDL 1.2 2012-01-22 17:21:00 -05:00
Sam Lantinga
c5b09f0da7 You need to create the texture with the SDL_TEXTUREACCESS_TARGET flag. 2012-01-22 01:29:26 -05:00
Sam Lantinga
b291116502 Renamed SetTargetTexture() to SetRenderTarget() 2012-01-22 01:26:28 -05:00
Sam Lantinga
1af7c2fe96 Added a renderer flag to expose whether a renderer supports render to texture. 2012-01-19 21:06:47 -05:00
Sam Lantinga
9853ab62c8 Switched back to configure generating SDL_config.h
It was very confusing to have configure generate an SDL_config.h and then not have it be used when building on Mac OS X or Windows.  I'll just have to remember to use SDL_config_windows.h when building official releases that are supposed to be ABI compatible with Visual Studio.
2012-01-19 01:55:51 -05:00
Sam Lantinga
9e37906060 Implementation of render targets, by Mason Wheeler and Gabriel Jacobo
Thanks guys!
2012-01-18 22:45:49 -05:00
Sam Lantinga
47034fa31b Fixed configure build 2012-01-16 19:21:07 -05:00
Sam Lantinga
243a72784f Check for sem_timedwait(), which isn't available on some systems (including OpenBSD 2012-01-15 03:34:14 -05:00
Sam Lantinga
d4c4a98f59 Make sure that we use consistent configuration options on platforms like Windows so that command line builds and IDE builds have ABI compatibility.
Make sure we don't clobber SDL_revision.h when building from Mercurial
2012-01-14 13:21:19 -05:00
Sam Lantinga
59f51ede60 Unofficial builds should have a 0 revision number - if this accidentally gets checked in with a different revision, this file should be reverted to this content. 2012-01-14 13:17:01 -05:00
Sam Lantinga
e2df95c6f2 Fixed inline assembly warning for PPC
input constraint with a matching output constraint of incompatible type
2012-01-14 00:49:25 -05:00
Sam Lantinga
1781323edc Fixed structure alignment mismatch between Visual Studio and gcc on 64-bit architectures. 2012-01-09 07:07:43 -05:00
Sam Lantinga
07f8710f47 Fixed bug 1242 - PATCH: Improve support for OpenGL ES under X11
Scott Percival 2011-07-03 06:41:51 PDT

This submission is aimed at making life easier for OpenGL ES capable devices
running a X11 stack (e.g. Maemo, Meego, TrimSlice, other ARM SoC boards not
running Android). SDL's Pandora support already has the neccesary GLES-to-X11
glue code, however it's all ghetto'd off in Makefile.pandora and not very
flexible.

The patch:
- adds an awesome --enable-video-opengles option to configure
- re-modifies the opengles and opengles2 SDL_renderers to use function pointers
- no idea why this was removed?
- for SDL_Renderers, links in libGLESv1_CM, libGLES_CM (for PowerVR fans) or
libGLESv2 at runtime
- links in libEGL.so at runtime - the old code made an assumption that
eglFunctions could be pulled from the active GLES library, PowerVR for one
doesn't let you do that with their libGLESv2
- allows you to pick which of GLES v1 or v2 to load via
SDL_GL_CONTEXT_MAJOR_VERSION

So far I've tested this on a Nokia N900 (OMAP 3430/SGX 530 running Maemo 5) and
a Toshiba AC100 (Tegra 2 running Ubuntu 10.10). I haven't tested it on... well,
everything that isn't those two, such as a Pandora, iOS or Android device. The
Pandora specific code should be kept intact (fingers crossed), and nothing
painfully drastic has been added to the SDL_renderers. The library loading
sequence in SDL_x11opengles has been updated to accomodate both NVIDIA's
propensity to let developers get away with murder and PowerVR's alternative of
punishing every missed step.

The test apps work okay with GLES or GLES2 as the renderer. For some reason
alpha blending doesn't seem to work on the Tegra 2; last week NVIDIA pushed out
a new set of X11 GLES drivers, so I'll try and investigate once I upgrade
those. Also, this patch adds things to configure.in, include/SDL_config.h.in
and test/configure.in. I didn't know what the policy was re. committing
generated spaghetti from autotools, so ./autogen.sh has to be run again. Sorry.

I think that's about everything, let me know if there's anything I've
overlooked.
2012-01-08 02:23:37 -05:00
Sam Lantinga
1d1fc9c715 Updated iOS projects and renamed iPhoneOS to iOS 2012-01-05 21:41:55 -05:00
Sam Lantinga
aeb5be9fe8 This file keeps getting clobbered... *sigh* 2012-01-03 01:46:52 -05:00
Sam Lantinga
e256711bb9 Happy New Year! 2011-12-31 09:28:07 -05:00
Sam Lantinga
53e2399003 Fixed documentation typo 2011-12-29 13:54:22 -05:00
Sam Lantinga
2696dd4032 Fixed so the header is consistent with the source 2011-12-29 13:51:42 -05:00
Sam Lantinga
2da6fd7637 Fixes bug 1296 - SDL_SetVideoMode crashes because of unaligned MOVAPS instruction
t.grundner@goto3d.de 2011-09-01 03:59:17 PDT
I figured out what is going on. GCC 4.5.2 assumes the stack is 16 byte aligned
by default. Therefore there are no AND alignment corrections necessary if we
wish to align a stack variable to a 16 byte boundary. That is bad if your OS
ABI is not 16 byte aligned. Windows 32 bit stacks are 4 byte aligned. This
results in the above mentioned SIGSEGV. This is also no problem if I compile
both SDL.dll and my app with MingW because MinGW/GCC inserts a

        andl    $-16, %esp

instruction right in the beginning of the main function. So at least the stack
of the thread calling the main function is 16 byte aligned. But as soon as I
start to use the SDL.dll from an application not compiled by MinGW there is no
ANDL safing my app.

However there is a GCC option that can change the default stack alignment:

        -mpreferred-stack-boundary=num

Setting num=2 assumes a the stack is aligned to a 4 byte boundary. This results
in GCC inserting the necessary

        andl    $-16, %esp

into SDL_FillRect. Rebuilding SDL with

       ./configure "CFLAGS=-mpreferred-stack-boundary=2 -g -O3"

solved the problem.

IMHO this should also be a problem on Solaris.

The following links contain further information:

http://gcc.gnu.org/onlinedocs/gcc-4.5.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options

http://www.agner.org/optimize/calling_conventions.pdf
2011-12-29 05:36:39 -05:00
Sam Lantinga
4ec39d8333 Fixed bug 1336 - Added a timestamp on all SDL events
Gueniffey 2011-11-23 04:11:31 PST

The attached simple patch adds a timestamp to all SDL events. It is useful to
dismiss old events and add UI responsiveness (my application does some
extensive tasks that creates a delay in the event queue handling. With this
patch, I can deal only with the most recent events.
2011-12-29 05:13:55 -05:00
Ryan C. Gordon
abe9021987 Backed out most of changeset 4b88086910d3, at Andreas's request. 2011-12-05 12:43:50 -05:00
Andreas Schiffler
5e0fdc8f9e Fix buildbot sdl-macosx-unix-x86 and sdl-macosx-amd64 compiler warnings 2011-12-05 07:41:20 -08:00
Sam Lantinga
79494aee9d First pass at a simple drag and drop API, allowing you to accept files dropped into your application. 2011-11-20 19:38:18 -05:00
Sam Lantinga
5fedcb50d8 GIMP wrote bmp files in RGBX format. Huh. 2011-11-09 22:53:44 -05:00
Sam Lantinga
76714d4f99 Fixed a typo in the header. 2011-11-07 02:25:01 -05:00
Sam Lantinga
6371c44a9e Lots of fixes importing SDL source wholesale into a new iOS project 2011-10-31 05:56:58 -04:00
Sam Lantinga
a347411651 SDL_ConvertPixels() returns 0 on success 2011-10-31 02:44:21 -04:00
Sam Lantinga
c2a6df6073 The draw color affects RenderClear() as well. (thanks to the feedback form to whoever pointed this out) 2011-10-30 17:53:54 -04:00
Sam Lantinga
66d375d59e Fixed typo - thanks Sheena! 2011-10-30 17:31:59 -04:00
Andreas Schiffler
bc907fee45 Update SDL_HasClipboardText functions to return value based on clipboard content; Fix memory leak in fallback SetClipboard implementation 2011-10-29 23:43:59 -07:00
Sam Lantinga
6d456a4116 Added SDL_GetScancodeFromName() and SDL_GetKeyFromName() 2011-10-24 21:34:54 -04:00
Tim Angus
092332dd71 * Android's InputStream::skip is apparently buggy, so instead read into a dummy buffer 2011-10-14 17:29:49 +01:00
Ryan C. Gordon
15426080c6 Specify joystick (accelerometer) support for iOS in the config header.
Fixes Bugzilla #1292.

Thanks to Vittorio Giovara for the patch!
2011-10-14 00:20:44 -04:00
Ryan C. Gordon
2ef51927fe 1.3 API CHANGE: Add support for naming threads. 2011-10-02 00:29:16 -04:00
Ryan C. Gordon
a4ede00263 Fixed compiler warnings on Haiku. 2011-09-18 03:52:08 +00:00
Andreas Schiffler
0a29e84930 Fix SDL_RectEquals define 2011-09-17 22:35:10 -07:00
Andreas Schiffler
acb9d90a85 Add NULL handling in SDL_RectEmpty and SDL_RectEquals 2011-09-16 08:25:49 -07:00
Ryan C. Gordon
b84e7104b1 Clean up the win32 compiler warnings for SDL threads, in the 1.3 branch. 2011-09-12 13:36:38 -04:00
Ryan C. Gordon
82df1959c1 Removed legacy Mac OS X dlcompat code.
It was only needed for Mac OS X 10.0 through 10.2, so it seems silly to keep
 it around for SDL 1.3.

I'll leave it in the 1.2 branch for now, though.
2011-09-09 00:34:48 -04:00
Andreas Schiffler
576988acf2 Update SDL_REVISION 2011-09-04 20:45:38 -07:00
Ryan C. Gordon
e0fe768768 Fixed another Apple typedef in SDL_opengl.h 2011-09-02 13:54:45 -04:00
Ryan C. Gordon
fefd678dfd Backed out SDL_config.h overwrite that got committed by accident. 2011-08-30 17:11:51 -04:00
Ryan C. Gordon
370cdc709c Automated merge with https://bitbucket.org/Markusk/sdl-gsoc 2011-08-29 13:17:07 -04:00
Ryan C. Gordon
56e1918d11 Fixed missing audio on iOS. 2011-08-29 00:27:43 -04:00
Ryan C. Gordon
586e5b252b Fix another Apple conflict in SDL_opengl.h 2011-08-26 03:38:46 -04:00
Ryan C. Gordon
1248146aa2 Removed the MAC_OS_X_VERSION_10_x macros from the 1.3 branch. 2011-08-25 03:11:28 -04:00
Ryan C. Gordon
8f50763692 Fixed -pedantic warning in SDL_assert.h.
Fixes Bugzilla #1282.
2011-08-21 12:36:55 -04:00
Ryan C. Gordon
854a2e9098 Implemented XAudio2 target for Windows (and Xbox360, theoretically!). 2011-08-04 01:07:09 -04:00
Ryan C. Gordon
7de8cc401e Reworked Windows waveOut code.
Implemented multi-device support, changed name to "winmm".
2011-08-04 01:24:22 -04:00
Ryan C. Gordon
59168c5bf2 Apple uses a void* for GLhandleARB, not an unsigned int. 2011-08-04 00:46:27 -04:00
Ryan C. Gordon
4ef8847cc5 Allow Android platforms to read from .apk files via the RWOPS interface.
Fixes Bugzilla #1261.

Thanks to Tim Angus for the patch!
2011-07-29 16:51:25 -04:00
Ryan C. Gordon
75d8b324e2 Work on systems without sa_sigaction. 2011-07-20 16:35:37 -07:00
Markus Kauppila
9932ea0a03 Testing out implementation for skipping unsupported test
automatically.
2011-07-18 22:26:26 +03:00
Nathan Heisey
65e5a15393 Implemented pthread spinlocks. 2011-06-22 10:33:48 +00:00
Tim Angus
e4de79558c * SDL_IOS_IDLE_TIMER_DISABLED hint 2011-06-10 14:23:36 +01:00
Tim Angus
2b47e23dc8 * SDL_IOS_ORIENTATIONS hint 2011-06-10 14:23:24 +01:00
Sam Lantinga
2b4bb0d58b Make SDL_QuitRequested() return an SDL_bool 2011-06-12 12:23:39 -04:00
Ryan C. Gordon
a74c9aa88d Fixed gcc warnings for apps using SDL headers with -Wundef flag.
Fixes Bugzilla #1216.

Thanks to Dimitris Zenios for the patch!
2011-06-06 12:20:04 -04:00
Andreas Schiffler
40bfbbdbf9 Fixed global suite declaration segfault via external linkage declaration 2011-05-26 20:13:49 -07:00
Sam Lantinga
fa1116223a Clarified SDL_GetWindowSurface() documentation
Matthew Orlando to Sam

Someone asked in IRC whether they should free the surface from SDL_GetWindowSurface. The doc comment is a bit vague so i checked the code and revised the comment.
2011-04-22 09:06:29 -07:00
Sam Lantinga
057ae6ca57 Fixed so SDL_quit.h doesn't require SDL_compat.h 2011-04-21 09:50:29 -07:00
Ryan C. Gordon
1b953ac714 Removed assertion list terminator (just do it like a normal linked list). 2011-04-19 14:12:56 -04:00
Sam Lantinga
37865236cc Minor missing parameter name 2011-04-18 12:20:30 -07:00
Sam Lantinga
6196aa221e SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
a46d9b6758 Added SDL_GetRenderer() 2011-04-04 09:29:13 -07:00
Sam Lantinga
56c4464487 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency() 2011-03-25 14:45:04 -07:00
Sam Lantinga
f0c424685b SDL 1.3 requires a 64-bit type for the platform. 2011-03-25 13:47:49 -07:00
Sam Lantinga
73247db7d8 The API sets the priority for the current thread, not an arbitrary thread.
Implemented thread priority as the 'nice' value on Linux.  High priority threads require root permissions (you shouldn't give your game root permissions though!)
2011-03-25 12:44:06 -07:00
Sam Lantinga
eeb5f362e4 Implemented SDL_SetThreadPriority() 2011-03-25 10:47:49 -07:00
Sam Lantinga
023e6fa996 Fixed related function documentation 2011-03-22 10:48:33 -07:00
Ken Rogoway
75029512ef Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Fixed issue when calling SDL_BlitScaled() directly with src or dst rectangles that were out of bounds.
2011-03-13 22:38:41 -05:00
Sam Lantinga
a99d79de70 Fixed error because intrin.h contains C++ code and can't be included in an extern "C" block. 2011-03-15 19:37:38 -07:00
Sam Lantinga
3f21fa761c Fixed typo 2011-03-14 10:58:35 -07:00
Sam Lantinga
4fd91c5eed Added the SDL_HINT_RENDER_SCALE_QUALITY hint, which defaults to nearest pixel sampling. 2011-03-13 11:18:35 -07:00
Sam Lantinga
b710eb9280 Fixed so code will compile with SDL_config_minimal.h 2011-03-12 13:21:57 -08:00
Sam Lantinga
2d4e47a5a7 Added a function to create color cursors: SDL_CreateColorCursor() 2011-03-11 14:14:38 -08:00
Sam Lantinga
d58ee21159 Added support for the Xcursor library for color cursors 2011-03-11 13:56:53 -08:00
Sam Lantinga
069fbf4861 Gamma support is back!
New API functions:
	SDL_SetWindowBrightness()
	SDL_GetWindowBrightness()
	SDL_SetWindowGammaRamp()
	SDL_GetWindowGammaRamp()
	SDL_CalculateGammaRamp()
2011-03-11 08:49:20 -08:00
Sam Lantinga
634567b09a The MMX and 3DNow! instructions can't be compiled by 64-bit Visual Studio. 2011-03-07 22:04:10 -08:00
Sam Lantinga
821c92eab1 Fixed bitmap order interpretation; SDL defaults to MSB ordering so a bitstream corresponds to a pixel stream.
The bitmap ordering is defined such that the numbering refers to the pixel index from left to right, and the number position refers to the bit position in the byte.

SDL_BITMAPORDER_4321 is the fourth pixel at the high bit and the first pixel at the low bit (LSBFirst)

SDL_BITMAPORDER_1234 is the first pixel at the high bit and the fourth pixel at the low bit (MSBFirst)
2011-03-07 00:30:05 -08:00
Sam Lantinga
f78f25504b Added padding for better aligned access to *shift/*loss members 2011-03-06 23:54:20 -08:00
Sam Lantinga
2a60f966cb a Nintendo ds update
Frank Zago to SDL

For those interested, here's a snapshot of the current port. I did away with
most of the previous attempt which was based of the sprite engine, because the
support is limited to 128 64x64 sprites. Instead I'm using the gl engine.
The drawback is that either the frame buffer or the gl engine can be used
because there's not that much video memory on a DS.

With minimal changes to their code, it can now run the following tests: ,
testspriteminimal, testscale and testsprite2. The last 2 only run under the
emulator for some reason. The tests are not included in this patch for size
reason.

In 16 bits mode, the 16th bit indicated transparency/opacity. If 0, the color
is not displayed. So I had to patch a few core file to set that bit to 1. See
patch for src/video/SDL_RLEaccel.c and src/video/SDL_blit.h. Is that ok, or is
there a better way ?

The nds also doesn't support windowed mode, so I force the fullscreen in
src/video/SDL_video.c.  Is that ok, or is there a better way ?

To get a smaller library, I also tried to not compile the software renderer
when the hardware renderer is compiled in, and define SDL_NO_COMPAT; however
the compilation eventually fails in SDL_surface.c because SDL_SRCCOLORKEY is
defined in SDL_compat.h. Is SDL_NO_COMPAT only for application and not SDL
itself ?
2011-03-06 21:12:19 -08:00
Sam Lantinga
d32d1ee244 OSF isn't supported anymore. 2011-02-28 09:09:13 -08:00
Sam Lantinga
9f410819dc IRIX is not supported anymore. :) 2011-02-28 09:06:29 -08:00
Sam Lantinga
f7600494ed Dynamically load the Xinerama and xf86vmode extensions
This fixes a few bugs with different distributions:
http://bugs.freedesktop.org/show_bug.cgi?id=17431
http://bugs.gentoo.org/show_bug.cgi?id=246177
2011-02-28 09:01:53 -08:00
Sam Lantinga
747dbeb744 Fixed compiling AltiVec blitters 2011-02-27 22:22:58 -08:00
Sam Lantinga
d5783ef521 Use boolean value for input grab mode, like we do for fullscreen mode. 2011-02-27 20:06:45 -08:00
Sam Lantinga
0ac98043e8 Fixed altivec.h include on Mac OS X 2011-02-22 22:17:44 -08:00
Sam Lantinga
7fa84f6a78 Re-added the 3DNow! and AltiVec instruction support. 2011-02-22 21:44:36 -08:00
Sam Lantinga
f3c377a8f2 Simplified and unified the window creation process a little. 2011-02-21 22:03:39 -08:00
Sam Lantinga
73b17999c1 Implemented Cocoa_SetWindowIcon(), added SDL_ConvertSurfaceFormat() 2011-02-21 16:45:23 -08:00
Sam Lantinga
2788694b17 Simple rumble API for haptic
Edgar Simo      2011-02-20 10:27:52 PST

Adding patch that adds a simplified API for the haptic subsystem built ontop of
the "real one" for those who want simple rumble without jumping through hoops.

Adds 4 functions:

- extern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);
- extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);
- extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float
strength, Uint32 length );
- extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);

Also provided is test/testrumble.c which does test this.

This has all been tested on linux and has worked, but due to being built ontop
of the other haptic API it should work on all OS the same.
2011-02-20 10:54:44 -08:00
Sam Lantinga
a0a3c805a2 Added a revision number for easy compile-time tests. 2011-02-20 10:42:51 -08:00
Sam Lantinga
3296f115b7 Added missing log debug function 2011-02-19 11:23:56 -08:00
Sam Lantinga
664f75eeff Add assertions to the default API set. 2011-02-19 11:23:41 -08:00
Sam Lantinga
594e403a0f Whoops, the format parameter was off the page. 2011-02-18 09:30:09 -08:00
Sam Lantinga
6b2b174db0 The file is actually SDL_config.h now. 2011-02-17 19:00:29 -08:00
Sam Lantinga
b807895313 Allow the application to explicitly request a software renderer. 2011-02-17 12:03:48 -08:00
Sam Lantinga
dbb0a44739 Renamed SDL_keysym.h to SDL_keycode.h to avoid confusion. 2011-02-16 15:46:12 -08:00
Sam Lantinga
b5513f44c8 Fixed bug #1090 (SDL_BlitCopyOverlap() assumes memcpy() operates in order)
Even if we're blitting between two different surfaces their pixels might still overlap, because of SDL_CreateRGBSurfaceFrom(), so always use SDL_BlitCopy() and check for overlap in that function.

When handling overlapping surfaces, don't assume that memcpy() iterates forward, instead use memmove() correctly, and provide a fallback implementation of SDL_memmove() that handles the different cases.

Fixed a bug with SDL_memset() not completely filling lengths that aren't a multiple of 4.
Optimized SDL_memcpy() a bit using the same technique as SDL_memset().
2011-02-16 15:25:10 -08:00
Sam Lantinga
349a9bf3ce Allow you to override SDL's main override 2011-02-16 12:27:29 -08:00
Sam Lantinga
307a90d292 Made it possible to build SDL from a fresh checkout without any additional steps.
The trick is that if you're using configure and you don't want to have SDL_config.h and SDL_revision.h to show up as modified, you need to configure and build from a separate directory.

You also need to include SDL_revision.h directly if you want to use the SDL_REVISION constant, as a side effect of these changes.
2011-02-16 02:37:09 -08:00
Sam Lantinga
b7d670c8ca Fixed gcc -pedantic warning 2011-02-15 21:57:31 -08:00
Sam Lantinga
b59da3ffdc Changed the concept of a render clip rect to a render viewport.
The render viewport is automatically re-centered when the window changes size, so applications that don't care will not have to handle recalculating their rendering coordinates.

Fixed API for drawing and filling multiple rectangles - the parameter should be an array of rects, not an array of pointers to rects.

Fixed API for updating window rects for consistency with other APIs - the order is pointer to array followed by count in array.
2011-02-15 13:59:59 -08:00
Ken Rogoway
8c8191deef Software scaling support. Not very fast, but it seems to work. 2011-02-14 11:50:18 -06:00
Sam Lantinga
2ad2f08f4d The format_version isn't used anymore. 2011-02-13 22:30:06 -08:00
Sam Lantinga
c7b5cc946d A few fixes:
Fixed creating render texture framebuffer.
Removed the need for palette watch, added surface format caching.
Added an SDL_DONTFREE flag so you can't free the window and 1.2 shadow surfaces.
2011-02-13 13:46:10 -08:00
Sam Lantinga
e6ec7f6b28 Fixed bug #1117
There's a new event that's always sent when the window changes size, and that event is what the renderers listen for to determine if they need to rebind their context.
2011-02-12 19:02:14 -08:00
Sam Lantinga
c3265bbc90 changeset: 5272:cb08ef104ac4
tag: tip
user: Martin Decky <martin@decky.cz>
date: Sat Feb 12 20:53:06 2011 +0100
summary: improve header files compatibility with SDL 1.2 applications (namely QEMU)
2011-02-12 12:04:00 -08:00
Sam Lantinga
362639036a Frank Zago to sdl
The following patch fixes some of the bitrot for the Nintendo DS port.
The support is still basic at the moment, but it allows to run the "general"
test under the current head of tree (parent: 5269:11bd1585efb5 tip).
Most of the patch is mine, but I integrated a couple changes that John
Magnotti posted on Feb 1st.
2011-02-12 11:36:56 -08:00
Sam Lantinga
5e1535525c Initial pass at shader YV12 support - doesn't quite work yet. 2011-02-12 00:25:02 -08:00
Sam Lantinga
aef6fb230a Fixed SSE4 detection, and split it into SSE 4.1 and 4.2 2011-02-11 23:02:35 -08:00
Sam Lantinga
a2cdcf5486 Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
2af371cc2e Updated CPU detection code for SSE3 and SSE4 and removed obsolete 3DNow! and Altivec support. 2011-02-11 14:51:04 -08:00
Sam Lantinga
37993063c6 Window coordinates are in the global space and windows are not tied to a particular display.
Also added Ctrl-Enter keybinding to the test code to toggle fullscreen mode for testing.
2011-02-10 14:44:25 -08:00
Sam Lantinga
debc4678c8 Be explicit about what display you're querying. The default display is 0. 2011-02-10 12:14:37 -08:00
Sam Lantinga
f2729d2d2c Removed gamma support since it wasn't widely used and not well supported. 2011-02-10 11:39:08 -08:00
Sam Lantinga
f8db477234 Surfaces aren't in hardware memory anymore! 2011-02-10 05:10:05 -08:00
Sam Lantinga
5d0480d014 Added a way to replace the default logging mechanism 2011-02-08 23:13:58 -08:00
Sam Lantinga
ca8ed0c39d Added a hint to control whether the OpenGL driver uses shaders. 2011-02-08 22:40:19 -08:00
Sam Lantinga
5069986bff Made it possible to disable the rendering subsystem with configure --disable-render 2011-02-08 10:04:09 -08:00
Sam Lantinga
7d207a3141 It's now possible to disable the fast atomic operations, at a huge performance penalty. 2011-02-07 22:57:33 -08:00
Sam Lantinga
da46bc3be3 Added function SDL_RenderSetClipRect() 2011-02-07 20:06:26 -08:00
Sam Lantinga
47818cfba9 Added a simple log message API 2011-02-07 16:45:40 -08:00
Sam Lantinga
f1d38d9c1c Renamed SDL_Key to SDL_Keycode to clarify terminology. 2011-02-07 10:40:21 -08:00
Sam Lantinga
60016c514e Renamed SDLKey and SDLMod for consistency 2011-02-07 09:42:08 -08:00
Sam Lantinga
23370c8928 Sheena pointed out that "scancode" and "keysym" are single words and shouldn't be camel-cased. 2011-02-07 09:37:11 -08:00
Sam Lantinga
1163ebc192 Updated testoverlay2 to use the SDL 2D rendering API 2011-02-07 00:46:43 -08:00
Sam Lantinga
92c1973815 Since we changed the API entirely, just remove the old function names 2011-02-06 08:57:29 -08:00
Sam Lantinga
bbf99fa10b Fixed building on Android, added SDL_opengles2.h, removed unnecessary SDL_glesfuncs.h 2011-02-06 02:35:14 -08:00
Sam Lantinga
ae2ce1d91e Added an OpenGL ES 2.0 renderer, contributed by itsnotabigtruck
This compiles, but it untested.
2011-02-06 00:00:13 -08:00
Sam Lantinga
3d231d07df Created a simpler version of SDL_SetHint() that doesn't need a priority. 2011-02-05 20:02:37 -08:00
Sam Lantinga
b31aaaaad7 Updated the DirectFB support, from Couriersud
attached is a working directfb driver diff which works with the current
changes. There are a number of changes around it as well, e.g.
configure.in.

The directfb renderdriver right now still depends on a some "includes"
from src/video/directfb. That's why it is not yet moved to the new
render folder.
2011-02-05 16:07:10 -08:00
Sam Lantinga
dd42a41854 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints. 2011-02-05 10:35:36 -08:00
Sam Lantinga
1012c06b0a Added a hint to determine whether framebuffer texture acceleration should be used, and added default behaviors for the various platforms. 2011-02-05 10:03:12 -08:00
Sam Lantinga
8322900075 Added a hint system to allow configuration hints to be specified by the application. 2011-02-05 10:02:39 -08:00
Sam Lantinga
8bbd554984 Fixed permissions on the Android config header. 2011-02-05 01:02:24 -08:00
Sam Lantinga
4f6e1878af Restored SDL_BLENDMODE_MOD for MAME 2011-02-04 19:50:56 -08:00
Sam Lantinga
e37fdde92a Removed a bunch of X11 support that we no longer need. 2011-02-04 19:18:08 -08:00
Sam Lantinga
6d8925632d Switched the SDL 1.2 compatibility to use the window surface, so it's fast even when there's no hardware acceleration available.
This means that the YUV overlay now uses software, but that's okay since fast YUV code should be using the textures now anyway.
2011-02-03 21:13:55 -08:00
Sam Lantinga
93a4e38e98 Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
The software renderer has been re-routed to use the framebuffer interface, which makes it possible to have software rendering available even on simple ports.
2011-02-03 15:49:37 -08:00
Sam Lantinga
7880fa3997 Extended SDL_SetWindowData() to allow arbitrary named values. 2011-02-03 11:16:57 -08:00
Sam Lantinga
4360f9d15a Added an intro to the features and goals of the 2D rendering API. 2011-02-03 10:03:55 -08:00
Sam Lantinga
e4569cfdca Making the API simpler, moved the surface drawing functions to the software renderer. 2011-02-03 02:45:29 -08:00
Sam Lantinga
dd03fe7ff1 Re-ordered platforms based on frequency 2011-02-03 01:19:10 -08:00
Sam Lantinga
533d4862d6 Simplified and improved the process of creating a texture from a surface. 2011-02-03 00:54:29 -08:00
Sam Lantinga
a5bfac214f Making the API simpler, removed the writepixels interface 2011-02-03 00:22:18 -08:00
Sam Lantinga
405d4ed7e4 Made it possible to create a texture of any format, even if not supported by the renderer.
This allows me to reduce the set of formats supported by the renderers to the most optimal set, for a nice speed boost.
2011-02-03 00:19:40 -08:00
Sam Lantinga
433b8c4189 Fixed compiling on Windows 2011-02-02 22:55:12 -08:00
Sam Lantinga
8bf50cc83c Moved the rendering code out to a separate directory in the hope that it can someday be completely decoupled from the rest of the library and be expanded to an awesome 2D on 3D library. 2011-02-02 14:34:54 -08:00
Sam Lantinga
482e5c0697 Nobody is currently maintaining the QNX code, so removing it for now. 2011-02-01 21:40:03 -08:00
Sam Lantinga
1f34b65342 Making the API simpler, removed support for palettized video modes and textures. 2011-02-01 21:23:43 -08:00
Sam Lantinga
adaab5944f The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future. 2011-02-01 19:19:43 -08:00
Sam Lantinga
5978f70063 Added functions to watch events as they go through the event queue. 2011-02-01 19:15:42 -08:00
Sam Lantinga
f729dd20de Split the rendering API out into a separate header file. 2011-02-01 15:02:21 -08:00
Sam Lantinga
5d5f352744 Renumbered the renderer flags 2011-02-01 12:44:52 -08:00
Sam Lantinga
88718ffabe Making the API simpler, the renderer present semantics are always having a backbuffer and then discarding it. This is best for hardware accelerated rendering. 2011-02-01 12:19:46 -08:00
Sam Lantinga
fb80cf39a4 Making the API simpler, texture color and alpha modulation are supported by all renderers. 2011-01-31 23:37:30 -08:00
Sam Lantinga
0efb1ea0b2 Making the API simpler, the blend modes are "none, blend, add" and are supported by all renderers. 2011-01-31 23:23:57 -08:00
Sam Lantinga
f9ebc0527f Removed more partially functional renderers 2011-01-31 22:53:45 -08:00
Sam Lantinga
471a85fb52 Making the API simpler, scaling is always defined as linear interpolation and should be supported as much as possible on all renderers. 2011-01-31 22:44:43 -08:00
Sam Lantinga
096a6b8d79 Removed partially functional renderers 2011-01-31 22:21:29 -08:00
Sam Lantinga
2a2df3d2b1 Spacing for documentation tweaks 2011-02-01 12:01:37 -08:00
Sam Lantinga
e191dd269c Tweak for documentation 2011-02-01 11:53:29 -08:00
Sam Lantinga
a961fbabfe Added Edgar's blog to the haptic documentation 2011-01-28 12:09:25 -08:00
Sam Lantinga
74a3510cf2 Removed completely non-portable event thread hack.
Next I'll be working on generalizing the event sources and making the event queue lock-free. :)
2011-01-27 22:44:08 -08:00
Sam Lantinga
357519de5a Added API function to get CPU cache line size. 2011-01-27 20:46:45 -08:00
Sam Lantinga
c5035c553b Bump up the default cache line size. 2011-01-27 16:51:47 -08:00
Sam Lantinga
d6a6503537 Added cache line size info in SDL_cpuinfo.h
I also added an implementation to dynamically query it, but didn't expose it since most x86 CPUs have an L1 cache line size of 64 bytes.
2011-01-27 16:46:15 -08:00
Sam Lantinga
9b5a15bc30 Improved timer implementation
The new timer model is formalized as using a separate thread to handle timer callbacks.  This was the case on almost every platform before, but it's now a requirement, and simplifies the implementation and makes it perform consistently across platforms.

Goals:
 * Minimize timer thread blocking
 * Dispatch timers as accurately as possible
 * SDL_AddTimer() and SDL_RemoveTimer() are completely threadsafe
 * SDL_RemoveTimer() doesn't crash with a timer that's expired or removed
2011-01-27 14:45:06 -08:00
Sam Lantinga
98d356be1b Improved condition variable documentation 2011-01-27 10:40:17 -08:00
Sam Lantinga
0ffe05f55f Only document the public API, not the whole source tree. 2011-01-27 07:05:13 -08:00
Sam Lantinga
9195b9f922 Nobody is maintaining RISC OS code, so I'm removing it for now. 2011-01-27 00:06:36 -08:00
Sam Lantinga
c382f95013 Added a FIFO test to the atomic test suite.
This is really useful because we might be able to use something like this
for the SDL event queue.
2011-01-25 23:23:52 -08:00
Sam Lantinga
94cfb29bb1 More fixes for compilation on Visual Studio 2011-01-25 18:02:41 -08:00
Sam Lantinga
7dba2ad5da Fixed compile error on Visual C++ 2011-01-25 17:44:17 -08:00
Sam Lantinga
3dc1009723 Improvements based on feedback from Anthony Williams 2011-01-25 17:40:06 -08:00
Sam Lantinga
37df0221d4 Fixed cross-compiling for Windows 2011-01-24 21:41:36 -08:00
Sam Lantinga
57ac355cb5 Fixed bug #1100
Test the video features with #if instead of #ifdef
2011-01-24 17:38:18 -08:00
Sam Lantinga
ec39fffe84 Fixed compiling on Windows Mobile SDK 5.0 with Visual Studio 2008 2011-01-24 15:46:11 -08:00
krogoway
d35de7167f Renamed SDL_keysym to SDL_KeySym
Renamed SDL_scancode to SDL_ScanCode
Added #defines to SDL_compat.h
2011-01-24 13:47:35 -06:00
Sam Lantinga
8ca87bec57 Fixed bug #1097
There are problems with including intrin.h in C linkage in C++ compilation,
and further conflicts between intrin.h and winnt.h on Visual Studio 2005.
2011-01-21 23:46:51 -08:00
Sam Lantinga
cabda4aa7c HAVE_GCC_ATOMICS covers the test and set 2011-01-21 21:45:55 -08:00
Sam Lantinga
3b73c8e006 Yeah, go iPhone! 2011-01-21 21:43:56 -08:00
Sam Lantinga
69dab46757 Separated out the minimum functionality that we need from gcc for our spinlock fallback. 2011-01-21 21:42:04 -08:00
Sam Lantinga
dffcf58f01 Fixed bug #859
CREATE_SUBDIRS helps a lot if browsing HTML documentation in a file browser.

ALWAYS_DETAILED_SEC makes sure everything has at least the automatic
documentation like function prototype and source references.

STRIP_FROM_PATH allows you to include only the relevant portions of the files'
paths, cleaning up both the file list and directory tree, though you need to
change the path listed here to match wherever you put SDL.

ALIASES avoids some warnings generated by
C:\source\svn.libsdl.org\trunk\SDL\src\joystick\darwin\10.3.9-FIX\IOHIDLib.h.
It seems Apple uses a few commands which are not normally supported by Doxygen.

BUILTIN_STL_SUPPORT adds support for parsing code which makes use of the
standard template library.  There isn't a lot of C++ in SDL (some in bwindow at
least), but this still seems like a good idea.

TYPEDEF_HIDES_STRUCT means that for code like this:
typedef struct A {int B;} C;
C is documented as a structure containing B instead of a typedef mapped to A.

EXTRACT_ALL, EXTRACT_PRIVATE, EXTRACT_STATIC, EXTRACT_LOCAL_METHODS,
EXTRACT_ANON_NSPACES and INTERNAL_DOCS make sure that _everything_ is
documented.

CASE_SENSE_NAMES = NO avoids potential conflicts when building documentation on
case insensitive file systems like NTFS and FAT32.

WARN_NO_PARAMDOC lets you know when you have documented some, but not all, of
the parameters of a function.  This is useful when you're working on adding
such documentation since it makes partially documented functions easier to
spot.

WARN_LOGFILE writes warnings to a seperate file instead of mixing them in with
stdout.  When not running in quiet mode, these warnings can be hard to spot
without this flag.

I added *.h.in and *.h.default to FILE_PATTERNS to generate documentation for
config.h.in and config.h.default.

RECURSIVE tells doxygen to look not only in the input directory, but also in
subfolders.

EXCLUDE avoids documenting things like test programs, examples and templates
which need to be documented separately.

I've used EXCLUDE_PATTERNS to exclude non-source subdirectories that often find
their way into source folders (such as obj or .svn).

EXAMPLE_PATH lists directories doxygen will search to find included example
code.  So far, SDL doesn't really use this feature, but I've listed some likely
locations.

SOURCE_BROWSER adds syntax highlighted source code to the HTML output.
USE_HTAGS is nice, but not available on Windows.

INLINE_SOURCES adds the body of a function to it's documentation so you can
quickly see exactly what it does.

ALPHABETICAL_INDEX generates an alphabetical list of all structures, functions,
etc., which makes it much easier to find what you're looking for.

IGNORE_PREFIX skips the SDL_ prefix when deciding which index page to place an
item on so you don't have everything show up under "S".

HTML_DYNAMIC_SECTIONS hides the includes/included by diagrams by default and
adds JavaScript to allow the user to show and hide them by clicking a link.

ENUM_VALUES_PER_LINE = 1 makes enums easier to read by placing each value on
it's own line.

GENERATE_TREEVIEW produces a two frame index page with a navigation tree on the
left.

I have LaTeX and man pages turned off to speed up doxygen, you may want to turn
them back on yourself.

I added _WIN32=1 to PREDEFINED to cause SDL to output documentation related to
Win32 builds of SDL.  Normally, doxygen gets confused since there are multiple
definitions for various structures and formats that vary by platform.  Without
this doxygen can produce broken documentation or, if you're lucky, output
documentation only for the dummy drivers, which isn't very useful.  You need to
pick a platform.

GENERATE_TAGFILE produces a file which can be used to link other doxygen
documentation to the SDL documentation.

CLASS_DIAGRAMS turns on class diagrams even when dot is not available.

HAVE_DOT tells doxygen to try to use dot to generate diagrams.

TEMPLATE_RELATIONS and INCLUDE_GRAPH add additional diagrams to the
documentation.

DOT_MULTI_TARGETS speeds up dot.

OUTPUT_DIRECTORY, INPUT and other paths reflect the fact that this Doxyfile is
intended to process src as well as include and is being run from a separate
subdirectory.  Doxygen produces several temporary files while it's running and
if interrupted, can leave those files behind.  It's easier to clean up if there
aren't a hundred or so files in the same folder.  I typically run doxygen in
SDL/doxy and set the output directory to '.'.  Since doxygen puts it's output
in subfolders by type, this keeps things pretty well organised.  You could use
'../doc' instead and get the same results.
2011-01-21 12:57:01 -08:00
Sam Lantinga
7f59b3b677 Fixed compile error on Mac OS X 2011-01-21 11:23:19 -08:00
Sam Lantinga
3f8169298d You can't have an empty union in the structure... 2011-01-20 18:09:55 -08:00
Sam Lantinga
08ad787807 Fixed bug #925
Changed "win32" to "windows"
2011-01-20 18:04:05 -08:00
Sam Lantinga
3fdc01d097 Added the ability to get the UIKit window through the SDL API.
You can also do this through the native API:
	UIWindow *window = [[UIApplication sharedApplication] keyWindow];

Also needed to name the union for events and window info.
2011-01-20 16:05:59 -08:00
Sam Lantinga
3684c60e0c SDL doesn't depend on GLU, and overwhelming feedback from the mailing list is that people don't want it included in SDL_opengl.h 2011-01-19 22:55:51 -08:00
Sam Lantinga
ed1f29af7d PS3 Linux is no more... 2011-01-19 22:25:40 -08:00
Sam Lantinga
05e196a519 Nobody has stepped up to maintain an svgalib driver. Bye bye! :) 2011-01-19 22:21:31 -08:00
Sam Lantinga
8fb4ff28fb Nobody has stepped up to maintain a framebuffer console driver. Bye bye! :) 2011-01-19 22:18:45 -08:00
Sam Lantinga
4c63689825 Fixed using the native iconv library 2011-01-19 15:28:01 -08:00
Sam Lantinga
32ac172d1a Not all MinGW compilers have intrin.h, so we'll only use this with Visual Studio.
That's actually okay, since gcc has the builtin atomic intrinsics. :)
2011-01-18 15:07:53 -08:00
Sam Lantinga
1a141df371 SDL_atomic.h is safe to include in the main header now. 2011-01-17 14:08:00 -08:00
Sam Lantinga
2a3a996219 Fixed compiler warnings using Windows intrinsics 2011-01-17 14:07:15 -08:00
Sam Lantinga
f5bbe15139 Fixed compiler error 2011-01-17 14:05:14 -08:00
Sam Lantinga
f7788bbb12 Use compiler intrinsics, where available 2011-01-17 13:53:31 -08:00
Sam Lantinga
a4445e1512 Use the portable intrinsic 2011-01-17 13:52:40 -08:00
Sam Lantinga
9017f24006 Minor documentation consistency cleanup 2011-01-17 09:09:15 -08:00
Sam Lantinga
c94b5b6866 Include windows.h in SDL_atomic.h by default, but don't include the atomic API in SDL.h
This allows all SDL code to take advantage of the atomic intrinsics on Windows, but doesn't cause applications just including SDL.h to pull in windows.h
2011-01-16 17:45:42 -08:00
Sam Lantinga
4c5bf24ecb Don't hose code that isn't expecting a windows include 2011-01-16 15:31:09 -08:00
Sam Lantinga
89d48a0f83 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Changed the CAS return value to bool, so it's efficient with OSAtomicCompareAndSwap32Barrier()
Added an atomic test adapted from code by Michael Davidsaver
2011-01-16 15:16:39 -08:00
Sam Lantinga
38e31e4598 Updated the atomic API for better use cases 2011-01-15 12:41:59 -08:00
Sam Lantinga
890680f51e Added some missing config for the iPhone 2011-01-15 12:34:43 -08:00
Sam Lantinga
be09e4e9a0 Added some missing pixel formats and SDL_GetPixelFormatName() 2011-01-12 14:53:23 -08:00
Sam Lantinga
036154b8c0 Fixed spacing in comments 2011-01-12 11:55:02 -08:00
Sam Lantinga
15e43076a4 Updated headers to match wiki documentation 2011-01-12 09:47:33 -08:00
Sam Lantinga
6da7a17174 Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf. 2011-01-06 16:11:21 -08:00
Sam Lantinga
49a4522f6f Fixed 2D video on Android
There was a dummy renderer left in there which was overriding the OpenGL ES renderer.
2011-01-04 20:36:39 -08:00
Sam Lantinga
6c961a2344 Android needs the SDL_main() redirect as well 2011-01-04 11:39:04 -08:00
Sam Lantinga
c4f1a0abd3 Added the Android config include to the default config.h 2011-01-04 11:07:27 -08:00
Sam Lantinga
cead9cf66b The source rectangle isn't modified in SDL_UpperBlit 2011-01-04 10:19:24 -08:00
Sam Lantinga
1fb3692730 Use a typedef instead of a #define, to handle syntax like: SDL_TextureID a, b 2011-01-01 19:46:36 -08:00
Sam Lantinga
80b28b58d8 Android has atan() and atan2() 2011-01-01 16:56:54 -08:00
Sam Lantinga
d6eac2c481 Use the enumerated type for blend and scale mode instead of int
Renamed SDL_TextureScaleMode to SDL_ScaleMode
2010-12-12 15:19:05 -08:00
Sam Lantinga
191d2b4366 Removed support for 10.3.9
Fixed building on Mac OS X 10.5
2010-12-01 12:23:16 -08:00
Sam Lantinga
fb97826021 Don't conflict with glext.h if it's already been included 2010-12-01 12:02:52 -08:00
Andreas Schiffler
b9e9c91a70 Fix incorrect shape include and add HAVE_ATAN and HAVE_ATAN2 for OSX builds.
--
user: Andreas Schiffler <aschiffler@ferzkopp.net>
branch 'default'
changed include/SDL_config_macosx.h
changed src/video/cocoa/SDL_cocoashape.m
2010-11-16 07:03:26 -08:00
Sam Lantinga
0fe9b68cc0 Documentation clarification 2010-09-29 21:24:50 -07:00
Sam Lantinga
276bfeac6c Make the union nameless to reduce the complexity of the API.
(Are there any compilers still in use that don't support this?)
2010-09-29 21:13:52 -07:00
Sam Lantinga
bf43df8ba5 Merged the Windows custom window system hooks into the union used by X11.
Added Cocoa custom window system hooks
2010-09-27 01:24:05 -07:00
Sam Lantinga
5426a79715 attached is a patch to support DirectFB in include/SDL_syswm.h. It
defines SDL_SYSWM_DIRECTFB as a subsystem.
This allows developers to e.g. access DirectFB's video and picture
providers.

Kind regards,

André
2010-09-27 00:50:46 -07:00
Sam Lantinga
84cee89a18 Fixed documentation typo 2010-09-25 17:06:41 -07:00
Sam Lantinga
864edec6b4 Fixed grammar, thanks to Sheena's suggestion. 2010-09-18 17:12:19 -07:00
Sam Lantinga
823c38786d Fixed documentation 2010-09-14 21:57:29 -07:00
Sam Lantinga
f5f5c845ae Documentation consistency 2010-08-29 22:34:50 -07:00
Sam Lantinga
c9ac1fe3e5 Documentation consistency 2010-08-29 22:28:38 -07:00
Sam Lantinga
4913c48bba Fixed typo in header 2010-08-29 22:22:27 -07:00
Sam Lantinga
a14a177d5f Documentation clarification 2010-08-29 22:12:59 -07:00
Sam Lantinga
e7789ad75b Suspending the screensaver defaults off. 2010-08-29 21:41:11 -07:00
Sam Lantinga
256b2c3990 Compiling in atan()/atan2() implementation on Visual Studio 2008. 2010-08-29 16:55:58 -07:00
Sam Lantinga
7a7d43524f Added atan implementation from uClibc 2010-08-29 16:51:48 -07:00
Sam Lantinga
317cd0515f Added atan2 implementation from uClibc 2010-08-29 16:05:34 -07:00
Sam Lantinga
b66ae96de5 Documentation clarification 2010-08-29 15:26:12 -07:00
Sam Lantinga
39db467ca6 While you can actually write to the error buffer, conceptually it's read-only. 2010-08-29 12:00:09 -07:00
Sam Lantinga
f0480c0501 Added a typedef for the thread function to simplify documentation 2010-08-28 22:56:52 -07:00
Sam Lantinga
3c0f319cce Fixed documentation typo 2010-08-22 17:19:10 -07:00
Sam Lantinga
993db1a6aa Fixed obsolete documentation 2010-08-22 15:34:28 -07:00
Sam Lantinga
b7c5d88e6a Merged Eli's Google Summer of Code work from SDL-gsoc2010-shaped_windows 2010-08-22 13:45:56 -07:00
Sam Lantinga
d4d88abae0 Merged Daniel's Google Summer of Code work from SDL-gsoc2010_IME 2010-08-22 12:39:27 -07:00
Sam Lantinga
4df9989dd4 Removed spurious carriage returns 2010-08-22 12:34:31 -07:00
Sam Lantinga
ac80a80f6a Merged Paul's Google Summer of Code work from SDL-gsoc2010_android 2010-08-22 12:23:55 -07:00
Sam Lantinga
7f6ad8e572 Merged Jim's Google Summer of Code work from SDL-gsoc2010_gesture 2010-08-22 12:07:55 -07:00
Jim Grandpre
e9d12a479a Added README.touch and README.gesture. Moved touchtest/gestureSDLTest to test/testgesture 2010-08-15 00:36:28 -04:00
egottlieb
1dac65bd3a Finally got the Win32 API code for shaping to work! Just need to fix SDL_CalculateShapeTree() now! 2010-08-14 16:14:36 -04:00
Sam Lantinga
0f67a475f9 Fixed documentation error 2010-08-14 12:28:43 -07:00
Sam Lantinga
8ed311fcbf Updated with the latest version of glext.h 2010-08-14 12:22:06 -07:00
Eli Gottlieb
12b0fa8c5e Fixed a bug in X11 shaping that refused to use color-key mode. 2010-08-10 16:10:26 -04:00
Jim Grandpre
db352f3b39 Fixed gestureMulti. Disabled dollar gesture temporarily. 2010-08-04 23:17:30 -04:00
egottlieb
63f5546ab0 Implemented shaped windows for Cocoa. Still need to see if they actually work. 2010-08-03 21:56:05 -04:00
dewyatt
a83ba70ce5 Added SDL_wcslcpy and SDL_wcslcat. 2010-08-03 16:52:10 -04:00
egottlieb
4a74542b6e Got basic, pre-actually-writing-anything Cocoa to build. 2010-08-03 00:47:33 -04:00
Eli Gottlieb
122c35caa0 Why wasn't this in the repository? 2010-08-02 23:58:22 -04:00
Sam Lantinga
0b1069a725 Fixed various type and print format issues 2010-07-31 20:38:37 -07:00
jimtla
05c264c774 Added SDL_TouchID, SDL_FingerID, SDL_GestureID types. Converted to integer cioordinates (<- not working). 2010-07-31 20:02:54 +04:00
jimtla
214939549f Upgraded touchId/fingerId to long. Changed position variables to floats. 2010-07-30 23:18:35 +04:00
Sam Lantinga
b8b0d2faaa Documentation updates 2010-07-29 20:24:05 -07:00
Sam Lantinga
617542daf6 Merged Sunny's XRender changes from SDL-gsoc2010_xrender 2010-07-28 00:54:23 -07:00
Paul Hunkin
eb38d6aa71 - Cleaned up a bunch of code
- Added 'feature' enable/disable so we're not running accel/sound/whatever in Java when we don't need to be
- More work on the sound system. But it still crashes pretty horribly, not sure why yet.
2010-07-27 21:21:24 +02:00
Paul Hunkin
daa451a473 Oops, I wasn't using pthreads. Fixed so we can have mutexes and stuff 2010-07-27 15:23:09 +02:00
Paul Hunkin
10203b606f Updated test app to init the sound system 2010-07-27 11:35:06 +02:00
Eli Gottlieb
5416c894f4 Added color-key mode and redid the code to work with it. 2010-07-22 23:11:01 -04:00
Sunny Sachanandani
2fcfc81241 Advertise support for all supported texture formats. 2010-07-22 10:53:41 +05:30
Sam Lantinga
741880b4dc Added support for keyboard repeat (only tested on Windows so far) 2010-07-20 23:25:24 -07:00
Sunny Sachanandani
51b997ebad Integrate XFixes and XDamage into the build system. 2010-07-19 20:05:53 +05:30
Eli Gottlieb
f35e180363 Added #define's for error codes returned from SDL shaped-window API. 2010-07-18 22:24:52 -04:00
Sam Lantinga
d6cb212829 RedHat patch: SDL-1.2.14-byteorder.patch 2010-07-18 11:23:34 -07:00
dewyatt
ea01e5af61 Merge with main repo (mainly for non-printable character fix) 2010-07-18 13:48:23 -04:00
Sam Lantinga
ac279884c4 Fixed typo in the documentation 2010-07-17 22:59:28 -07:00
Jim Grandpre
d18ef30119 Bug fixes, now using RWops instead of File pointers. 2010-07-16 20:48:43 -04:00
Jim Grandpre
4b707013d1 Added alternative finger tracking method. Still prefer IPHONE_TOUCH_EFFICIENT_DANGEROUS. 2010-07-13 18:31:09 -04:00
dewyatt
d3a558d55e Added SDL_utf8strlcpy to copy at UTF-8 character boundaries.
Changed SDL_SendKeyboardText and SDL_SendEditingText to use SDL_utf8strlcpy.
2010-07-13 15:05:45 -04:00
Ryan C. Gordon
bf17cebd40 Add XShape test to configure scripts. 2010-07-13 02:43:10 -04:00
Sam Lantinga
6f2000e6d2 Merged changes from the main SDL codebase 2010-07-12 21:09:23 -07:00