File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 21
21
22
22
// CHANGELOG
23
23
// (minor and older changes stripped away, please see git history for details)
24
- // 2024-07-18: Update for SDL3 api changes: SDL_GetClipboardText() string ownership change. (#7801)
24
+ // 2024-07-22: Update for SDL3 api changes: SDL_GetGamepads() memory ownership change. (#7807)
25
+ // 2024-07-18: Update for SDL3 api changes: SDL_GetClipboardText() memory ownership change. (#7801)
25
26
// 2024-07-15: Update for SDL3 api changes: SDL_GetProperty() change to SDL_GetPointerProperty(). (#7794)
26
27
// 2024-07-02: Update for SDL3 api changes: SDLK_x renames and SDLK_KP_x removals (#7761, #7762).
27
28
// 2024-07-01: Update for SDL3 api changes: SDL_SetTextInputRect() changed to SDL_SetTextInputArea().
@@ -639,15 +640,14 @@ static void ImGui_ImplSDL3_UpdateGamepads()
639
640
{
640
641
ImGui_ImplSDL3_CloseGamepads ();
641
642
int sdl_gamepads_count = 0 ;
642
- SDL_JoystickID* sdl_gamepads = SDL_GetGamepads (&sdl_gamepads_count);
643
+ const SDL_JoystickID* sdl_gamepads = SDL_GetGamepads (&sdl_gamepads_count);
643
644
for (int n = 0 ; n < sdl_gamepads_count; n++)
644
645
if (SDL_Gamepad* gamepad = SDL_OpenGamepad (sdl_gamepads[n]))
645
646
{
646
647
bd->Gamepads .push_back (gamepad);
647
648
if (bd->GamepadMode == ImGui_ImplSDL3_GamepadMode_AutoFirst)
648
649
break ;
649
650
}
650
- SDL_free (sdl_gamepads);
651
651
bd->WantUpdateGamepadsList = false ;
652
652
}
653
653
Original file line number Diff line number Diff line change @@ -148,7 +148,8 @@ Other changes:
148
148
struct description data that a real application would want to use.
149
149
- Backends: Win32: Fixed ImGuiMod_Super being mapped to VK_APPS instead of VK_LWIN||VK_RWIN.
150
150
(#7768, #4858, #2622) [@Aemony]
151
- - Backends: SDL3: Update for API changes: SDL_GetClipboardText() string ownership change. (#7801)
151
+ - Backends: SDL3: Update for API changes: SDL_GetGamepads() memory ownership change. (#7807)
152
+ - Backends: SDL3: Update for API changes: SDL_GetClipboardText() memory ownership change. (#7801)
152
153
- Backends: SDL3: Update for API changes: SDLK_x renames and SDLK_KP_x removals (#7761, #7762)
153
154
- Backends: SDL3: Update for API changes: SDL_GetProperty() change to SDL_GetPointerProperty(). (#7794) [@wermipls]
154
155
- Backends: SDL2,SDL3,OSX: Update for io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() rename.
You can’t perform that action at this time.
0 commit comments