Commit Graph

7863 Commits

Author SHA1 Message Date
Philipp Wiesemann
4c8d5e20a7 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
e6f7f2551a 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
0a22818c0d 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
f45215f76a Fixed compiling test with older C. 2015-02-10 20:31:05 +01:00
Philipp Wiesemann
7498735ea7 Fixed two inconsistencies on failed allocation. 2015-02-08 22:50:16 +01:00
David Ludwig
450510e4eb 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
2015-02-08 15:44:15 -05:00
Philipp Wiesemann
a04c07ba83 Fixed three memory leaks on failed allocation. 2015-02-08 21:25:37 +01:00
Philipp Wiesemann
0405296f1c 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
e1613c3f8c Added missing guards. 2015-02-03 21:22:25 +01:00
Ryan C. Gordon
f1c5b7b29f 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
9123c5becf 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).
2015-02-02 01:05:41 -05:00
Philipp Wiesemann
e7bde43d07 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
ee06d1bc3f 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
96dbb24035 Fixed comment in implementation for NaCl. 2015-01-31 21:06:37 +01:00
Philipp Wiesemann
70a4824c1b 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
f6a48d209e Fixed names in implementation for PSP. 2015-01-31 10:33:48 +01:00
Philipp Wiesemann
65ef074256 Fixed wrong comment in implementation for Android. 2015-01-31 10:32:45 +01:00
Philipp Wiesemann
a4adcf6da5 Fix typos in header file documentation comments. 2015-01-30 23:20:15 +01:00
Philipp Wiesemann
5c73fcd277 Changed static variable to local variable in implementation for Android. 2015-01-30 23:18:14 +01:00
Sam Lantinga
fb577213d7 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
ced849ce47 Add binding layout for Xbone pad. 2015-01-29 13:33:20 -08:00
Ryan C. Gordon
e35302965f 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.
2015-01-26 17:46:39 -05:00
Philipp Wiesemann
d9f4affc5e Fixed recently broken configure script for FreeBSD.
Found by buildbot.
2015-01-26 22:27:27 +01:00
Philipp Wiesemann
df92841c92 Fixed memory leak in video quit implementation for Android. 2015-01-26 22:12:38 +01:00
Philipp Wiesemann
3c8a2ea96a Updated a README. 2015-01-26 22:02:53 +01:00
Philipp Wiesemann
89e3e4ea3e 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
0770f17f4f 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
cd309e763f 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
fd9647d40b Fixed bug 2807 - Not using CoreAudio on OS X when built via CMake 2015-01-17 04:36:15 +01:00
Philipp Wiesemann
a485cc3215 Fixed wrong documentation in joystick implementation source. 2015-01-16 23:07:10 +01:00
Philipp Wiesemann
ace64af532 Fixed two warnings about initialized but unused local variables in tests. 2015-01-16 23:03:14 +01:00
Philipp Wiesemann
e617b0ea69 Added and fixed doxygen markup in header file. 2015-01-12 23:20:52 +01:00
Philipp Wiesemann
3263f6fa5e Replaced include of SDL_types.h with SDL_stdinc.h in internal header file.
SDL_types.h is deprecated and currently only includes SDL_stdinc.h itself.
2015-01-08 21:45:46 +01:00
Ryan C. Gordon
bf02bb2582 Clang static analysis builds should use C runtime directly.
This is a little macro magic to use malloc() directly instead of SDL_malloc(),
 etc, so static analysis tests that know about the C runtime can function
 properly, and understand that we are dealing with heap allocations, etc.

This changed our static analysis report from 5 outstanding bugs to 30.

5x as many bugs were hidden by SDL_malloc() not being recognized as malloc()
 by the static analyzer!
2015-01-05 01:41:42 -05:00
Ryan C. Gordon
15235dc21b Dynamic API: don't leak if a library loaded but didn't have the entry point. 2015-01-05 01:07:36 -05:00
Philipp Wiesemann
68f36b883e Removed unused enumeration and constant from internal header file. 2014-12-31 21:00:32 +01:00
Philipp Wiesemann
2acb538412 Fixed copyright date. 2014-12-28 22:10:24 +01:00
Philipp Wiesemann
ad3db2a2be Linked README-emscripten.md in README.md and added markdown formatting. 2014-12-28 22:02:17 +01:00
Philipp Wiesemann
ced2d4907f Renamed README-emscripten.txt to README-emscripten.md. 2014-12-28 22:00:24 +01:00
Ryan C. Gordon
2bdda97c77 Cleaned up some compiler warnings. 2014-12-26 23:16:54 -05:00
Ryan C. Gordon
3557a42192 GLES2: Only use VBOs for Emscripten (for now).
This is causing a regression on actual iOS hardware, which we should revisit
 after 2.0.4 ships.
2014-12-26 22:30:19 -05:00
Philipp Wiesemann
db05daf61e Added three missing checks for return values of SDL_calloc(). 2014-12-26 20:11:28 +01:00
David Ludwig
ad95e7867e 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
313c38e43f Removed missing test program from Makefile. 2014-12-25 22:47:04 +01:00
Philipp Wiesemann
9039d4f5cd Changed Emscripten entry in gamecontroller database to allow sorting by script. 2014-12-25 22:43:17 +01:00
Philipp Wiesemann
4df8ffb5df Removed unnecessary call to SDL_free(). 2014-12-25 22:08:48 +01:00
Philipp Wiesemann
72952d4d7e Fixed typos in a README. 2014-12-25 22:07:15 +01:00
Philipp Wiesemann
aa044a25c5 Fixed typo in header file documentation comment. 2014-12-25 22:05:48 +01:00
Philipp Wiesemann
f0061c9f70 Fixed compile warnings about unused variables.
Found by buildbot.
2014-12-25 22:03:07 +01:00
Philipp Wiesemann
024f1a0155 Fixed compile errors in example programs. 2014-12-25 21:42:56 +01:00