Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] Refactor event handlers, drop most emscripten html5 dependencies. #52812

Merged
merged 7 commits into from
Oct 5, 2021

Conversation

Faless
Copy link
Collaborator

@Faless Faless commented Sep 18, 2021

In this PR:

  • Refactor input events to use our own JS library.
  • Refactor input JS library into its own file.
  • Drop window maximize support (it's very hacky, and I think nobody really uses it, just use canvasPolicy == 2, i.e. default).

In an effort to be less dependent on emscripten libraries, this PR drops most of the emscripten_* function usage in favour of internal JS implementations. This gives us more control over input processing, there's more work that could be done on this (e.g. resuming the AudioContext directly from JS), but this PR is growing already quite big, so I'd rather do that in a separate one.

With this, the only emscripten functions left used from C++ are the app lifecycle functions (set/cancel main loop, exit) and webgl related functions (context creation, buffer swapping, GLES compatibility).

3.x version of: #52811

@Faless Faless added this to the 3.4 milestone Sep 18, 2021
@Faless Faless marked this pull request as ready for review September 18, 2021 13:24
@Faless Faless requested a review from a team as a code owner September 18, 2021 13:24
@Faless Faless marked this pull request as draft October 5, 2021 11:53
Faless added 7 commits October 5, 2021 15:13
This makes us more independent from emscripten libraries, giving us more
control on the application lifecycle.
Removes more emscripten HTML5 library dependencies.
Removes more emscripten HTML5 library dependencies.
Removes more emscripten HTML5 library dependencies.
I don't think anyone is actively using it, and it's a lot of convoluted
code.
@Faless Faless marked this pull request as ready for review October 5, 2021 13:23
@akien-mga akien-mga merged commit e848da3 into godotengine:3.x Oct 5, 2021
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants