Commit graph

1078 commits

Author SHA1 Message Date
Sam Lantinga
cec424390e Added some documentation on the behavior of SDL_ShowMessageBox() 2012-10-30 10:07:32 -07:00
Sam Lantinga
75cb962de6 It turns out that UCS2 and UCS4 are defined as big-endian encodings 2012-10-28 13:03:45 -07:00
Sam Lantinga
227bb9413f Added API for simple messagebox, courtesy of Mike Sartain 2012-10-23 17:11:22 -07:00
Sam Lantinga
31f2a3ab03 Updated the copyright date on the default config file 2012-10-23 15:59:07 -07:00
Sam Lantinga
995e8dc838 Switch C++ comment to C comment 2012-10-21 22:18:36 -07:00
Sam Lantinga
df0e5d1844 Fixed another gcc <-> Visual C++ ABI issue 2012-10-20 00:49:08 -07:00
Sam Lantinga
423c05313b 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
Sam Lantinga
59fea78fe0 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
15453a515c 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
3c4b366a81 Added SDL_RenderSetLogicalSize() and SDL_RenderGetLogicalSize() 2012-10-01 22:30:07 -07:00
Sam Lantinga
f366b098d4 Added SDL_RenderSetScale() and SDL_RenderGetScale() 2012-10-01 20:59:33 -07:00
Sam Lantinga
400b953d29 Made it clear that locking a streaming texture is a write-only operation. 2012-09-28 03:29:36 -07:00
Sam Lantinga
0582dc6ce3 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
255033689c 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
82b0ec31cd 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
5c732d6324 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
8253567b09 Fixed a typo in the docs. 2012-09-14 18:18:38 -04:00
Ryan C. Gordon
8835a0dacb Added SDL_SetWindowBordered() API.
--HG--
extra : rebase_source : 11750f0d8e7b59af26d97c778a332c0b4b72ea4b
2012-09-13 01:43:53 -04:00
Gabriel Jacobo
bd7b381374 Implements SDL_GL_BindTexture and SDL_GL_UnbindTexture (#1576) 2012-09-03 11:16:12 -03:00
Sam Lantinga
973aecd57a Renamed SDL_GL_CONTEXT_PROFILE_ES2 to SDL_GL_CONTEXT_PROFILE_ES 2012-08-12 23:10:16 -07:00
Sam Lantinga
99502c82fd 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
bf2304785f 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
5570852b58 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

--HG--
extra : rebase_source : 1133063622575e0981aacb6cb1f42f4cf57958b2
2012-08-09 15:43:39 -04:00
Ryan C. Gordon
2cd5fc4e97 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
2a336fae73 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
b3219a6db1 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
0e49fa682a Patched to compile on FreeBSD 8.2. 2012-07-11 22:20:02 -04:00
Ryan C. Gordon
2096895aed Patched to compile on Mac OS X with Xcode (Unix configure already worked). 2012-07-11 20:40:02 -04:00
Sam Lantinga
655622dc62 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
a3bf8f0c71 Created a header file for system dependent API functions, and added SDL_iPhoneSetAnimationCallback() 2012-06-22 19:19:18 -04:00
Sam Lantinga
094f01bc9e Updated Mac OS X and iOS projects 2012-06-21 10:41:25 -04:00
Gabriel Jacobo
17bdcc6e8e RenderCopyEx,rotation and flipping for all hardware/software backends (#1308) 2012-06-01 19:51:08 -03:00
Dimitris Zenios
f39fe05937 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
497b8deec4 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
0dbd4213ad Fixed define for consistency 2012-05-30 11:45:09 -04:00
Sam Lantinga
d558e90692 Fixed compile error with both new and old Xext headers (bug 1498) 2012-05-30 11:44:57 -04:00
Sam Lantinga
6accd81680 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
f6e83ac6a2 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
38463b3a0c 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
067b1ec8a2 Check for _STDINT_H in SDL_config_minimal.h 2012-02-07 01:26:00 -05:00
Sam Lantinga
39b2ae4a20 Added a convenience function SDL_CreateWindowAndRenderer() 2012-01-22 19:22:53 -05:00
Sam Lantinga
4f6d606c93 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
5ef4144446 Removed the SDL 1.2 compatibility API... we'll see how painful this is. 2012-01-22 18:11:41 -05:00
Sam Lantinga
3ad2c65336 Removing some more references to SDL 1.3 2012-01-22 17:26:45 -05:00
Sam Lantinga
d71e0546a9 Updated to SDL 2.0, and SDL 2.0 can now be installed coexisting with SDL 1.2
--HG--
rename : sdl-config.in => sdl2-config.in
rename : sdl.m4 => sdl2.m4
rename : sdl.pc.in => sdl2.pc.in
2012-01-22 17:21:00 -05:00
Sam Lantinga
8d3c63045f You need to create the texture with the SDL_TEXTUREACCESS_TARGET flag. 2012-01-22 01:29:26 -05:00
Sam Lantinga
0458fa488a Renamed SetTargetTexture() to SetRenderTarget() 2012-01-22 01:26:28 -05:00
Sam Lantinga
23b96d3406 Added a renderer flag to expose whether a renderer supports render to texture. 2012-01-19 21:06:47 -05:00
Sam Lantinga
5546f5ad65 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.

--HG--
rename : include/SDL_config_generated.h.in => include/SDL_config.h.in
2012-01-19 01:55:51 -05:00
Sam Lantinga
a49a88676f Implementation of render targets, by Mason Wheeler and Gabriel Jacobo
Thanks guys!
2012-01-18 22:45:49 -05:00