Emscripten: fixed key events for text input

This commit is contained in:
Sergii Pylypenko
2021-07-07 23:11:56 +03:00
parent 0ae8febc37
commit a3b87d43a3
2 changed files with 28 additions and 4 deletions

View File

@@ -162,6 +162,7 @@ bool VideoDriver_SDL_Base::CreateMainWindow(uint w, uint h, uint flags)
y = r.y + std::max(0, r.h - static_cast<int>(h)) / 4; // decent desktops have taskbars at the bottom
}
SDL_SetHint(SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT, "#canvas");
char caption[50];
seprintf(caption, lastof(caption), "OpenTTD %s", _openttd_revision);
this->sdl_window = SDL_CreateWindow(