We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3229 - Various Emscripten changes
Summary: Various Emscripten changes
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: Other Other
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-09 14:57 UTC by Charlie Birks
Modified: 2016-10-17 13:59 UTC (History)
2 users (show)

See Also:


Attachments
use css size for touch normalisation (1.45 KB, patch)
2016-04-12 14:55 UTC, Charlie Birks
Details | Diff
simplify fullscreen handling using new fullscreen_strategy api (9.16 KB, patch)
2016-04-12 14:55 UTC, Charlie Birks
Details | Diff
use SDL_SetMouseFocus (864 bytes, patch)
2016-04-12 14:56 UTC, Charlie Birks
Details | Diff
listen for mouse up on document (fixes mouseup outside canvas) (1.53 KB, patch)
2016-04-12 14:59 UTC, Charlie Birks
Details | Diff
send mouse move on enter/leave (1.36 KB, patch)
2016-04-12 15:00 UTC, Charlie Birks
Details | Diff
Include timers when using cmake (845 bytes, patch)
2016-04-12 15:02 UTC, Charlie Birks
Details | Diff
optimize a getValue (793 bytes, patch)
2016-04-12 15:03 UTC, Charlie Birks
Details | Diff
optimize Emscripten_UpdateWindowFramebuffer (4.50 KB, patch)
2016-04-12 15:04 UTC, Charlie Birks
Details | Diff
Fix of mouse events in browser without pointer locks (2.63 KB, patch)
2016-04-12 15:05 UTC, Charlie Birks
Details | Diff
Accumulate subpixel mouse motion so motion is not lost. (2.46 KB, patch)
2016-04-12 15:07 UTC, Charlie Birks
Details | Diff
Mouse events use CSS coordinates, so don't scale by pixel_ratio (1.67 KB, patch)
2016-04-12 15:07 UTC, Charlie Birks
Details | Diff
Listen for blur and focus events on window instead of canvas (1.69 KB, patch)
2016-04-12 15:08 UTC, Charlie Birks
Details | Diff
Unpress all keys on blur to avoid stuck keys (995 bytes, patch)
2016-04-12 15:14 UTC, Charlie Birks
Details | Diff
Fix CMake CMAKE_REQUIRED_FLAGS handling to preserve existing CMake flags required by Emscripten toolchain. (3.14 KB, patch)
2016-04-12 15:16 UTC, Charlie Birks
Details | Diff
Remove unused variable warning from Emscripten build in Emscripten_HandleFullscreenChange(). (851 bytes, patch)
2016-04-12 15:17 UTC, Charlie Birks
Details | Diff
Support SDL_SetWindowTitle() via Module['setWindowTitle']() (1.96 KB, patch)
2016-04-12 15:18 UTC, Charlie Birks
Details | Diff
Fix full screen mode in Firefox, which was broken by 9d4beb2 (990 bytes, patch)
2016-04-12 15:23 UTC, Charlie Birks
Details | Diff
use screen resolution instead of canvas size (955 bytes, patch)
2016-04-12 15:25 UTC, Charlie Birks
Details | Diff
only unset fullscreen flags if fullscreen failed (1.81 KB, patch)
2016-04-12 15:26 UTC, Charlie Birks
Details | Diff
add some detail to fullscreen workaround comment (949 bytes, patch)
2016-04-12 15:27 UTC, Charlie Birks
Details | Diff
use Module.createContext for 2D rendering in emscripten (993 bytes, patch)
2016-04-12 15:28 UTC, Charlie Birks
Details | Diff
Add mapping for media keys (1.57 KB, patch)
2016-04-12 15:29 UTC, Charlie Birks
Details | Diff
Only prevent the default browser event handling when the specific event types aren't disabled by the user (5.00 KB, patch)
2016-04-12 15:29 UTC, Charlie Birks
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Birks 2016-01-09 14:57:23 UTC
Not sure of the best way to submit these, but here's a link to the relevant commits:

https://github.com/spurious/SDL-mirror/compare/master...Daft-Freak:squash
Comment 1 Martin Gerhardy 2016-01-13 14:06:02 UTC
+1 for these changes
Comment 2 Charlie Birks 2016-04-12 14:55:01 UTC
Created attachment 2410 [details]
use css size for touch normalisation

Prep for next patch
Comment 3 Charlie Birks 2016-04-12 14:55:53 UTC
Created attachment 2411 [details]
simplify fullscreen handling using new fullscreen_strategy api
Comment 4 Charlie Birks 2016-04-12 14:56:52 UTC
Created attachment 2412 [details]
use SDL_SetMouseFocus
Comment 5 Charlie Birks 2016-04-12 14:59:05 UTC
Created attachment 2413 [details]
listen for mouse up on document (fixes mouseup outside canvas)
Comment 6 Charlie Birks 2016-04-12 15:00:24 UTC
Created attachment 2414 [details]
send mouse move on enter/leave
Comment 7 Charlie Birks 2016-04-12 15:02:00 UTC
Created attachment 2415 [details]
Include timers when using cmake
Comment 8 Charlie Birks 2016-04-12 15:03:09 UTC
Created attachment 2416 [details]
optimize a getValue
Comment 9 Charlie Birks 2016-04-12 15:04:18 UTC
Created attachment 2417 [details]
optimize Emscripten_UpdateWindowFramebuffer

Significant optimisation to software rendering.
Comment 10 Charlie Birks 2016-04-12 15:05:31 UTC
Created attachment 2418 [details]
Fix of mouse events in browser without pointer locks
Comment 11 Charlie Birks 2016-04-12 15:07:17 UTC
Created attachment 2419 [details]
Accumulate subpixel mouse motion so motion is not lost.
Comment 12 Charlie Birks 2016-04-12 15:07:50 UTC
Created attachment 2420 [details]
Mouse events use CSS coordinates, so don't scale by pixel_ratio
Comment 13 Charlie Birks 2016-04-12 15:08:51 UTC
Created attachment 2421 [details]
Listen for blur and focus events on window instead of canvas
Comment 14 Charlie Birks 2016-04-12 15:14:51 UTC
Created attachment 2422 [details]
Unpress all keys on blur to avoid stuck keys
Comment 15 Charlie Birks 2016-04-12 15:16:43 UTC
Created attachment 2423 [details]
Fix CMake CMAKE_REQUIRED_FLAGS handling to preserve existing CMake flags required by Emscripten toolchain.
Comment 16 Charlie Birks 2016-04-12 15:17:18 UTC
Created attachment 2424 [details]
Remove unused variable warning from Emscripten build in Emscripten_HandleFullscreenChange().
Comment 17 Charlie Birks 2016-04-12 15:18:48 UTC
Created attachment 2425 [details]
Support SDL_SetWindowTitle() via Module['setWindowTitle']()
Comment 18 Charlie Birks 2016-04-12 15:23:32 UTC
Created attachment 2426 [details]
Fix full screen mode in Firefox, which was broken by 9d4beb2

This one is a hack but we can't use fullscreen mode otherwise... (see https://github.com/emscripten-ports/SDL2/pull/13 and https://github.com/kripken/emscripten/pull/3265)
Comment 19 Charlie Birks 2016-04-12 15:25:15 UTC
Created attachment 2427 [details]
use screen resolution instead of canvas size

Makes reported display mode actually match the screen.
Comment 20 Charlie Birks 2016-04-12 15:26:19 UTC
Created attachment 2428 [details]
only unset fullscreen flags if fullscreen failed
Comment 21 Charlie Birks 2016-04-12 15:27:36 UTC
Created attachment 2429 [details]
add some detail to fullscreen workaround comment

Comment on fullscreen hack
Comment 22 Charlie Birks 2016-04-12 15:28:21 UTC
Created attachment 2430 [details]
use Module.createContext for 2D rendering in emscripten
Comment 23 Charlie Birks 2016-04-12 15:29:04 UTC
Created attachment 2431 [details]
Add mapping for media keys
Comment 24 Charlie Birks 2016-04-12 15:29:43 UTC
Created attachment 2432 [details]
Only prevent the default browser event handling when the specific event types aren't disabled by the user
Comment 25 Charlie Birks 2016-04-12 15:32:03 UTC
Reminded about this today, so generated patches.
Comment 26 Charlie Birks 2016-09-01 14:11:51 UTC
Apart from "simplify fullscreen handling using new fullscreen_strategy api" and "Only prevent the default browser event handling when the specific event types aren't disabled by the user" these should still apply. Rebased versions of these are here: 

https://github.com/Daft-Freak/SDL-emscripten/commit/1cb4f143721ccf3217b55285d9755133caa261ff
https://github.com/Daft-Freak/SDL-emscripten/commit/365e9166000abe87d71f2d8316a317db826f87b8

Is there anything I need to do to get these looked at?
Comment 27 Sam Lantinga 2016-09-13 07:11:07 UTC
Patches applied, thanks!