Commit graph

7822 commits

Author SHA1 Message Date
Philipp Wiesemann
d0ca05bcdb Added three missing checks for return values of SDL_calloc(). 2014-12-26 20:11:28 +01:00
David Ludwig
b7254055e9 WinRT: hiding SDL_WinRTRunApp's XAML functionality, until it's ready for use
SDL_WinRTRunApp() is used on WinRT to launch a main(int, char **)-style
function.  It has optional, and experimental support for launching content
inside a XAML control, backed by a main() function running on a separate thread.
This is provided via it's 2nd parameter, which can be a pointer to a XAML
control.  (If NULL, XAML support will not be used.)

This change renames the experimental feature's parameter (to SDL_WinRTRunApp())
as "reserved", until such time as the functionality is ready for use.  It will
likely be renamed again in the future, when running SDL on top of a XAML control
via a separate thread, becomes reasonably usable.
2014-12-24 11:33:42 -05:00
Philipp Wiesemann
dbc52081d6 Removed missing test program from Makefile. 2014-12-25 22:47:04 +01:00
Philipp Wiesemann
4cf114422f Changed Emscripten entry in gamecontroller database to allow sorting by script. 2014-12-25 22:43:17 +01:00
Philipp Wiesemann
cb356b0bc5 Removed unnecessary call to SDL_free(). 2014-12-25 22:08:48 +01:00
Philipp Wiesemann
93ff35dbfc Fixed typos in a README. 2014-12-25 22:07:15 +01:00
Philipp Wiesemann
f77a082faa Fixed typo in header file documentation comment. 2014-12-25 22:05:48 +01:00
Philipp Wiesemann
86eaa23de4 Fixed compile warnings about unused variables.
Found by buildbot.
2014-12-25 22:03:07 +01:00
Philipp Wiesemann
2b4f8be818 Fixed compile errors in example programs. 2014-12-25 21:42:56 +01:00
Ryan C. Gordon
989b509a22 Maybe actually patched to compile this time? 2014-12-24 22:22:35 -05:00
Ryan C. Gordon
038a4f862a Actually fix Unix scripts this time. :) 2014-12-24 13:23:48 -05:00
Ryan C. Gordon
e4f209b9e6 Really patched to compile this time? 2014-12-24 13:21:28 -05:00
Ryan C. Gordon
92573049a4 Patched to compile. 2014-12-24 13:16:27 -05:00
Ryan C. Gordon
1d6b450b2c I don't know if Unix scripts are useful at all on Emscripten, but fix them up. 2014-12-24 13:13:19 -05:00
Ryan C. Gordon
eab9145ae3 A little more work on the Emscripten buildbot script.
Should upload tarballs now, etc.
2014-12-24 13:03:20 -05:00
Ryan C. Gordon
79012b522c Added buildbot script for Emscripten port. 2014-12-24 12:49:35 -05:00
Ryan C. Gordon
b5b91f4e11 Maybe patched to compile on Windows for real now? 2014-12-24 02:12:16 -05:00
Ryan C. Gordon
bab5629666 Patched to compile on Windows. 2014-12-24 02:06:38 -05:00
Ryan C. Gordon
6b529cf6dd Patched to compile on non-Emscripten targets. 2014-12-24 02:01:12 -05:00
Ryan C. Gordon
c2c793b74c CMake: Minor cleanup up on the new SDL_*_ENABLED_BY_DEFAULT vars.
--HG--
extra : rebase_source : af065b92bfba14673c2c76606339fe6a1e449e86
2014-12-13 02:40:52 -05:00
Ryan C. Gordon
de88474dda Initial merge of Emscripten port!
With this commit, you can compile SDL2 with Emscripten
( http://emscripten.org/ ), and make your SDL-based C/C++ program
into a web app.

This port was due to the efforts of several people, including: Charlie Birks,
Sathyanarayanan Gunasekaran, Jukka Jylänki, Alon Zakai, Edward Rudd,
Bruce Mitchener, and Martin Gerhardy. (Thanks, everyone!)

--HG--
extra : rebase_source : 97af74c8a5121e926ebe89f123536b5dd6681695
2014-12-18 00:19:52 -05:00
Ryan C. Gordon
c2ebb6b09f CMake: Replace "else(condition)" with "else()", etc.
Bumped required CMake version to 2.8.

Thanks to the SDL/Emscripten porting team for this cleanup.

--HG--
extra : rebase_source : 2b9bf6b045956f4607d2911265a136359a3fbdcb
2014-12-13 02:33:52 -05:00
Sam Lantinga
7d788b9de3 Treat any key device as a keyboard
This matches commit b8e85a5ac99a for when udev is not running
2014-12-13 13:20:19 -08:00
Philipp Wiesemann
af960c21b5 Removed unused includes and functions from test program. 2014-12-12 21:51:30 +01:00
Philipp Wiesemann
441018f860 Replaced sqrt() with SDL_sqrt() in test program. 2014-12-12 21:02:46 +01:00
Philipp Wiesemann
428c615dec Removed global variable from test program.
On Android starting the application after a previous quit did not always work.
Android keeps VM processes for a faster restart and therefore the loaded *.so.
2014-12-12 21:00:25 +01:00
Philipp Wiesemann
eccf17ae12 Removed extern declaration of not existing SDL_numhaptics from internal header. 2014-12-11 23:38:02 +01:00
Philipp Wiesemann
fe111b603e Removed dependency to stdbool.h in implementation file for Android.
This reduced mixing of different types in the file (bool, jboolean, SDL_bool).
2014-12-10 21:20:41 +01:00
Philipp Wiesemann
ba95566488 Fixed setting text to clipboard in controllermap program. 2014-12-10 21:13:43 +01:00
Philipp Wiesemann
fdde05856b Added comments in example program. 2014-12-10 21:10:55 +01:00
Philipp Wiesemann
bb8a6cf785 Fixed bug 2811 - [patch] Android core: Fix JNI 'nativeGetHint' symbol not being exported
Jonas Kulla

I don't see a reason why this shouldn't be exported. Currently a strip -s on the final application library eats it.
2014-12-09 22:49:16 +01:00
Philipp Wiesemann
93325ab4d4 Fixed warnings about possible loss of data in conversion. 2014-12-06 00:17:52 +01:00
Philipp Wiesemann
518802a5c1 Replaced free() with SDL_free() because related allocation also uses wrapper. 2014-12-04 21:41:30 +01:00
Philipp Wiesemann
fa7a90f2bb Corrected header file guard comment. 2014-12-04 21:33:59 +01:00
Ryan C. Gordon
b9aeac24fd Fixed some paths in the new buildbot windows zipper script. 2014-12-04 02:24:22 -05:00
Ryan C. Gordon
b612510fb2 Added a script to handle packing up Windows builds for the buildbot. 2014-12-04 02:09:07 -05:00
Edward Rudd
5f2e37555d ugh.. stray character 2014-12-03 12:47:39 -05:00
Edward Rudd
8ddea9cb66 fix SDL_PRIs64 on windows compilers.. (should end in d) 2014-12-03 12:45:04 -05:00
Edward Rudd
f39c6e8a6f switch to use SDL_PRI* macros for long long formatting everywhere. 2014-12-03 12:23:17 -05:00
Edward Rudd
e9d9c85e3c fix incorrect struct member name in test code for wheel direction 2014-12-03 11:04:07 -05:00
Edward Rudd
ecef423a78 update logging of events in test core
- log unknown as HEX instead of int (makes it easier to identify)
- add dollar gesture and multi gesture events
- add scroll reverse for mouse wheel
2014-12-03 11:00:56 -05:00
Edward Rudd
cd7a350e3d add in support for passing down the "natural" (or flipped) scrolling direction in the MouseWheelEvent event 2014-12-03 11:00:56 -05:00
David Ludwig
c8e397c32f WinRT: fixed bug whereby SDL would override an app's default orientation
WinRT apps can set a default, preferred orientation via a .appxmanifest file.
SDL was overriding this on app startup, and making the app use all possible
orientations (landscape and portrait).

Thanks to Eric Wing for the heads up on this!
2014-12-03 10:55:23 -05:00
David Ludwig
594785a021 WinRT: removed SDL_HINT_WINRT_PREF_PATH_ROOT (introduced post-2.0.3 & pre-2.0.4)
A WinRT app's Roaming folder-path can still be retrieved via calls to
SDL_WinRTGetFSPathUTF8() or SDL_WinRTGetFSPathUNICODE(), if need be.
2014-12-02 21:18:50 -05:00
Andreas Schiffler
abb05b9c97 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
Philipp Wiesemann
4e42fee6ce Removed generated doxygen output of visual test suite.
The files may be generated again by running doxygen locally (like SDL's docs).
2014-11-30 22:17:12 +01:00
Sam Lantinga
b03e51bf1b Fixed bug 2795 - SDL library detection selects the wrong lib
Chris Beck

When creating a homebrew recipe for wesnoth, I discovered that the SDL image configuration routine does not detect libpng properly -- if you have multiple instances of libpng on your system, and you use environment variables to select an instance which is not in your system directory, the build can be broken, because it will run configuration tests against the system installed version, but deduce that it should use the filename of the system-installed version. In a vanilla build of wesnoth using homebrew, this results in segfaults at runtime, because you end up linking against two different versions of libpng, which is also needed independently of SDL.

The problem is essentially in the "find_lib" routine in the configure file:



find_lib()
{
    gcc_bin_path=[`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
    gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
    env_lib_path=[`echo $LIBS $LDFLAGS | sed 's/-L[ ]*//g'`]
    for path in $gcc_bin_path $gcc_lib_path $env_lib_path /usr/lib /usr/local/lib; do
        lib=[`ls -- $path/$1 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
        if test x$lib != x; then
            echo $lib
            return
        fi
    done
}



Because the for loop goes over the system directories before the environment directories, any system-installed lib will shadow the lib selected via environment variables. This is contrary to the behavior of the configuration tests earlier in the script, which prefers the environment variable libs over the system-installed libs. The 'for' loop should instead be:



    for path in $env_lib_path $gcc_bin_path $gcc_lib_path /usr/lib /usr/local/lib; do



You can see the full discussion on the Homebrew / linuxbrew issue tracker here: https://github.com/Homebrew/linuxbrew/issues/172

I have checked that this bug also affects SDL 1.2.15, SDL_mixer and SDL_ttf 1.2, which all use this same "find_lib" routine. I have not determined if the bug affects SDL 2.0, which seems not to use this exact routine.
2014-11-29 14:41:18 -08:00
Sam Lantinga
ed670a5786 Fixed bug 2766 - Haptic coding bugs and fixes for Linux FF: periodic.phase handled as time instead of angle; + direction clarification
Elias Vanderstuyft

Remove the dependency of the calculation of Linux "phase" on "period",
currently the "phase" parameter is interpreted as a time shift, instead of a phase shift.
The Linux input documentation is not clear about the exact units of the "phase" parameter (see http://lxr.free-electrons.com/source/include/uapi/linux/input.h?v=3.17#L1075 ),
but we're about to standardize the 'phase shift' interpretation into the Linux input documentation,
since this will ease the job of a driver to recalculate the effect's state when the user dynamically updates the "period" parameter.
2014-11-29 11:51:13 -08:00
Sam Lantinga
3362465ba9 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
11db3a4830 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