mirror of
https://github.com/ocornut/imgui.git
synced 2025-09-20 18:28:26 +00:00
Backends: SDL3: Follow SDL3 removal of keysym field in SDL_KeyboardEvent (#7729)
This commit is contained in:
@@ -326,10 +326,10 @@ bool ImGui_ImplSDL3_ProcessEvent(const SDL_Event* event)
|
|||||||
case SDL_EVENT_KEY_DOWN:
|
case SDL_EVENT_KEY_DOWN:
|
||||||
case SDL_EVENT_KEY_UP:
|
case SDL_EVENT_KEY_UP:
|
||||||
{
|
{
|
||||||
ImGui_ImplSDL3_UpdateKeyModifiers((SDL_Keymod)event->key.keysym.mod);
|
ImGui_ImplSDL3_UpdateKeyModifiers((SDL_Keymod)event->key.mod);
|
||||||
ImGuiKey key = ImGui_ImplSDL3_KeycodeToImGuiKey(event->key.keysym.sym);
|
ImGuiKey key = ImGui_ImplSDL3_KeycodeToImGuiKey(event->key.key);
|
||||||
io.AddKeyEvent(key, (event->type == SDL_EVENT_KEY_DOWN));
|
io.AddKeyEvent(key, (event->type == SDL_EVENT_KEY_DOWN));
|
||||||
io.SetKeyEventNativeData(key, event->key.keysym.sym, event->key.keysym.scancode, event->key.keysym.scancode); // To support legacy indexing (<1.87 user code). Legacy backend uses SDLK_*** as indices to IsKeyXXX() functions.
|
io.SetKeyEventNativeData(key, event->key.key, event->key.scancode, event->key.scancode); // To support legacy indexing (<1.87 user code). Legacy backend uses SDLK_*** as indices to IsKeyXXX() functions.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case SDL_EVENT_WINDOW_MOUSE_ENTER:
|
case SDL_EVENT_WINDOW_MOUSE_ENTER:
|
||||||
|
@@ -83,6 +83,7 @@ Other changes:
|
|||||||
- Examples: GLFW+Vulkan, SDL+Vulkan: handle swap chain resize even without Vulkan
|
- Examples: GLFW+Vulkan, SDL+Vulkan: handle swap chain resize even without Vulkan
|
||||||
returning VK_SUBOPTIMAL_KHR, which doesn't seem to happen on Wayland. (#7671)
|
returning VK_SUBOPTIMAL_KHR, which doesn't seem to happen on Wayland. (#7671)
|
||||||
[@AndreiNego, @ocornut]
|
[@AndreiNego, @ocornut]
|
||||||
|
- Backends: SDL3: Update for API removal of keysym field in SDL_KeyboardEvent. (#7728)
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user