Commit Graph

240 Commits (6df55c6608b9c5b421388e32c412b62a5e55466b)

Author SHA1 Message Date
Alex Szpakowski 0b02de757d Merged default into iOS-improvements 2014-11-15 22:59:16 -04:00
David Ludwig bbe1df0d51 WinRT: enabled OpenGL ES 2 support on Windows Phone
The "future-dev" branch of MSOpenTech's ANGLE/WinRT repository (at
https://github.com/msopentech/angle) includes support for Windows Phone 8.1.
This change allows it to be used in conjunction with SDL's OpenGL functions.
2014-11-02 10:32:25 -05:00
Alex Szpakowski fb6d185a8a Merged default into iOS-improvements 2014-10-28 18:36:29 -03:00
Philipp Wiesemann 3d2ca92e6a Fixed two typos in header file comment. 2014-10-27 12:53:47 +01:00
Sam Lantinga 251ca855f7 Expanded the iMX6 video driver into a general Vivante video driver that works across multiple SoCs 2014-10-15 09:18:17 -07:00
David Ludwig 411e0f9dac WinRT: expanded the documentation on SDL_HINT_WINRT_HANDLE_BACK_BUTTON 2014-10-04 14:59:41 -04:00
J?rgen P. Tjern? 498690ffa3 Mac: Fix build with clang from Xcode 6. 2014-09-30 11:20:50 -07:00
Ryan C. Gordon 5f9ea7edeb Haptic: Deal with negative periodic magnitudes (thanks, Elias!).
A negative periodic magnitude doesn't exist in Windows' and MacOS' FF APIs

The periodic magnitude parameter of the SDL Haptic API is based on the Linux
 FF API, so it means they are not directly compatible:
    'dwMagnitude' is a 'DWORD', which is unsigned.

Fixes Bugzilla #2701.
2014-09-17 14:49:36 -04:00
Ryan C. Gordon 266c0023da Fixed haptic documentation typos (thanks, Elias!).
Partially fixes Bugzilla #2701.
2014-09-17 14:47:42 -04:00
Alex Szpakowski 3071128deb Merged default into iOS-improvements 2014-09-10 18:10:37 -03:00
mastermind 50cc4efec8 Freescale i.MX6 video driver
---
 CMakeLists.txt                  |   2 +
 cmake/sdlchecks.cmake           |  20 +++
 configure                       |  51 +++++++
 configure.in                    |  28 ++++
 include/SDL_config.h.cmake      |   1 +
 include/SDL_config.h.in         |   1 +
 src/video/SDL_sysvideo.h        |   3 +
 src/video/SDL_video.c           |   3 +
 src/video/mx6/SDL_mx6events.c   |  45 ++++++
 src/video/mx6/SDL_mx6events_c.h |  31 +++++
 src/video/mx6/SDL_mx6opengles.c | 211 ++++++++++++++++++++++++++++
 src/video/mx6/SDL_mx6opengles.h |  68 +++++++++
 src/video/mx6/SDL_mx6video.c    | 301 ++++++++++++++++++++++++++++++++++++++++
 src/video/mx6/SDL_mx6video.h    |  78 +++++++++++
 14 files changed, 843 insertions(+)
 create mode 100644 src/video/mx6/SDL_mx6events.c
 create mode 100644 src/video/mx6/SDL_mx6events_c.h
 create mode 100644 src/video/mx6/SDL_mx6opengles.c
 create mode 100644 src/video/mx6/SDL_mx6opengles.h
 create mode 100644 src/video/mx6/SDL_mx6video.c
 create mode 100644 src/video/mx6/SDL_mx6video.h
2014-09-10 08:54:01 -07:00
Pierre-Loup A. Griffais 24c86b5501 [X11] Reconcile logical keyboard state with physical state on FocusIn
since the window system doesn't do it for us like other platforms.

This prevents sticky keys and missed keys when going in and out
of focus, for example Alt would appear to stick if switching away
from an SDL app with Alt-Tab and had to be pressed again.

CR: Sam
2014-09-11 19:24:42 -07:00
Philipp Wiesemann 0b98d0cb8a Fixed example in header file.
Did not compile because of typo in function name and missing argument.
2014-09-06 23:20:14 +02:00
Sam Lantinga 7242e81474 Updated version to 2.0.4 2014-09-02 06:55:47 -07:00
Philipp Wiesemann 7e515963a6 Corrected hint documentation. 2014-08-27 23:27:42 +02:00
Alex Szpakowski b1a0bd10a2 Merged default into iOS-improvements 2014-08-20 17:20:22 -03:00
Sam Lantinga 2d2f90200d Better check for __has_feature 2014-08-19 22:04:54 -07:00
Sam Lantinga 38b49c30e1 Changed the name of the IME hint to match the naming convention in SDL 2014-08-19 21:59:56 -07:00
Alex Baines 90bc642fa8 Add a SDL_IM_INTERNAL_EDITING event to make IMs like iBus render editing text in its own UI instead of sending TEXTEDITING events.
This is useful for applications that handle TEXTINPUT events but not TEXTEDITING events.
2014-08-19 23:31:50 +01:00
Sam Lantinga eba65c66a3 Fixed bug 2694 - configure bug __has_feature macro not detected
skaller

using gcc 4.2 (the default) on Mac OSX 10.6.8

 CC     build/SDL_dynapi.lo
In file included from /Users/johnskaller/SDL/src/dynapi/SDL_dynapi.c:31:
include/SDL_syswm.h:211:39: error: missing binary operator before token "("

The fault appears to be here:

#if defined(__OBJC__) && __has_feature(objc_arc)

that the __has_feature macro is not supported by gcc 4.2.

The code works fine with my clang 3.3svn.
2014-08-19 21:17:21 -07:00
Sam Lantinga 5a752c3aa7 Better Mac OS X build fix - actually match the SDK OpenGL headers. 2014-08-18 18:44:08 -07:00
Sam Lantinga 4b8f75381f Fixed Mac OS X build 2014-08-18 18:17:03 -07:00
Ryan C. Gordon f4d3303c9e Don't use the system OpenGL headers, ever.
(the replacement header is from Mesa, under what the MIT license.)
2014-08-18 14:05:02 -04:00
Sam Lantinga 1ea8697894 Removed SDL_round() because the license wasn't compatible with zlib 2014-08-17 13:11:55 -07:00
Sam Lantinga 984d0fc40b Fixed bug 2683 - Raspberry PI support using CMake
Tobias Himmer

this patch adds a check to the CMake build script to detect whether the VideoCore API is available.
If it is found, it enables SDL_VIDEO_DRIVER_RPI and will also add the needed include/library directory flags to CMAKE_C_FLAGS so the subsequent check for GLES succeeds in picking up the headers.

Seems to work fine on Raspbian.
2014-08-16 23:28:40 -07:00
Sam Lantinga 4e7db78ed9 Added SDL_round(), contributed by Benoit Pierre - thanks! 2014-08-16 23:23:15 -07:00
Ryan C. Gordon 57db27909b Haptic: Fix the saturation and deadband parameters' available range.
There was a misconception that Linux's saturation and deadband parameters -
on which the corresponding SDL parameters were based - use only half of the
possible range.

Thanks, Elias!

Partially fixes Bugzilla #2686.
2014-08-16 16:47:42 -04:00
Ryan C. Gordon 1db581b4ca Haptic: DInput's POLAR direction actually matches Linux's direction.
Thanks, Elias!

Partially fixes Bugzilla #2686.
2014-08-16 16:41:25 -04:00
Philipp Wiesemann cfaa99bb56 Fixed doxygen warnings and markdown formatting. 2014-08-12 23:28:45 +02:00
Sam Lantinga 05d8780022 Implemented SDL_GetPrefPath() on Android - it returns the path used by SDL_AndroidGetInternalStoragePath() 2014-08-11 17:25:53 -07:00
Philipp Wiesemann b33d2b7371 Updated README name in header. 2014-08-11 22:53:03 +02:00
Alex Szpakowski deceab256e Added iOS-specific functions to get the window view's current OpenGL Renderbuffer and Framebuffer objects, so they can be more easily rebound when necessary. 2014-08-08 15:14:09 -03:00
Sam Lantinga 6fef39d6b8 Added NV12 and NV21 texture support for OpenGL and OpenGL ES 2.0 renderers 2014-08-06 11:34:54 -07:00
Alex Szpakowski 292eedffe8 Merged default into iOS-improvements 2014-08-06 03:32:59 -03:00
Alex Szpakowski f5543f93b3 Updated the iOS backend code to use Objective-C's automatic reference counting (ARC). 2014-08-06 03:24:16 -03:00
Sam Lantinga 2eb7563e35 Haptics aren't available on iOS, but use the dummy implementation instead of failing init if it's requested. 2014-08-05 21:03:02 -07:00
Alex Szpakowski bde54b7f34 Merged 'default' into branch 'iOS-improvements' 2014-07-31 03:14:10 -03:00
Ryan C. Gordon 5b780063e1 Make SDL_SysWMinfo usable on Mac/iOS with ARC enabled (thanks, Alex!).
Fixes Bugzilla #2641.
2014-07-30 14:14:19 -04:00
Gabriel Jacobo f982d08784 Rearrange documentation
1) Moves all READMEs to docs/
2) Renames them to *.md, adds some Markdown with the idea to add a lot more
3) Moves the doxyfile config to doc/ and makes it parse the headers at ../include as well as the md files in docs.
4) Skips SDL_opengl*.h headers from the docs
5) Minor fixes to doxyfile
2014-07-29 09:20:12 -03:00
Alex Szpakowski 31257842ec Added support for SDL_SetWindowBordered on iOS. Worked around a bug with rotating the device on iOS 8. 2014-07-29 00:05:48 -03:00
Ryan C. Gordon 0c09ce2b34 Changed local var names in SDL assert macro.
Otherwise, if someone added an assert to a function that has a variable
named "state", the compiler might warn about shadowing a local.
2014-07-28 10:54:25 -04:00
Ryan C. Gordon f30e120aa9 Added audio device buffer queueing API. 2014-07-22 21:41:49 -04:00
Alex Szpakowski 1506b3b8fb iOS now respects SDL_HINT_ACCELEROMETER_AS_JOYSTICK. 2014-07-15 02:01:43 -03:00
Alex Szpakowski 734b523302 Misc. iOS code improvements.
- Use @autoreleasepool instead of NSAutoReleasePool.

- Code style fixups.
2014-07-14 16:50:25 -03:00
Sam Lantinga eb1c6044b2 Fixed bug in AVX detection and added AVX2 detection 2014-07-11 22:02:50 -07:00
Sam Lantinga f1ca7bd167 Clarified the documentation for SDL_FlushEvents() so people know it only affects currently queued events. 2014-07-09 01:34:40 -07:00
Ryan C. Gordon 0e9c0855f5 Comment update: SDL_INIT_NOPARACHUTE doesn't do anything as of 2.0.0. 2014-07-08 16:17:06 -04:00
Sam Lantinga 8077bf3d10 Fixed bug 2618 - incomplete pthread-based lock support should be removed
binarycrusader

Since changeset 358696c354a8, SDL 2.0 has been broken on Solaris when compiling with the Solaris Studio compiler (which uses the pthread implementation of SDL_AtomicLock).

Notably, it gets stuck at the MemoryBarrierRelease in SDL_GetErrBuf:

6585 # 218
6586     if (!tls_errbuf && !tls_being_created) {
6587          SDL_AtomicLock_REAL ( & tls_lock );
6588         if (!tls_errbuf) {
6589             SDL_TLSID slot;
6590             tls_being_created = SDL_TRUE;
6591             slot =  SDL_TLSCreate_REAL ( );
6592             tls_being_created = SDL_FALSE;
6593              { SDL_SpinLock _tmp = 0 ; SDL_AtomicLock_REAL ( & _tmp ) ; SDL_AtomicUnlock_REAL ( & _tmp ) ; };
^^^ loops forever above
6594             tls_errbuf = slot;
6595         }
6596          SDL_AtomicUnlock_REAL ( & tls_lock );
6597     }


Running: testthread
(process id 28926)
^Cdbx: warning: Interrupt ignored but forwarded to child.
signal INT (Interrupt) in __nanosleep at 0xfe52a875
0xfe52a875: __nanosleep+0x0015: jae      __nanosleep+0x23   [ 0xfe52a883, .+0xe ]
Current function is SDL_Delay_REAL
  204           was_error = nanosleep(&tv, &elapsed);
(dbx) where
  [1] __nanosleep(0xfeffe848, 0xfeffe850, 0xfe75a5ac, 0xfe5169d8), at 0xfe52a875
  [2] nanosleep(0xfeffe848, 0xfeffe850), at 0xfe516a3b
=>[3] SDL_Delay_REAL(ms = 0), line 204 in "SDL_systimer.c"
  [4] SDL_AtomicLock_REAL(lock = 0xfeffe88c), line 104 in "SDL_spinlock.c"
  [5] SDL_GetErrBuf(), line 225 in "SDL_thread.c"
  [6] SDL_ClearError_REAL(), line 216 in "SDL_error.c"
  [7] SDL_InitSubSystem_REAL(flags = 0), line 116 in "SDL.c"
  [8] SDL_Init_REAL(flags = 0), line 244 in "SDL.c"
  [9] SDL_Init(a = 0), line 89 in "SDL_dynapi_procs.h"
  [10] main(argc = 1, argv = 0xfeffe948), line 65 in "testthread.c"

As far as I can tell, this is because pthread_spin_trylock() always returns EBUSY for this particular lock; since it works in other places, I'm suspicious.

Different Solaris Studio compiler versions seem to make no difference.

I've verified this is broken on Linux as well if SDL_spinlock.c is modified to use the pthread implementation.

This appears to be because pthread_spin_init() and pthread_spin_destroy() are not used with the locks as required.
2014-07-07 21:27:42 -07:00
Shawn Walker c5812c5511 2620 solaris port missing atomics if not using gcc 2014-07-05 16:11:23 -07:00
David Ludwig cf4ff728a0 Made the latest XInput + Haptic changes compile and run on WinRT
Notes:
- Support for the 'Guide' button does not seem to be possible, as
  XInputGetStateEx is not available on WinRT.
- Haptic support appears to be working on WinRT now!
- SDL/WinRT does not allow calls to LoadLibrary or LoadLibraryEx.  The calls
  to those were removed by this change, but only when compiling for WinRT.
  Non-WinRT Windows will continue to detect and load XInput via LoadLibrary and
  GetProcAddress calls.
2014-07-04 18:20:23 -04:00