Commit graph

8252 commits

Author SHA1 Message Date
Ryan C. Gordon
a0881fff00 Windows: Report window HDC in SDL_SysWMinfo.
Fixes Bugzilla #2668.

--HG--
extra : rebase_source : d45a1a2af2c6e79d4b778383dd88a6a994c3e81a
2015-03-23 19:47:08 -04:00
Philipp Wiesemann
cd86ab1347 Android: Removed not needed include statement. 2015-03-23 20:24:04 +01:00
Philipp Wiesemann
940b699079 Updated test program for Emscripten. 2015-03-23 20:21:45 +01:00
Ryan C. Gordon
7e2f6f1519 Cocoa: Handle more cases of lost focus when Key window closes (thanks, Alex!).
Sort of fixes Bugzilla #1825 a little more. It's an ongoing effort.  :)

--HG--
extra : rebase_source : 38d5f2acbb118274e69d72205c747350c3e23a9c
2015-03-22 01:25:12 -04:00
Philipp Wiesemann
4c9b75b839 Added missing SDL_DOLLARRECORD event type documentation in header. 2015-03-21 22:42:53 +01:00
Philipp Wiesemann
1abb012ae5 Fixed confusing audio and touch events because of shared enumeration values. 2015-03-21 08:01:43 +01:00
Ryan C. Gordon
ee9303f845 Patched to compile on OpenGL ES-based platforms. 2015-03-21 00:09:22 -04:00
Ryan C. Gordon
a8024d0dec Whoops, lost a newline in here. 2015-03-20 23:29:09 -04:00
Ryan C. Gordon
5e4b3fca00 Several corrections to the CMake project files (thanks, Ozkan!).
Fixes Bugzilla #2732.
2015-03-20 21:57:15 -04:00
Ryan C. Gordon
4abae0105f Windows: support for OpenGL extension WGL_ARB_context_flush_control. 2015-03-20 12:23:53 -04:00
Emmanuel Gil Peyrot
984599afad Wayland: Properly discover displays and their modes.
Fixes Bugzilla #2913.

--HG--
extra : histedit_source : afa4cb6d068d5612aa51fd2435c385e039ba081d
2015-03-18 01:14:45 +01:00
Ryan C. Gordon
fc181d4b0e CMake: Dependency variable for FUSIONSOUND_SHARED was wrong (thanks, Kaleb!).
Fixes Bugzilla #2055.
2015-04-07 21:52:22 -04:00
Ryan C. Gordon
5a081912b3 CMake: fix CHECK_OBJC_SOURCE_COMPILES to work with GCC (thanks, Ivan!).
Apparently -ObjC works with Clang, but -x objective-c works with both.

Fixes Bugzilla #2392.

--HG--
extra : rebase_source : 2426caa02274b28d88abd7b07cf70fcdd7e08804
2015-04-07 20:01:43 -04:00
Philipp Wiesemann
295e6b3609 Fixed typo in gesture README. 2015-04-07 23:00:56 +02:00
Ryan C. Gordon
57677eda37 Another attempt to make MSVC's /W4 warning level cooperate with SDL_assert.
Fixes Bugzilla #2733.
2015-04-07 00:39:16 -04:00
Alex Baines
13dadf3829 Fix DBus error message if IBus couldn't be initialized.
--HG--
extra : rebase_source : b77d55bd711d20a753479ea4db0916ccd2dedca6
2015-03-20 19:47:03 +00:00
Ryan C. Gordon
d4592104ee Refuse to make a window that's too large. Some systems (x11) freak out at this.
Fixes Bugzilla #2255.
2015-04-06 18:26:13 -04:00
Edward Rudd
b41f061d46 the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here.
Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here.  Not 5 or 10 depending on the architecture.

More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
2015-04-06 16:48:24 -04:00
Marc Di Luzio
ec0e5f1a73 Allow setting of GL_CONTEXT_RELEASE_BEHAVIOR when creating the GL context when GLX_ARB_context_flush_control is available.
This extension allows the user to specify whether a full flush is performed when making a context not current.
The only way to set this currently is at context creation, so this patch provides that functionality.
Defualt behaviour is set at FLUSH, as per the spec.

This patch does not contain the changes to WGL, appleGL or other platforms as I do not have access to GL 4.5 hardware on those platforms.

Full details on the use of KHR_context_flush_control can be found here:
https://www.opengl.org/registry/specs/KHR/context_flush_control.txt
2015-03-06 16:03:40 +00:00
Ryan C. Gordon
2de05b5d5c CMake: Don't search for the OpenGL library on Mac OS X. It's always there. 2015-03-20 11:51:03 -04:00
Ryan C. Gordon
8d0b48cef1 Audio hotplug fixes for winmm and XAudio2 backends. 2015-03-20 11:11:44 -04:00
Ryan C. Gordon
2eecc49426 CMake project files no longer force you to link against Wayland or Mir libs. 2015-03-20 10:35:42 -04:00
Ryan C. Gordon
ae08aea517 Fixed some defaults in CMake project file.
Fixes not finding dlopen(), etc.
2015-03-20 10:02:45 -04:00
Ryan C. Gordon
6c6bc81974 Patched to compile on gcc2. 2015-03-19 23:54:35 -04:00
Ryan C. Gordon
84753c68f7 Removed unused variable. 2015-03-19 23:45:34 -04:00
Ryan C. Gordon
af94711fb1 Make static analysis happy. 2015-03-19 23:44:47 -04:00
Ryan C. Gordon
cb00e52aeb Fixed a compiler warning on Visual Studio.
--HG--
extra : amend_source : e9bf68163b3496c4fd7126a2a91cd2469579f901
2015-03-19 23:39:53 -04:00
Ryan C. Gordon
9c567d5e93 Patched to compile on Windows. 2015-03-19 23:35:43 -04:00
Ryan C. Gordon
90bd9250a4 Immediately minimize the goofy window in testaudiohotplug. 2015-03-19 22:20:12 -04:00
Ryan C. Gordon
fc1b620b3d Zero out the audio hotplug event structure, so the "padded" fields are sane.
Just in case we ever need those bits in the future.
2015-03-19 22:11:20 -04:00
Ryan C. Gordon
cd3f491efb PulseAudio: Hotplug support! 2015-03-19 22:08:12 -04:00
Ryan C. Gordon
3883c8c40c SDL_RemoveAudioDevice() should specify capture vs output.
This lets us reuse values between the two categories without conflicting, etc.

--HG--
extra : amend_source : a48f3e0a0274d02f31a1832fbc82d581a6fd12b9
2015-03-19 15:43:00 -04:00
Ryan C. Gordon
8f923a1c33 Removed the broken audio streaming code, other small cleanups. 2015-03-19 13:34:17 -04:00
Ryan C. Gordon
d0a775e968 Disconnected/broken/lost audio devices now continue to fire their callback.
The data produced by the callback is just thrown away and the audio thread
delays as if it's waiting for the hardware to drain.

This lets apps that rely on their audio callback firing regularly continue
to make progress to function as properly as possible in the face of disaster.
Apps that want to know that the device is really gone and deal with that
scenario can use the new hotplug functionality.
2015-03-19 13:27:10 -04:00
Ryan C. Gordon
2586087fca Don't assert if an audio backend reports the same device disconnected twice. 2015-03-19 13:15:28 -04:00
Ryan C. Gordon
0152738d86 PulseAudio: Improved multidevice support.
Added capture device enumeration, report human-readable device name, other
cleanups.

--HG--
extra : rebase_source : bb33f6fa05c47251e952a7b308998d2684f3f907
2015-03-18 10:29:04 -04:00
Ryan C. Gordon
9fd7d23246 Bunch of reworking to how we manage audio devices.
Device enumeration now happens at startup and then is managed exclusively
through hotplugging instead of full redetection. The device name list now has
a unique "handle" associated with each item and SDL will pass this to the
backend so they don't have to figure out how a human readable name maps to
real hardware for a second time.

Other cleanups, fixes, improvements, plus all the audio backends updated to
the new interface...largely untested at this point, though.

--HG--
extra : rebase_source : c9a4272788a67deb7a787304ef008188bb40184d
2015-03-18 02:01:17 -04:00
Ryan C. Gordon
e98dd173b7 Initial work on audio device hotplug support.
This fills in the core pieces and fully implements it for Mac OS X.

Most other platforms, at the moment, will report a disconnected device if
it fails to write audio, but don't notice if the system's device list changed
at all.

--HG--
extra : rebase_source : f7e7efbbeecfe58338b0f325340c358c2bdfc402
2015-03-16 02:11:39 -04:00
Ryan C. Gordon
390dd29faa Changed some SDL_memset() calls to SDL_zero().
--HG--
extra : rebase_source : b7fa90eeecb5272a753e4d1f395926023266f330
2015-03-18 10:09:39 -04:00
Ryan C. Gordon
8b4b24c103 Tweaked a couple comments, added some FIXMEs.
--HG--
extra : rebase_source : 57eb90da4411aba512a3df1af1d60bb6daa72aa6
2015-03-18 10:09:23 -04:00
David Ludwig
6a1d79c7cd WinRT: updated names, and references-to, various ANGLE/WinRT repositories 2015-03-18 12:03:32 -04:00
Ryan C. Gordon
466c8a104b Patched to compile on C89 compilers. 2015-03-18 10:05:36 -04:00
Ryan C. Gordon
f8af9d36b1 PulseAudio: Added multiple device support, other cleanups.
Thanks to Dominik Frizel for most of the effort on this!

Fixes Bugzilla #2730.
2015-03-18 09:59:22 -04:00
Ryan C. Gordon
317ab8a96a Fixed a compiler warning. 2015-03-18 00:56:33 -04:00
David Ludwig
0c003b66c4 WinRT: made OpenGL window-init work with latest round of ANGLE/WinRT updates
Various constants in ANGLE/WinRT, both in MSOpenTech's ms-master branch, and
in Google's branch, were changed again.  This change makes SDL/WinRT work with
them.

To note, the ms-master branch (of ANGLE) was updated via this merge:
bbd2eb0a9c (diff-d1377fbe747de154e1bfcf7221d3de67)
2015-03-17 19:45:47 -04:00
David Ludwig
7be22f39a9 WinRT: another ANGLE/OpenGL-initialization, error messaging tweak 2015-03-17 10:25:21 -04:00
David Ludwig
93fc5ce8a9 WinRT: ANGLE/OpenGLES-initialization, error message improvements 2015-03-17 10:22:36 -04:00
Philipp Wiesemann
37895d5fa7 Updated name of assert type in test program. 2015-03-15 19:25:10 +01:00
Ryan C. Gordon
3b609feebf Cleaning out a silly coding style I used to use.
Changed all the "return (x);" lines to "return x;"
2015-03-13 12:20:17 -04:00
Ryan C. Gordon
ad570bffcc Removed an unnecessary #ifdef. 2015-03-13 00:48:30 -04:00