seanchas116 / qtimgui

Qt (QOpenGLWidget / QOpenGLWindow) backend for ImGui
MIT License
375 stars 96 forks source link

backend using io.KeyMap[], io.KeysDown[] should call io.AddKeyEvent() instaed #45

Open kiraYuukiAsuna opened 2 years ago

kiraYuukiAsuna commented 2 years ago

[Problem] According to imgui release v1.87 : 2022/02/29: We discovered a backward-compatibility regression in 18700: Direct legacy reads from io.KeysDown[] won't work with new backends. And in particular io.KeysDown[GetKeyIndex[XXX]) will buffer overflow in old and new backends. You can refer to https://github.com/ocornut/imgui/issues/4921 [Solution] Backend writing to io.KeyMap[], io.KeysDown[] -> backend should call io.AddKeyEvent()