From 64a82d73c96f84d978e9a8f19f64312ed9886561 Mon Sep 17 00:00:00 2001 From: bcsanches Date: Mon, 17 Jun 2024 22:09:07 -0300 Subject: [PATCH] Backends: SDL3: Update for introduction of SDL_GLContext from void*. (#7701, #7702) --- backends/imgui_impl_sdl3.cpp | 3 ++- docs/CHANGELOG.txt | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/backends/imgui_impl_sdl3.cpp b/backends/imgui_impl_sdl3.cpp index d78a5ea15..1188febb1 100644 --- a/backends/imgui_impl_sdl3.cpp +++ b/backends/imgui_impl_sdl3.cpp @@ -502,6 +502,7 @@ static bool ImGui_ImplSDL3_Init(SDL_Window* window, SDL_Renderer* renderer, void return true; } +// Should technically be a SDL_GLContext but due to typedef it is sane to keep it void* in public interface. bool ImGui_ImplSDL3_InitForOpenGL(SDL_Window* window, void* sdl_gl_context) { return ImGui_ImplSDL3_Init(window, nullptr, sdl_gl_context); @@ -1053,7 +1054,7 @@ static void ImGui_ImplSDL3_InitPlatformInterface(SDL_Window* window, void* sdl_g vd->Window = window; vd->WindowID = SDL_GetWindowID(window); vd->WindowOwned = false; - vd->GLContext = sdl_gl_context; + vd->GLContext = (SDL_GLContext)sdl_gl_context; main_viewport->PlatformUserData = vd; main_viewport->PlatformHandle = vd->Window; } diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index a4181a090..197005357 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -35,6 +35,15 @@ HOW TO UPDATE? and API updates have been a little more frequent lately. They are documented below and in imgui.cpp and should not affect all users. - Please report any issue! +----------------------------------------------------------------------- + VERSION 1.90.9 WIP (In Progress) +----------------------------------------------------------------------- + +Other changes: + +- Backends: SDL3: Update for introduction of SDL_GLContext from void*. (#7701, #7702) + [@bcsanches] + ----------------------------------------------------------------------- VERSION 1.90.8 (Released 2024-06-06) -----------------------------------------------------------------------