Commit graph

7931 commits

Author SHA1 Message Date
Ryan C. Gordon
25c786a0d9 We maintain the list of platforms on the wiki now.
Also, I don't really want people emailing community members directly with
problems, so I'm removing their email addresses.

Fixes Bugzilla #2304.

--HG--
extra : rebase_source : 3be8e4d6bb5c9fb121ffab0847e868cfce068e27
2015-02-18 16:17:53 -05:00
Philipp Wiesemann
1a2231c115 Emscripten: Fixed receiving joystick events after failed init or subsystem quit.
The callbacks used to receive the HTML events were not removed if the joystick
subsystem initialization failed or if the joystick subsystem was quit. Also, the
already connected joysticks were not deleted if the initialization failed later.
2015-02-18 21:34:07 +01:00
Philipp Wiesemann
f3b8ca2a36 Removed redundant include statements from test programs.
The needed header files are already included with SDL.h. Still including them in
the test programs is confusing because it somehow suggests they would be needed.
2015-02-18 21:31:21 +01:00
Ryan C. Gordon
1a17139cf1 X11: Don't create a window and GL context to look up the glX extension string.
It's not necessary.

--HG--
extra : rebase_source : 6b2111b284a971832ce6d1315481c4a888e4e39a
extra : amend_source : 95f007dae5432aa52c49861487756b9d7b0c9526
2015-02-17 23:00:46 -05:00
Ryan C. Gordon
21282ee01f glX HasExtension(): check for NULL ext string first.
It's slightly faster than failing later, after a strchr() call, since this
will get called multiple times with a NULL string if the system totally
fails elsewhere.

--HG--
extra : rebase_source : 72564776aed4ab255a65880e979f8dba4df4a527
2015-02-17 22:59:56 -05:00
Philipp Wiesemann
6c134a60d0 Emscripten: Removed unused internal function. 2015-02-15 21:47:10 +01:00
Philipp Wiesemann
34e9ba9c45 Emscripten: Changed return type of callback implementations from int to EM_BOOL.
The prototypes are declared with EM_BOOL (which is currently an int) in html5.h.
2015-02-15 21:44:36 +01:00
David Ludwig
83859b12ea WinRT: a minor, nit-picky cleanup of some OpenGL code 2015-02-15 12:11:44 -05:00
David Ludwig
e0a6da9b6d WinRT: improved OpenGL ES compatibility on WinPhone/ARM and Surface RT
This change integrates initialization settings for ANGLE/WinRT, as suggested in
MSOpenTech's latest ANGLE template-projects (for MSVC).

This should fix some OpenGL initialization issues on WinPhone 8.1 on ARM, and
on the 1st-generation Surface RT.

--HG--
extra : rebase_source : af7dc2bd4f074cb3ec9cdfc4ff518f3182ed0abe
2015-02-15 11:53:24 -05:00
Philipp Wiesemann
d1135e337b Fixed crash if using clipboard functions without having initialized video. 2015-02-15 11:35:07 +01:00
Philipp Wiesemann
56146a8c13 Fixed compile warning about unused variable in wave test program. 2015-02-15 11:33:39 +01:00
David Ludwig
790d90535a WinRT: fixed crash when using up-to-date versions of ANGLE/WinRT 2015-02-15 00:08:27 -05:00
Philipp Wiesemann
e18cf07b3a Emscripten: Fixed sending SDL_JOYDEVICEADDED events with an index out of range.
SDL_JOYDEVICEADDED events must contain the device index which is a value between
0 and the number of connected joysticks. The old implementation included a value
based on the instance id instead. It worked in some cases because the values are
similar initially. But after disconnecting joysticks this is no more the case
and the always increasing instance id becomes larger than number of joysticks.
2015-02-14 15:22:04 +01:00
Philipp Wiesemann
3c70a54e6d Emscripten: Deactivated and corrected debug log messages on joystick events. 2015-02-14 15:16:41 +01:00
Philipp Wiesemann
77b70ccb7d Emscripten: Fixed throwing JavaScript exception if no audio context available.
Handling the error in C provides the possibility to just continue without audio.
2015-02-14 00:16:27 +01:00
Philipp Wiesemann
88c0cf9192 Emscripten: Fixed not including SDL_internal.h. 2015-02-14 00:13:00 +01:00
Philipp Wiesemann
c07f480946 Emscripten: Fixed framebuffer error message. 2015-02-14 00:10:58 +01:00
Philipp Wiesemann
3506528b4d Emscripten: Fixed SDL_GetPlatform() returning "Unknown" instead of "Emscripten". 2015-02-14 00:08:48 +01:00
Philipp Wiesemann
d9c3c62015 Fixed test programs for joystick not exiting on events after first disconnect.
Exit was broken since the main loop extraction needed for Emscripten support
because the former local but now global variables were not reset correctly.
2015-02-12 21:40:53 +01:00
Ryan C. Gordon
16369a4919 X11: Set dialog hint on message boxes (thanks, Melker!).
This helps the window manager do the right thing with these windows.
2015-02-11 01:48:52 -05:00
Philipp Wiesemann
bf73cbded1 Fixed bug 2873 - Joystick test won't reload after reattach
lectem

-plug in the joystick
-start testjoystick 0
-unplug
-replug

The joystick is detected but doesn't enter the loop anymore since done==SDL_TRUE
2015-02-10 20:40:03 +01:00
Philipp Wiesemann
b5080e09ab Fixed compiling test with older C. 2015-02-10 20:31:05 +01:00
Philipp Wiesemann
65093881bc Fixed two inconsistencies on failed allocation. 2015-02-08 22:50:16 +01:00
David Ludwig
445da2c732 WinRT: made note that VSync is always enabled on WinPhone, due to OS
Windows Phone does not appear to allow VSync to be turned off.  Doing so appears
to either result in content not getting drawn (when the D3D debug runtime is
turned off), or forcing VSync back on and logging an error (when the D3D debug
runtime is turned on).

VSync had been getting turned on anyways, this change just notes such:
- via the WinRT README
- by always setting the SDL_RENDERER_PRESENTVSYNC flag when creating an
  SDL_Renderer on Windows Phone

--HG--
extra : rebase_source : 504904b549f21d518919b2254319783da7c9bbdf
2015-02-08 15:44:15 -05:00
Philipp Wiesemann
21dbdf0eab Fixed three memory leaks on failed allocation. 2015-02-08 21:25:37 +01:00
Philipp Wiesemann
1577f08fad Fixed bug 2866 - testrelative.c: patch to make the orange box wrap around
Eric Wasylishen

Here's a patch to make the 'testrelative' demo program more useful: it just makes the orange rectangle wrap around. Previously, the orange cursor would just disappear off screen if you move the mouse a lot in one direction, so it was hard to tell if relative mouse mode was still working.
2015-02-07 22:40:36 +01:00
Philipp Wiesemann
f6c184ae02 Added missing guards. 2015-02-03 21:22:25 +01:00
Ryan C. Gordon
2a5d30c5f8 X11: Add events related to maximizing a window (thanks, Andrei and Gergely!).
Fixes Bugzilla #1447.
2015-02-02 01:21:02 -05:00
Ryan C. Gordon
b6973e6179 X11: Fixes for OpenGL 3.0 and later context creation.
- Don't create a temporary context first; this was probably due to Windows
needing one to get the address of wglCreateContextAttribsARB(), but that's
a unique quirk of WGL, and doesn't apply to glX. The glX spec explicitly says
you have to get a function pointer that works with any context from
glXGetProcAddress(), including when no context exists.

- Properly check for the GLX_ARB_create_context instead of just looking for a
non-NULL glXCreateContextAttribsARB()...some implementations, like Mesa,
never return NULL for function lookups (Mesa returns pointers into a jump
table that is filled out when the GL is initialized; since you can look up
functions before you have a valid context, it can't definitely say a function
isn't valid at that point).

--HG--
extra : rebase_source : 336f207a6395506e5a1402d1c25277194017db29
2015-02-02 01:05:41 -05:00
Philipp Wiesemann
cb727e32b9 Added missing guards in implementation for PSP.
Thanks to Martin Gerhardy for pointing this out.
2015-01-31 22:45:54 +01:00
Philipp Wiesemann
cc564951ad Added missing include statements in implementation for PSP.
SDL_internal.h should be included to support dynamic API and fix warnings.
2015-01-31 22:43:05 +01:00
Philipp Wiesemann
af3327018f Fixed comment in implementation for NaCl. 2015-01-31 21:06:37 +01:00
Philipp Wiesemann
93040fda2b Fixed including SDL_config.h in implementation for Android.
SDL_internal.h should be included to support dynamic API.
2015-01-31 21:02:56 +01:00
Philipp Wiesemann
36ebb1f6c6 Fixed names in implementation for PSP. 2015-01-31 10:33:48 +01:00
Philipp Wiesemann
97b6937ee2 Fixed wrong comment in implementation for Android. 2015-01-31 10:32:45 +01:00
Philipp Wiesemann
26ddac2631 Fix typos in header file documentation comments. 2015-01-30 23:20:15 +01:00
Philipp Wiesemann
60192c3d03 Changed static variable to local variable in implementation for Android. 2015-01-30 23:18:14 +01:00
Sam Lantinga
81aaff41c9 Fixed game controller hotplug support for some embedded Linux devices
When guessing the device class, it ends up being 0 for devices that have been removed (because the device node no longer exists)
2015-01-29 13:33:53 -08:00
Sam Lantinga
af0ac08492 Add binding layout for Xbone pad. 2015-01-29 13:33:20 -08:00
Ryan C. Gordon
5f6bd20321 X11: Don't delay delivery of focus events unless we just changed vidmodes.
Normally there's a 200 millisecond delay on all focus events in case there
was a vidmode change, now we note the last vidmode change and only impose this
delay if a change happened extremely recently.

Thanks to Epic Games for reporting this issue.

--HG--
extra : rebase_source : 9258c16df171c48e13c0df99e8d3b12e7041de63
2015-01-26 17:46:39 -05:00
Philipp Wiesemann
cc3e7b2c09 Fixed recently broken configure script for FreeBSD.
Found by buildbot.
2015-01-26 22:27:27 +01:00
Philipp Wiesemann
f6c04205cc Fixed memory leak in video quit implementation for Android. 2015-01-26 22:12:38 +01:00
Philipp Wiesemann
581841e8cf Updated a README. 2015-01-26 22:02:53 +01:00
Philipp Wiesemann
1419eb12a4 Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation
Jonas Kulla

The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c.

I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
2015-01-26 22:00:29 +01:00
Philipp Wiesemann
d2aee7d409 Fixed bug 2816 - [patch] Android: Expose screen refresh rate
Jonas Kulla

Display::getRefreshRate() is available on all API levels.
2015-01-23 20:29:08 +01:00
Ryan C. Gordon
9d2b5dd67d CMake: Removed unused variable (thanks, Felix!).
"MACOSX_COREAUDIO" is actually an internal #define set up elsewhere, and
this CMake var is never exported past the CMake script anyhow.

Partially fixes Bugzilla #2807.
2015-01-18 02:50:14 -05:00
Felix H. Dahlke
5bd19d340d Fixed bug 2807 - Not using CoreAudio on OS X when built via CMake 2015-01-17 04:36:15 +01:00
Philipp Wiesemann
29d25ec1b5 Fixed wrong documentation in joystick implementation source. 2015-01-16 23:07:10 +01:00
Philipp Wiesemann
97ce204e2f Fixed two warnings about initialized but unused local variables in tests. 2015-01-16 23:03:14 +01:00
Philipp Wiesemann
32bb7897e2 Added and fixed doxygen markup in header file. 2015-01-12 23:20:52 +01:00