mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-24 06:51:55 +00:00
Add Emscripten window data to window properties
This commit is contained in:
parent
4aefde015e
commit
cbc26fe2c4
2 changed files with 11 additions and 0 deletions
|
|
@ -525,6 +525,10 @@ static bool Emscripten_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window,
|
|||
};
|
||||
}, window);
|
||||
|
||||
// Ensure canvas_id and keyboard_element are added to the window's properties
|
||||
SDL_SetStringProperty(window->props, SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID, wdata->canvas_id);
|
||||
SDL_SetStringProperty(window->props, SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT, wdata->keyboard_element);
|
||||
|
||||
// Window has been successfully created
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue