Skip to content

Commit b521400

Browse files
committed
Note that the Emscripten window properties are strings
1 parent 82b245d commit b521400

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

include/SDL3/SDL_video.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,9 +1544,9 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetWindowParent(SDL_Window *window)
15441544
*
15451545
* On Emscripten:
15461546
*
1547-
* - `SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID`: the id the canvas element will
1547+
* - `SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING`: the id the canvas element will
15481548
* have
1549-
* - `SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT`: the keyboard element that
1549+
* - `SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING`: the keyboard element that
15501550
* associates keyboard events to this window
15511551
*
15521552
* \param window the window to query.
@@ -1594,8 +1594,8 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetWindowProperties(SDL_Window
15941594
#define SDL_PROP_WINDOW_X11_DISPLAY_POINTER "SDL.window.x11.display"
15951595
#define SDL_PROP_WINDOW_X11_SCREEN_NUMBER "SDL.window.x11.screen"
15961596
#define SDL_PROP_WINDOW_X11_WINDOW_NUMBER "SDL.window.x11.window"
1597-
#define SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID "SDL.window.emscripten.canvas_id"
1598-
#define SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL.window.emscripten.keyboard_element"
1597+
#define SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING "SDL.window.emscripten.canvas_id"
1598+
#define SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING "SDL.window.emscripten.keyboard_element"
15991599

16001600
/**
16011601
* Get the window flags.

src/video/emscripten/SDL_emscriptenvideo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,8 @@ static bool Emscripten_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window,
526526
}, window);
527527

528528
// Ensure canvas_id and keyboard_element are added to the window's properties
529-
SDL_SetStringProperty(window->props, SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID, wdata->canvas_id);
530-
SDL_SetStringProperty(window->props, SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT, wdata->keyboard_element);
529+
SDL_SetStringProperty(window->props, SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING, wdata->canvas_id);
530+
SDL_SetStringProperty(window->props, SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING, wdata->keyboard_element);
531531

532532
// Window has been successfully created
533533
return true;

0 commit comments

Comments
 (0)