Commit graph

8842 commits

Author SHA1 Message Date
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
Brandon Schaefer
474fc17a7e Mir: Add mouse grab support (requires mir 0.24) 2016-08-30 12:58:00 -07:00
Philipp Wiesemann
63c0ba2c47 Fixed log message in audio capture test program. 2016-08-30 21:16:04 +02:00
Philipp Wiesemann
aee365bac1 Android: Removed unused internal function. 2016-08-30 21:15:46 +02:00
Philipp Wiesemann
a3b6299185 Android: Fixed misleading warning in log output (thanks, Sylvain!).
Fixes Bugzilla #3418.
2016-08-30 21:15:18 +02:00
Philipp Wiesemann
da705f6490 Android: Fixed missing mouse motion events while button down (thanks, Sylvain!).
Happened for real mouse if SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH was active.

Fixes Bugzilla #3313.
2016-08-30 21:14:52 +02:00
Philipp Wiesemann
74cf2bf6b2 Fixed compiling if filesystem is disabled (thanks, Elias!).
Fixes Bugzilla #3414.
2016-08-30 21:14:13 +02:00
David Ludwig
2057cedc7f WinRT: added SDL_*ScreenSaver() support; fixed crash when restoring app from screensaver 2016-08-29 20:27:21 -04:00
Sam Lantinga
a1fec97f67 Fixed sorting and name of XBox wireless controller entry 2016-08-16 12:02:22 -07:00
Sam Lantinga
144cbcb137 Merged Change: 3576099 from rel/streaming_client
Description:
SDL - add mapping for xbox one s wireless controller
2016-08-16 12:02:12 -07:00
David Ludwig
cc18c09dd6 WinRT: patched to compile 2016-08-29 10:48:56 -04:00
Ryan C. Gordon
3caa2a82b4 cocoa: Fixed incorrect autorelease, noted by static analysis. 2016-08-28 19:06:31 -04:00
Ryan C. Gordon
18a636eed1 nacl: Patched to compile. 2016-08-28 18:52:25 -04:00
Ryan C. Gordon
f8548a263b Patched to compile on Haiku. 2016-08-28 18:24:44 -04:00
Ryan C. Gordon
b8e34b3fa1 Merge audio capture work back into the mainline. 2016-08-28 13:36:13 -04:00
Ryan C. Gordon
74eda003ee Patched to compile. 2016-08-28 11:56:11 -04:00
Ryan C. Gordon
8de6259b93 alsa: Implemented hotplug support, cleaned up device names. 2016-08-28 08:50:26 -07:00
Ryan C. Gordon
1255ef83fa ios: patched to compile.
--HG--
extra : rebase_source : 6b3c529e5b6a8db2e011c32de084381c0827b0a9
2016-08-26 15:46:29 -04:00