Commit Graph

252 Commits (cc0631a095d0d5c6754ef5957b1e725a79dbca88)

Author SHA1 Message Date
Alex Szpakowski cc0631a095 Merged default into iOS-improvements 2014-12-02 02:52:45 -04:00
Andreas Schiffler 52760dcdf1 Fix assert format strings/parameters in testautomation modules; improve output of SDL_CompareSurfaces to aid debugging; update platform_testSetErrorInvalidInput for SDL changes 2014-11-30 20:55:27 -08:00
Sam Lantinga a5ce9c1113 Fixed bug 2766 - Haptic coding bugs and fixes for Linux FF: periodic.phase handled as time instead of angle; + direction clarification
Elias Vanderstuyft

"Horizontal" is not very precise, use "Positive phase" instead.
"Positive" because it's actually waveform(2*pi*t + phase) instead of waveform(2*pi*t - phase).
2014-11-29 11:49:58 -08:00
Sam Lantinga ef8c3d89ce Fixed bug 2766 - Haptic coding bugs and fixes for Linux FF: periodic.phase handled as time instead of angle; + direction clarification
Elias Vanderstuyft

It's not obvious from the general "haptic direction" description what the SDL direction actually means in terms of force magnitude sign,
currently its meaning is only reflected by the example.
2014-11-29 11:48:43 -08:00
Sam Lantinga 48481c8e55 Improved the pitch variable description 2014-11-29 11:18:49 -08:00
David Ludwig ce64b4ad3a WinRT: bug and data-integrity fixes for SDL_GetPrefPath()
This change does a few things, all with regards to the WinRT implementation of
SDL_GetPrefPath():

1. it fixes a bug whereby SDL_GetPrefPath() did not create the directory it
returned.  On other SDL platforms, SDL_GetPrefPath() will create separate
directories for its 'org' and 'app' folders.  Without this, attempts to create
files in the pref-path would fail, unless those directories were first created
by the app, or by some other library the app used.  This change makes sure
that these directories get created, before SDL_GetPrefPath() returns to its
caller(s).


2. it defaults to having SDL_GetPrefPath() return a WinRT 'Local' folder
on all platforms.  Previously, for Windows Store apps, it would have used a
different, 'Roaming' folder.  Files in Roaming folders can be automatically,
and synchronized across multiple devices by Windows.  This synchronization can
happen while the app runs, with new files being copied into a running app's
pref-path.  Unless an app is specifically designed to handle this scenario,
there is a chance that save-data could be overwritten in unwanted or
unexpected ways.

The default is now to use a Local folder, which does not get synchronized, and
which is arguably a bit safer to use.  Apps that wish to use Roaming folders
can do so by setting SDL_HINT_WINRT_PREF_PATH_ROOT to "roaming", however it
is recommended that one first read Microsoft's documentation for Roaming
files, a link to which is provided in README-winrt.md.

To preserve older pref-path selection behavior (found in SDL 2.0.3, as well as
many pre-2.0.4 versions of SDL from hg.libsdl.org), which uses a Roaming path
in Windows Store apps, and a Local path in Windows Phone, set
SDL_HINT_WINRT_PREF_PATH_ROOT to "old".

Please note that Roaming paths are not supported on Windows Phone 8.0, due to
limitations in the OS itself.  Attempts to use this will fail.
(Windows Phone 8.1 does not have this limitation, however.)


3. It makes SDL_GetPrefPath(), when on Windows Phone 8.0, and when
SDL_HINT_WINRT_PREF_PATH_ROOT is set to "roaming", return NULL, rather than
silently defaulting to a Local path (then switching to a Roaming path if and
when the user upgraded to Windows Phone 8.1).
2014-11-29 10:09:30 -05:00
Alex Szpakowski 0b02de757d Merged default into iOS-improvements 2014-11-15 22:59:16 -04:00
David Ludwig ecc014740a WinRT: added SDL_HINT_WINRT_PREF_PATH_ROOT
SDL_HINT_WINRT_PREF_PATH_ROOT allows WinRT apps to alter the path that
SDL_GetPrefPath() returns.  Setting it to "local" uses the app's
OS-defined Local folder, setting it to "roaming" uses the app's OS-defined
Roaming folder.

Roaming folder support is not available in Windows Phone 8.0.  Attempts to
make SDL_GetPrefPath() return a Roaming folder on this OS will be ignored.

Various bits of documentation on this were added to SDL_hints.h, and to
README-winrt.md
2014-11-27 09:55:34 -05:00
Philipp Wiesemann 5bdc9913ac Corrected header file guard comments. 2014-11-25 22:37:12 +01:00
Philipp Wiesemann 43e5c9ee00 Fixed doxygen tags in header file documentation comments. 2014-11-23 20:46:34 +01:00
Philipp Wiesemann c0165972c3 Fixed typos in header file documentation comments. 2014-11-23 20:40:48 +01:00
Philipp Wiesemann a690944e44 Fixed typo in header file documentation comment. 2014-11-23 11:26:46 +01:00
Philipp Wiesemann 9c398852e6 Corrected header file documentation comment. 2014-11-22 22:20:40 +01: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