Commit graph

9009 commits

Author SHA1 Message Date
Alex Szpakowski
5160ba4a21 tvOS: Add drop-file support 2016-09-15 21:49:29 -03:00
Sam Lantinga
8d2e2aad1d Fixed set of libraries needed to build on Mac OS X 2016-09-15 08:57:56 -07:00
Sam Lantinga
ed62fd26c8 Hopefully fixed the cmake build on Mac OS X 2016-09-15 08:46:14 -07:00
Sam Lantinga
1b61eae340 Fixed building new coreaudio driver on Mac OS X 2016-09-15 08:29:20 -07:00
Alex Szpakowski
a98de9e4f7 CoreAudio iOS/tvOS: Use AVFoundation instead of AudioSession. Fixes audio on tvOS.
Note that linking with AVFoundation is now required if you don't disable SDL_audio compilation on iOS and tvOS.

--HG--
rename : src/audio/coreaudio/SDL_coreaudio.c => src/audio/coreaudio/SDL_coreaudio.m
2016-09-15 19:59:57 -03:00
Sam Lantinga
d3f9978231 Fixed building for both iOS and tvOS on Xcode 8 2016-09-14 08:45:35 -07:00
Sam Lantinga
a1e419f3ad Fixed including OpenGL ES on iOS without any other SDL headers 2016-09-14 08:20:24 -07:00
Sam Lantinga
2cbc2b95ec Allow targeting tvOS 2016-09-14 07:09:35 -07:00
Sam Lantinga
dcc80b6128 Fixed spacing 2016-09-13 18:44:28 -07:00
Sam Lantinga
dcc8498733 Fixed accidental call to SDL_PrivateJoystickHat() 2016-09-13 18:43:55 -07:00
Alex Szpakowski
398a513d09 Initial Apple TV / tvOS support.
The Apple TV remote is currently exposed as a joystick with its touch surface treated as two axes. Key presses are also generated when its buttons and touch surface are used.

A new hint has been added to help deal with deciding whether to background the app when the remote's menu button is pressed: SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS.
2016-09-13 22:18:06 -03:00
Alex Szpakowski
5935e90124 Enable more compiler warnings in the Xcode projects (based on Xcode 8's suggestion), made some integer downcasts explicit. 2016-09-13 19:51:10 -03:00
Sam Lantinga
f6a0ed861b Only prevent the default browser event handling when the specific event types aren't disabled by the user, patch contributed by Jonas Platte 2016-09-13 00:09:21 -07:00
Charlie Birks
7e29f2ad53 Add mapping for media keys 2016-09-13 00:04:00 -07:00
Alon Zakai
a9c5c0a83a use Module.createContext for 2D rendering in emscripten 2016-09-13 00:03:59 -07:00
Alon Zakai
87fcf49977 add some detail to fullscreen workaround comment; version 6
Conflicts:
	version.txt
2016-09-13 00:03:58 -07:00
Charlie Birks
0666f33fcd only unset fullscreen flags if fullscreen failed 2016-09-13 00:03:56 -07:00
Charlie Birks
8d7af3e24e use screen resolution instead of canvas size 2016-09-13 00:03:55 -07:00
Boris Gjenero
1f6196f7ed Fix full screen mode in Firefox, which was broken by 9d4beb2 2016-09-13 00:03:54 -07:00
Boris Gjenero
a45bf24aa2 Support SDL_SetWindowTitle() via Module['setWindowTitle']() 2016-09-13 00:03:53 -07:00
Jukka Jylänki
16ce3640ca Remove unused variable warning from Emscripten build in Emscripten_HandleFullscreenChange(). 2016-09-13 00:03:51 -07:00
Jukka Jylänki
115362770b Fix CMake CMAKE_REQUIRED_FLAGS handling to preserve existing CMake flags required by Emscripten toolchain. 2016-09-13 00:03:50 -07:00
Boris Gjenero
467fa3d7da Unpress all keys on blur to avoid stuck keys 2016-09-13 00:03:49 -07:00
Boris Gjenero
5220e32e77 Listen for blur and focus events on window instead of canvas
Blur and focus events were not arriving for the canvas in
Firefox 35 and Chrome 40.
2016-09-13 00:03:48 -07:00
Boris Gjenero
3bd567bd94 Mouse events use CSS coordinates, so don't scale by pixel_ratio 2016-09-13 00:03:46 -07:00
Boris Gjenero
fd627cf270 Accumulate subpixel mouse motion so motion is not lost.
Previously when the canvas was scaled up and the pointer was locked,
motion corresponding to less than one pixel was lost. Therefore,
slow mouse motion resulted in no motion. This fixes that.
2016-09-13 00:03:45 -07:00
TelpeNight
5f08d5e557 Fix of mouse events in browser without pointer locks 2016-09-13 00:03:44 -07:00
Alon Zakai
16b7d18eca optimize Emscripten_UpdateWindowFramebuffer
- avoid creating contexts and images all the time
 - use set and then fix alpha directly
2016-09-13 00:03:43 -07:00
Alon Zakai
d64289964b optimize a getValue 2016-09-13 00:03:41 -07:00
Charlie Birks
7c5a528749 Include timers when using cmake (#29) 2016-09-13 00:03:40 -07:00
Charlie Birks
398f20caa9 send mouse move on enter/leave 2016-09-13 00:03:39 -07:00
Charlie Birks
b1060d944f listen for mouse up on document (fixes mouseup outside canvas) 2016-09-13 00:03:37 -07:00
Charlie Birks
8b9e76645d use SDL_SetMouseFocus 2016-09-13 00:03:36 -07:00
Sam Lantinga
c35f8fede4 simplify fullscreen handling using new fullscreen_strategy api, patch contributed by Charlie Birks 2016-09-13 00:03:28 -07:00
Charlie Birks
fa82ab5f72 use css size for touch normalisation 2016-09-12 23:58:08 -07:00
Sam Lantinga
372ca0e2ce Reverted previous commit which breaks game controller input processing. 2016-09-09 15:12:09 -07:00
Sam Lantinga
1019891bb8 Suggestion from Apple: use kCFRunLoopCommonModes which does more complete event processing 2016-09-08 20:38:23 -07:00
Ryan C. Gordon
c19a7e82f1 emscripten: special case to make SDL_ShowSimpleMessageBox() work.
Browsers don't have the functionality to fully support the generic
SDL_ShowMessageBox(), but this handles the likely most-common case.

Without this, you'd return immediately with a proper error result and no UI,
but probably no one checks that for SDL_ShowSimpleMessageBox. And if they
did: what would they do to handle this anyhow?

We'd need to lobby for an HTML spec of some sort that allows customizable
message boxes--that block!--to properly support SDL message boxes on
Emscripten, but this is probably Good Enough for now.

--HG--
extra : rebase_source : 1ac25d7dc24d6b9cf86e685d9369056e973daa7a
2016-09-06 13:13:03 -04:00
Ryan C. Gordon
450af28fd6 emscripten-buildbot.sh: exit with an error if configure/make fail.
--HG--
extra : rebase_source : 27e3fbb87e49bfb7366034054f997b3946a1486e
2016-09-06 12:18:52 -04:00
Ryan C. Gordon
546eb95ce0 mac: Patched to compile with CMake project. 2016-09-04 01:42:46 -04:00
Ryan C. Gordon
f3c55747f4 coreaudio: Move from AudioUnits to AudioQueues.
AudioQueues are available in Mac OS X 10.5 and later (and iOS 2.0 and later).
Their API is much more clear (and if you don't mind the threading tapdance
to get its own CFRunLoop) much easier to use in general for our purposes.

As an added benefit: they seemlessly deal with format conversion in ways
AudioUnits don't: for example, my MacBook Pro's built-in microphone won't
capture at 8000Hz and the AudioUnit version wouldn't resample to hide this
fact; the AudioQueue version, however, can handle this.

--HG--
extra : rebase_source : c669d2a21f862758fb2aeebd3fa89d70b33cfc50
2016-09-04 01:23:55 -04:00
Ryan C. Gordon
2d2aede79f coreaudio: capture devices should let the system allocate the render buffer.
--HG--
extra : rebase_source : 174fc80717b44815cfa5f0f5d63ef6544ab6055b
2016-09-03 00:13:41 -04:00
Ryan C. Gordon
c89347abed coreaudio: Replaced an int with an SDL_bool.
--HG--
extra : rebase_source : 138647f0ffe75f92eb0390ca9703583e09265bf8
2016-09-02 13:12:21 -04:00
Ryan C. Gordon
e41b4d3b34 coreaudio: Move some variable declarations to the top of the scope.
--HG--
extra : rebase_source : 2147efb04a4264b6a191ea9dcf631708650d39e0
2016-09-02 13:11:28 -04:00
Gabriel Jacobo
641bf4c2c8 Fixes building SDL on Ubuntu 16.04 with Mir headers installed 2016-09-01 16:01:54 -03:00
Sam Lantinga
aa51d46bdd wayland: Add support for relative mouse mode, by Jonas Ådahl <jadahl@gmail.com>
Generate the C protocol files from the protocol XML files installed by
wayland-protocols, and use them to implement support for relative pointer
motions and pointer locking.

Note that at the time, the protocol is unstable and may change in the future.
Any future breaking changes will, however, fail gracefully and result in no
regressions compared to before this patch.
2016-09-01 01:26:56 -07:00
Jonas Ådahl
44760bd0c7 wayland: Build own version of core protocol
Since we are loading shared objects dynamically, build our own version of the
core protocol symbols, so that we in the future can include protocol
extensions.
2016-06-23 18:39:05 +08:00
Bastien Nocera
1d3cd63751 Wayland: Set "class" for each window we create
This will be used by Wayland compositors to match the application ID and
.desktop file to the SDL window(s).

Applications can set the SDL_VIDEO_WAYLAND_WMCLASS environemnt variable
early in the process to override using the binary name as a fallback.

Note that we also support the SDL_VIDEO_X11_WMCLASS in the Wayland
backend so that if a program correctly associated the desktop file with
the window under X11, only a newer SDL would be needed for it to work
under Wayland.

https://bugzilla.libsdl.org/show_bug.cgi?id=3376
2016-09-01 01:22:58 -07:00
Ryan C. Gordon
fc0551d74b emscripten: Be more aggressive when closing audio capture devices.
Fixes exceptions being thrown on shutdown.

--HG--
extra : rebase_source : baea1c89d09176d95aad86fba6508ad8f13ef7bb
2016-08-31 16:10:04 -04:00
David Ludwig
68dcd6e214 WinRT: added an extra NULL pointer check for SDL_*ScreenSaver() backend code
--HG--
extra : rebase_source : a3c3eba4b56a57a6a89d36934a2a3595b1199c89
2016-08-31 12:52:55 -04:00