Commit graph

11627 commits

Author SHA1 Message Date
Philipp Wiesemann
8cc5275bde Fixed typo in header comment. 2014-05-18 21:05:39 +02:00
Philipp Wiesemann
423d8d1a17 Changed C++ style comments to fix pedantic warnings. 2014-05-17 22:02:25 +02:00
Philipp Wiesemann
d2d918c6b2 Removed unused standard library includes from gesture source. 2014-05-17 21:52:05 +02:00
Gabriel Jacobo
2f461036d4 Fixes #2541, build failure with Wayland enabled, OpenGL ES disabled
Also includes an attempt at fixing building SDL on Ubuntu 13.10, which hopefully
won't break 14.04
2014-05-13 19:42:40 -03:00
Sam Lantinga
506e9977d2 Added a binding for the NVIDIA Shield controller 2014-05-13 12:10:37 -07:00
Sam Lantinga
bb480c2b0a Updated coding style to match the rest of SDL 2014-05-13 11:32:36 -07:00
Philipp Wiesemann
cba5857731 Fixed typo in header comment. 2014-05-11 15:59:22 +02:00
David Ludwig
7268632f00 WinRT: fixed the max-button count for WinPhone 8.1 message boxes
Doh.

The max button count on WinPhone 8.1 was set to three, not two.  Any more than
two leads to a crash.
2014-05-10 23:39:54 -04:00
David Ludwig
15e4e3c1bd Added limited message-box support for Windows Phone 8.1
The Windows Phone 8.1 'MessageDialog' API only seems to support two buttons,
despite the documentation for such mentioning support for three.  Trying to use
three or more buttons leads to an exception being thrown.  As such, any attempt
to use more than two buttons via SDL_ShowMessageBox (on Windows Phone 8.1) will
lead to no message box getting shown, and the call returning an error.

The Win32 MessageBox and dialog APIs are not available in WinRT apps, to note.

More extensive message dialog support might be available at some point, if and
when XAML support is more fully fleshed-out.  I'm not certain of this, though.

--HG--
extra : rebase_source : 42962c17f0bc3093e67fe9e176fb7c7c4bae722c
2014-05-10 23:28:53 -04:00
Gabriel Jacobo
12f4e7625f Improve handling of focus behaviour on Android. Patch by Alexey Petruchik 2014-05-10 18:24:39 -03:00
Gabriel Jacobo
7c6e66dad9 Include gl2platform.h in SDL_opengles2.h so we play nice with GLEW.
Based on feedback from Sven Bergström
2014-05-10 17:00:37 -03:00
Gabriel Jacobo
efffa3a0c4 Fixes #2512, handle configuration change messages sent by Wayland. Patch by Bryan Cain. 2014-05-10 16:50:05 -03:00
Sam Lantinga
461ff8bf35 Updated iOS deployment target to iOS 5.1 2014-05-10 12:34:16 -07:00
Gabriel Jacobo
cdc0dfa61c Fixes #2529, guard SDL_d3math.* with the proper defines 2014-05-10 16:23:06 -03:00
Gabriel Jacobo
d00ea7e64b Fixes #2519, clear error if using the default library path for EGL succeeds. 2014-05-10 16:13:22 -03:00
Gabriel Jacobo
04d8bb1069 A few more ANDROID for __ANDROID__ replacements 2014-05-10 15:57:09 -03:00
Dimitris Zenios
873297a269 __ANDROID__ is the correct macro to check for an android system.ANDROID is only defined in NDK build system (.mk) and not in the standalone NDK. 2014-05-05 22:21:26 +03:00
Dimitris Zenios
006006c460 Export android jni functions even when build with -fvisibility=hidden flag 2014-05-05 22:26:21 +03:00
Dimitris Zenios
989d978ef4 Show android video or android audio if detected in autotools summary. 2014-05-05 22:36:47 +03:00
Sam Lantinga
2e37831d3e Temporary fix for bug 2494 - Crashes due to the non thread-safe SDL_malloc/SDL_free on Windows
We'll define USE_LOCKS as a temporary fix until an alternative like ptmalloc, jemalloc, or nedmalloc can be investigated.
http://www.malloc.de/en/
http://www.canonware.com/jemalloc/
http://www.nedprod.com/programs/portable/nedmalloc/

SDL allocates memory very infrequently, so this is probably a decent fix for a while.
2014-05-10 11:27:43 -07:00
David Ludwig
c577e9a890 WinRT: display-information code cleanups 2014-05-09 21:28:52 -04:00
David Ludwig
7f1b8e0bab Fixed bug: touch input on WinPhone 8.0 was wrong, in some cases
When a Windows Phone 8.0 app was rotated to anything but Portrait mode, touch
input coordinates, as well as virtual mouse coordinates, were usually getting
reported as coming from the wrong part of the screen.
2014-05-09 20:32:06 -04:00
David Ludwig
7246fba47d Fixed rendering-alignment issues on WinPhone 8.1, when the device was rotated
If a Windows Phone 8.1 device was rotated to anything but Portrait mode,
the Direct3D 11 renderer's output wouldn't get aligned correctly with the
screen.
2014-05-09 20:16:21 -04:00
David Ludwig
7e55d07616 WinRT: made Win[Phone] 8.1 projects be structured like their 8.0 counterparts
This change removes the "Shared" component from the Windows 8.1 and Windows
Phone 8.1 project files, then renames the projects to use a file structure
that's the same as  used for the Windows 8.0 and Windows Phone 8.0 projects.

This change now places WinRT projects in the following directories:

VisualC-WinRT\WinRT81_VS2013\ -- Windows 8.1 project files
VisualC-WinRT\WinPhone81_VS2013\ -- Windows Phone 8.1 project files (NEW, as of this change)
VisualC-WinRT\WinRT80_VS2012\ -- Windows 8.0 project files
VisualC-WinRT\WinPhone80_VS2012\ -- Windows Phone 8.0 project files

Windows 8.0 and Windows Phone 8.0 projects, as well as apps or libs that
reference these, should be unaffected by this change.

Windows 8.1 and Windows Phone 8.1 based apps or libs that reference SDL's
projects directly will need to have their old references removed, then
replaced with new ones that point to the updated structure.
2014-05-06 20:31:10 -04:00
Brandon Schaefer
6f1ab7fb74 eglGetProcAddress fails the same way on MIR as ANDROID does on arm. Thanks Sylvain Becker for the patch! 2014-05-06 15:08:43 -07:00
Ryan C. Gordon
812a2678c3 Update the machine-generated configure code. 2014-05-06 00:20:34 -04:00
Ryan C. Gordon
a8ab12a0d6 Fix build on Windows targets without dxgi.h, like MingW32. 2014-05-06 00:13:07 -04:00
Brandon Schaefer
2bc8e344cb Remove code that found its way back into the diff 2014-05-02 12:39:26 -07:00
Brandon Schaefer
22cdf6eb98 Fix software rendering in the mir backend. The window assumed hardware buffer, which caused testdrawchessboard to fail to mmap a buffer. 2014-05-02 12:33:19 -07:00
David Ludwig
a7d24ca3a3 WinRT: suppressed an unused param warning when building for Windows Phone 8.1 2014-04-30 21:12:47 -04:00
David Ludwig
843e7cd909 WinRT: preliminary support for building against the Windows Phone 8.1 SDK
This is a step towards supporting "Universal" Windows apps, when building for
Windows Phone.  SDL can now build against the Windows Phone 8.1 SDK, and apps
linked to it can run, however further work and testing is required as some
previously Phone-only code appears to no longer be applicable for
Windows Phone 8.1.  The Windows 8.1 code paths does seem to be preferable, but
should probably be tested and updated on a finer-grained basis.

If in doubt, use the Windows Phone 8.0 projects for now, as located in
VisualC-WinRT/WinPhone80_VS2012/

TODO:
- look at any Windows Phone specific code paths in SDL, and see if Phone 8.1
should use the Windows Phone code path(s), or the Windows 8.x or 8.1 paths
2014-04-30 21:07:30 -04:00
David Ludwig
49f78c6fae Fixed a linker error when building SDL/WinRT
The Win32 APIs, VerifyVersionInfoW and VerSetConditionMask, are not currently
available for use in WinRT apps.  This change primarily #if[n]defs-out some
calls to them.
2014-04-29 19:22:48 -04:00
David Ludwig
5ef1b9726f WinRT: added project files for Windows 8.1 + MSVC 2013
This commit also includes some base-level support for Universal apps.

TODO:
- add support for Windows Phone 8.1
- add support for satellite libs: SDL_image, SDL_ttf, and SDL_mixer

--HG--
extra : rebase_source : cde445519dd05c34d1cfc25b5c2f0734cf960adf
2014-04-29 19:06:00 -04:00
Ryan C. Gordon
f2f5660c94 Removed comma at end of enum in a public header, to make -Wpedantic happy. 2014-04-29 12:00:28 -04:00
Steven Stewart-Gallus
770fb6a160 Set the tag type in libtool invocations
Setting the tag type will let libtool work even when it cannot infer
the type of the code being built. One way libtool may fail to infer
the tag type is if one uses a mock compiler (such as for static
analysis).
2014-04-19 16:33:42 -07:00
Sam Lantinga
0590857aeb Fixed bug 2508 - don't redefine WIN32_LEAN_AND_MEAN 2014-04-26 12:38:35 -07:00
Sam Lantinga
16cdcde614 Fixed the inertia effect in the test program 2014-04-26 12:29:40 -07:00
Sam Lantinga
d8ad9f2506 Better compiler for Windows XP systems 2014-04-26 11:23:55 -07:00
Ryan C. Gordon
655e28fd65 Mac OS X: Look for joystick hotplug in its own CFRunLoop.
This allows the joystick hotplug to function without the main event loop
 (specifically: without SDL_INIT_VIDEO), and moves explicit polling for
 joysticks where it belongs at the low-level: in SDL_SYS_JoystickDetect().

This lets apps call SDL_JoystickUpdate() to get hotplug events and keep
 SDL_NumJoysticks() correct, as expected. As SDL_PumpEvents() (and
 SDL_PollEvents, etc) calls SDL_JoystickUpdate(), existing apps will function
 as before.

Thanks to "raskie" on the forums for pointing this out!

--HG--
extra : rebase_source : 09d8e949731014ba3226aecf73050e35a54a5cdd
2014-04-24 23:24:48 -04:00
Jørgen P. Tjernø
6b6c2c6f27 Mac: Correct the y-axis position after 94af945dbb57
This fixes a bug where we'd offset positions by the height of the dock, if it
was along the bottom of the screen.

Fixes https://bugzilla.libsdl.org/show_bug.cgi?id=2509
Thanks to Alex Szpakowski for bug & patch.
2014-04-24 21:05:51 -07:00
Sam Lantinga
d610e30086 Fixed cygwin build 2014-04-23 13:54:47 -07:00
Sam Lantinga
da52ef4cdc Fixed detecting output on second adapter
CR: Sam Lantinga
2014-04-23 13:48:01 -07:00
Sam Lantinga
3e8203e712 Don't crash in WIN_GL_InitExtensions() if the OpenGL library couldn't be loaded 2014-04-23 13:47:57 -07:00
Sam Lantinga
123a84cfb0 Fixed compiler warning 2014-04-23 13:47:52 -07:00
Sam Lantinga
d164a7fcaf Don't try to load d3dcompiler_46.dll on Windows XP 2014-04-23 13:47:42 -07:00
Sam Lantinga
94a774f2f8 Removed possible implicit memset() 2014-04-23 13:47:35 -07:00
Brandon Schaefer
2b16b7f620 Revert MIR_CFLAGS to SDL_CFLAGS. Use forward declaration for the real fix. (We shouldn't expose mir headers!) 2014-04-21 12:42:25 -07:00
Jørgen P. Tjernø
e7fe0afaaa Mac: SDL_SetWindowPosition is now relative to the menubar.
It used to be that SDL_SetWindowPosition was relative to the top of the screen,
which didn't make sense. In addition, borderless windows can be positioned
*below* the menubar, so SDL_SetWindowPosition(win, 0, 0) on a borderless window
would hide ~30ish pixels of the window below the menubar.

--HG--
extra : source : 6b4f9d40414b4e2bdc9dcd24fb4980ed6d420f1e
extra : amend_source : d508fc822a4f36e5fafd6e098d5be4e60053efd3
extra : histedit_source : ad3a2d3af22bf2b8611c0c0ace9ed1809a17c219%2Cdba9cce6d2acd72a670d7453e406913b8012275f
2014-04-19 13:15:53 -07:00
Jørgen P. Tjernø
431aca234b Render: Allow empty cliprect.
This fixes an issue where an empty cliprect is treated the same as a NULL
cliprect, causing the render backends to disable clipping.

Also adds a new API, SDL_RenderIsClipEnabled(render) that allows you to
differentiate between:
 - SDL_RenderSetClipRect(render, NULL)
 - SDL_Rect r = {0,0,0,0}; SDL_RenderSetClipRect(render, &r);

Fixes https://bugzilla.libsdl.org/show_bug.cgi?id=2504

--HG--
extra : amend_source : 9e5ac76e3f009d9ae49bc61c350df3ba891267b5
extra : histedit_source : b92b8be4d05b19a89fa0dee57f7ed6b1e924cb99%2Cce419f6ade87bafc78ff42702c1f263d2469e7e7
2014-04-19 13:15:41 -07:00
Sam Lantinga
7dd1a22acc Fixed missing j 2014-04-19 10:17:36 -07:00