Commit Graph

7361 Commits

Author SHA1 Message Date
Ryan C. Gordon
1c00a0fc42 Implemented SDL_GetAbsoluteMouseState().
X11 only for now, but this should be doable on every platform, I think.
2014-06-05 00:03:33 -04:00
Ryan C. Gordon
a46c5fea53 Added some (harmlessly) missing braces. 2014-06-05 00:02:42 -04:00
Ryan C. Gordon
79ae1a2719 Fixed using SDL_PointInRect() from C++. 2014-05-30 09:50:47 -04:00
Ryan C. Gordon
e224148df5 Fixed up SDL_CaptureMouse() on Windows to work like I expected.
This would have been a one-line patch to the documentation (specifying that
 captures only work as long as the left mouse button is pressed), but I didn't
 like that, so I got a little crazy about this instead.
2014-05-30 01:51:13 -04:00
Ryan C. Gordon
bfba1a1a4f Fixed hit-testing on Windows.
Needed to convert from screen to client coords.
2014-05-30 01:49:26 -04:00
Ryan C. Gordon
00dd38cb3d Patched to compile on Visual Studio. 2014-05-30 01:48:26 -04:00
Ryan C. Gordon
724a3607f6 Make some printf() calls into SDL_Log() so I can see them on Windows. :) 2014-05-30 01:48:08 -04:00
Ryan C. Gordon
910fb4584e First shot (not even compiled) at Windows hit-testing support. 2014-05-29 13:39:02 -04:00
Ryan C. Gordon
61463598b2 Tweaked hit-testing documentation. 2014-05-29 13:38:39 -04:00
Ryan C. Gordon
5dc5c34ad7 Added a few debug printf() calls. 2014-05-28 01:27:27 -04:00
Ryan C. Gordon
7af1c6e050 Changed drag area API to a hit-testing API.
There were several good arguments for this: it's how Windows works with
 WM_NCHITTEST, SDL doesn't need to manage a list of rects, it allows more
 control over the regions (how do you use rects to cleanly surround a circular
 button?), the callback can be more optimized than a iterating a list of
 rects, and you don't have to send an updated list of rects whenever the
 window resizes or layout changes.
2014-05-28 01:22:47 -04:00
Ryan C. Gordon
dd0cdeab8b Don't hardcode an 8 here. 2014-05-27 15:47:25 -04:00
Ryan C. Gordon
7fd9f9483d Some updates for the X11 drag areas work. 2014-05-27 15:40:03 -04:00
Damian Kaczmarek
b185490238 Initial work on X11 implementation of SDL_SetWindowDragAreas(). 2014-05-27 14:41:16 -04:00
Ryan C. Gordon
6146fd1f61 First shot at SDL_SetWindowDragAreas().
Only Cocoa implemented right now.
2014-05-27 01:27:42 -04:00
Ryan C. Gordon
22f1b394d6 Added SDL_PointInRect(). 2014-05-27 00:26:47 -04:00
Ryan C. Gordon
9a71f85bb4 Flip this around to do the simpler condition first. 2014-05-24 18:23:56 -04:00
Ryan C. Gordon
c33376b028 Implement SDL_CaptureMouse() for Mac OS X. 2014-05-24 18:23:39 -04:00
Ryan C. Gordon
c28b3364b0 Implemented SDL_CaptureMouse(). 2014-05-24 01:30:37 -04:00
Ryan C. Gordon
a8ae14cb57 Added some FIXMEs. 2014-05-24 01:27:19 -04:00
Ryan C. Gordon
e5626abaf2 Fixed whitespace. 2014-05-24 01:25:27 -04:00
Ryan C. Gordon
ac45f3149f Generated dynapi stuff for the new WinRT entry points. 2014-05-24 01:23:57 -04:00
Sam Lantinga
34f20c8f0d Fixed crash if the OpenGL library hasn't been loaded yet 1970-01-01 04:04:21 +00:00
Yuri Kunde Schlesner
4927ba7549 Align pointer in SDL_memset before doing Uint32 loop
Some more recent compilers emit SSE aligned store instructions for the loop,
causing crashes if the destination buffer isn't aligned on a 32-bit boundary.
This would also crash on platforms like ARM that require aligned stores.

This fixes a crash inside SDL_FillRect that happens with the official x64 mingw
build.
2014-05-10 21:48:46 -03:00
Philipp Wiesemann
cbfd769a05 Changed C++ style comments. 2014-05-18 21:11:30 +02:00
Philipp Wiesemann
b1242be50b Fixed typo in header comment. 2014-05-18 21:05:39 +02:00
Philipp Wiesemann
275dddab6b Changed C++ style comments to fix pedantic warnings. 2014-05-17 22:02:25 +02:00
Philipp Wiesemann
cbb1a8a12d Removed unused standard library includes from gesture source. 2014-05-17 21:52:05 +02:00
Gabriel Jacobo
35e55adb13 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
89b0a3e80f Added a binding for the NVIDIA Shield controller 2014-05-13 12:10:37 -07:00
Sam Lantinga
9a700c5bf4 Updated coding style to match the rest of SDL 2014-05-13 11:32:36 -07:00
Philipp Wiesemann
9227317d4d Fixed typo in header comment. 2014-05-11 15:59:22 +02:00
David Ludwig
cb0ab5c68c 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
da5788fb90 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.
2014-05-10 23:28:53 -04:00
Gabriel Jacobo
48789acdd8 Improve handling of focus behaviour on Android. Patch by Alexey Petruchik 2014-05-10 18:24:39 -03:00
Gabriel Jacobo
7c86f42a25 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
4cce598c92 Fixes #2512, handle configuration change messages sent by Wayland. Patch by Bryan Cain. 2014-05-10 16:50:05 -03:00
Sam Lantinga
82189e170f Updated iOS deployment target to iOS 5.1 2014-05-10 12:34:16 -07:00
Gabriel Jacobo
6a1dcf78fb Fixes #2529, guard SDL_d3math.* with the proper defines 2014-05-10 16:23:06 -03:00
Gabriel Jacobo
b54816407a Fixes #2519, clear error if using the default library path for EGL succeeds. 2014-05-10 16:13:22 -03:00
Gabriel Jacobo
0ed35a7e64 A few more ANDROID for __ANDROID__ replacements 2014-05-10 15:57:09 -03:00
Dimitris Zenios
8adc9938a4 __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
58d233d9d6 Export android jni functions even when build with -fvisibility=hidden flag 2014-05-05 22:26:21 +03:00
Dimitris Zenios
3a3effaf9b Show android video or android audio if detected in autotools summary. 2014-05-05 22:36:47 +03:00
Sam Lantinga
2be687175b 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
f2ee51e841 WinRT: display-information code cleanups 2014-05-09 21:28:52 -04:00
David Ludwig
5f137fa5ef 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
eb27c9f82d 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
3adf70d52e 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
9b891dd0b5 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