Skip to content

Emscripten Resize event #14567

@LloydJHowarth

Description

@LloydJHowarth

Emscripten:

Currently the SDL_EVENT_WINDOW_RESIZED event is triggered when the canvas size changes for example using SDL_SetWindowSize

However I think when the document size changes it would also be a good time to call the SDL_EVENT_WINDOW_RESIZED event?

For example:

window.addEventListener("resize", () => 
{
    // Trigger SDL_EVENT_WINDOW_RESIZED event
});

This can be extremely useful for custom scaling or building our own "Fill Document" feature that constantly scales with the document, this will also detect resize on orientation as well making it more convenient to handle canvas / window operations on web.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions