Skip to content

Commit

Permalink
Backends: SDL2: Gamepad handlng: amend bf1c96d. (#3884, #6559, #6890)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Feb 13, 2024
1 parent bf1c96d commit f966da1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion backends/imgui_impl_sdl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,9 @@ void ImGui_ImplSDL2_Shutdown()
SDL_free(bd->ClipboardTextData);
for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++)
SDL_FreeCursor(bd->MouseCursors[cursor_n]);
bd->MouseLastCursor = nullptr;

if (bd->Gamepad && bd->GamepadSelectAuto)
SDL_GameControllerClose(bd->Gamepad);

io.BackendPlatformName = nullptr;
io.BackendPlatformUserData = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Other changes:
- Backends: SDL2: Handle gamepad disconnection + fixed increasing gamepad reference counter
continuously. Added ImGui_ImplSDL2_SelectGamepadAuto()/ImGui_ImplSDL2_SelectGamepadExplicit()
functions to respectively select automatic selection or provide a gamepad to use.
(#3884, #6559, #6890) [@ocornut, @lethal-guitar, @wn2000, @bog-dan-ro]
(#3884, #6559, #6890) [@lethal-guitar, @wn2000, @ocornut, @bog-dan-ro]
- Backends: SDLRenderer3: query newly added SDL_RenderViewportSet() to not restore
a wrong viewport if none was initially set.
- Backends: DirectX9: Using RGBA format when allowed by the driver to avoid CPU side
Expand Down

0 comments on commit f966da1

Please sign in to comment.