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

[shell] [web] Temporary workaround for shell.html <canvas> CSS width #4466

Closed
wants to merge 1 commit into from

Conversation

asdqwe
Copy link
Contributor

@asdqwe asdqwe commented Nov 5, 2024

Ref: #4464

Temporary workaround for canvas.emscripten { width: 100%; } CSS not working with current emscripten (3.1.70).
Revert this change when the issue is fixed upstream.

  1. Found out that the <canvas> width can be resized with CSS, but only after it's loaded.
  2. The issue could be related to $GLFW_Window: function that now takes the framebuffer's width/height as separated parameters (ref1, ref2).
  3. Hooked this workaround to Module.setStatus because it was the only Module option I found that runs (consistently) after the canvas finishes loading.

@asdqwe
Copy link
Contributor Author

asdqwe commented Nov 5, 2024

Unfortunately (upon more testing) this workaround only handles the canvas size. The mouse input is still wrong (unscaled). Closing the PR because the workaround is insufficient.

@asdqwe asdqwe closed this Nov 5, 2024
@asdqwe asdqwe deleted the workaround-canvas-width branch November 5, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant