Commit graph

904 commits

Author SHA1 Message Date
Andreas Schiffler
d4bfe07a4f 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
a8af7eca89 Add log, assert and harness (partial) to test lib 2012-11-30 23:25:34 -08:00
Andreas Schiffler
7daed4ab7b Add crc32 and md5 to test lib 2012-11-28 19:19:57 -08:00
Andreas Schiffler
732f28216b Add fuzzer to test lib 2012-11-27 21:40:46 -08:00
Sam Lantinga
03e08a6a79 Organized joystick hotplug code a bit.
Cleaned up names, return types, etc.
2012-11-27 00:58:12 -08:00
Andreas Schiffler
3483eda505 Add random module to test lib 2012-11-26 23:12:47 -08:00
Sam Lantinga
34b88dfaae Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds 2012-11-26 16:37:54 -08:00
Sam Lantinga
59a04adfba Work in progress on an SDL test library 2012-11-26 07:53:56 -08:00
Sam Lantinga
9c9a5abe82 Fixed clang -Weverything warnings 2012-11-22 11:55:11 -08:00
stopiccot
de7aeffa50 SetMinimumWindowSize for OS X 2012-11-18 15:45:12 +03:00
Ryan C. Gordon
86a14db17a Removed some tab chars. 2012-11-21 23:00:06 -05:00
Ryan C. Gordon
5afb2dfa26 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
8c11d8b72d Added code to testwm2 to test the system cursor support 2012-11-19 20:38:52 -08:00
Michael Sartain
8f081103e5 Add SDL_CreateSystemCursor for Windows and Linux. 2012-11-19 15:11:10 -08:00
Gabriel Jacobo
7b16b8577c Adds CMake build system by Marcus Von Appen (bug #1597) 2012-11-16 09:23:18 -03:00
Sam Lantinga
ea22b37504 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
Sam Lantinga
b9ad4410f8 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
caf0404b85 Added SDL_ReadU8() and SDL_WriteU8() for consistency with the rest of the API. 2012-11-04 23:44:13 -08:00
Sam Lantinga
e7b4458d8b 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
Sam Lantinga
b6409c551c Added documentation on loading assets on Android. 2012-11-04 09:45:18 -08:00
Sam Lantinga
9bd6a89040 Added an API to get the size of a file - WARNING! ABI CHANGE! 2012-11-03 18:43:36 -07:00
Ryan C. Gordon
9baa49f61c More compiler warning fixes. 2012-11-02 14:03:14 -04:00
Ryan C. Gordon
88255b03b8 Fixed compiler warnings about "/*" inside a multi-line comment. 2012-11-02 14:00:44 -04:00
Sam Lantinga
ffc1360d69 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
9549fda7e0 We might actually have PI 2012-11-01 00:12:57 -07:00
Sam Lantinga
8850825033 Added an assert log category, and NSLog support on Mac OS X and iOS 2012-10-30 12:30:02 -07:00
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