Commit Graph

8855 Commits

Author SHA1 Message Date
Alex Szpakowski
c4da538ddb 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.
2016-09-15 19:59:57 -03:00
Sam Lantinga
b828bd1058 Fixed building for both iOS and tvOS on Xcode 8 2016-09-14 08:45:35 -07:00
Sam Lantinga
72494063a9 Fixed including OpenGL ES on iOS without any other SDL headers 2016-09-14 08:20:24 -07:00
Sam Lantinga
dff28c0f37 Allow targeting tvOS 2016-09-14 07:09:35 -07:00
Sam Lantinga
1be135c3ef Fixed spacing 2016-09-13 18:44:28 -07:00
Sam Lantinga
217f7cab99 Fixed accidental call to SDL_PrivateJoystickHat() 2016-09-13 18:43:55 -07:00
Alex Szpakowski
a714cf6d15 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
f7cdca5b0d 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
5e63affced 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
937207056b Add mapping for media keys 2016-09-13 00:04:00 -07:00
Alon Zakai
31fd8a9e0e use Module.createContext for 2D rendering in emscripten 2016-09-13 00:03:59 -07:00
Alon Zakai
f873443b21 add some detail to fullscreen workaround comment; version 6
Conflicts:
	version.txt
2016-09-13 00:03:58 -07:00
Charlie Birks
afdd5e100b only unset fullscreen flags if fullscreen failed 2016-09-13 00:03:56 -07:00
Charlie Birks
d9a88b96e8 use screen resolution instead of canvas size 2016-09-13 00:03:55 -07:00
Boris Gjenero
9d00142f75 Fix full screen mode in Firefox, which was broken by 9d4beb2 2016-09-13 00:03:54 -07:00
Boris Gjenero
ef19ecbc56 Support SDL_SetWindowTitle() via Module['setWindowTitle']() 2016-09-13 00:03:53 -07:00
Jukka Jylänki
ba527c7f6a Remove unused variable warning from Emscripten build in Emscripten_HandleFullscreenChange(). 2016-09-13 00:03:51 -07:00
Jukka Jylänki
672196b15d 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
3744534cff Unpress all keys on blur to avoid stuck keys 2016-09-13 00:03:49 -07:00
Boris Gjenero
8f49012235 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
9308054353 Mouse events use CSS coordinates, so don't scale by pixel_ratio 2016-09-13 00:03:46 -07:00
Boris Gjenero
b4510f7c47 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
42ddc908b4 Fix of mouse events in browser without pointer locks 2016-09-13 00:03:44 -07:00
Alon Zakai
4f4c2f37a5 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
df8e7e4267 optimize a getValue 2016-09-13 00:03:41 -07:00
Charlie Birks
698b903e3b Include timers when using cmake (#29) 2016-09-13 00:03:40 -07:00
Charlie Birks
eb7c4d30bc send mouse move on enter/leave 2016-09-13 00:03:39 -07:00
Charlie Birks
0fedce3a2b listen for mouse up on document (fixes mouseup outside canvas) 2016-09-13 00:03:37 -07:00
Charlie Birks
14f0448296 use SDL_SetMouseFocus 2016-09-13 00:03:36 -07:00
Sam Lantinga
739d3be315 simplify fullscreen handling using new fullscreen_strategy api, patch contributed by Charlie Birks 2016-09-13 00:03:28 -07:00
Charlie Birks
e5511d4d55 use css size for touch normalisation 2016-09-12 23:58:08 -07:00
Sam Lantinga
e730ada35f Reverted previous commit which breaks game controller input processing. 2016-09-09 15:12:09 -07:00
Sam Lantinga
9b546b9b7c Suggestion from Apple: use kCFRunLoopCommonModes which does more complete event processing 2016-09-08 20:38:23 -07:00
Ryan C. Gordon
1aa7cd0d3b 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.
2016-09-06 13:13:03 -04:00
Ryan C. Gordon
59c168b631 emscripten-buildbot.sh: exit with an error if configure/make fail. 2016-09-06 12:18:52 -04:00
Ryan C. Gordon
f3b798f722 mac: Patched to compile with CMake project. 2016-09-04 01:42:46 -04:00
Ryan C. Gordon
633dd6f5ba 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.
2016-09-04 01:23:55 -04:00
Ryan C. Gordon
4fb0fe03cf coreaudio: capture devices should let the system allocate the render buffer. 2016-09-03 00:13:41 -04:00
Ryan C. Gordon
6d6600af7e coreaudio: Replaced an int with an SDL_bool. 2016-09-02 13:12:21 -04:00
Ryan C. Gordon
dea40869bb coreaudio: Move some variable declarations to the top of the scope. 2016-09-02 13:11:28 -04:00
Gabriel Jacobo
8c71c9d92b Fixes building SDL on Ubuntu 16.04 with Mir headers installed 2016-09-01 16:01:54 -03:00
Sam Lantinga
ac9647e0b2 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
d1f5d6d436 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
fa6d007f86 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
7db2ec4c4f emscripten: Be more aggressive when closing audio capture devices.
Fixes exceptions being thrown on shutdown.
2016-08-31 16:10:04 -04:00
David Ludwig
2de39f53fb WinRT: added an extra NULL pointer check for SDL_*ScreenSaver() backend code 2016-08-31 12:52:55 -04:00
Brandon Schaefer
e267302c16 Mir: Add mouse grab support (requires mir 0.24) 2016-08-30 12:58:00 -07:00
Philipp Wiesemann
0510ab75b3 Fixed log message in audio capture test program. 2016-08-30 21:16:04 +02:00
Philipp Wiesemann
f51cd13da8 Android: Removed unused internal function. 2016-08-30 21:15:46 +02:00
Philipp Wiesemann
fcefcabd5c Android: Fixed misleading warning in log output (thanks, Sylvain!).
Fixes Bugzilla #3418.
2016-08-30 21:15:18 +02:00