-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Closed
Labels

Description
Version/Branch of Dear ImGui:
Version 1.91, Branch: master
Back-ends:
imgui_impl_sdl3.cpp
Compiler, OS:
Linux + GCC
Full config/build information:
No response
Details:
imgui_impl_sdl3.cpp throws errors on build
Hello, first time posting and learning SDL3 alongside ImGui.
Upon adding imgui_impl_sdl3.cpp to my project and running cmake build, I was shown the following error:
- imgui/backends/imgui_impl_sdl3.cpp:642:55: error: invalid conversion from ‘const SDL_JoystickID*’ {aka ‘const unsigned int*’} to ‘SDL_JoystickID*’ {aka ‘unsigned int*’}
- SDL_JoystickID* sdl_gamepads = SDL_GetGamepads(&sdl_gamepads_count); const SDL_JoystickID* {aka const unsigned int*}
I added 'const' within the file, which seemed to fix it but I was greeted with another error:
- imgui/backends/imgui_impl_sdl3.cpp:650:18: error: invalid conversion from ‘const void*’ to ‘void*’
- SDL_free(sdl_gamepads); const void*
I don't know how to fix that and have made the assumptions that the file may contain more issues after one has been fixed. So, I decided to write this issue.
I hope it helps!
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response