From a74ea64dd0b6b403454ae3d8f5a817548c38fb93 Mon Sep 17 00:00:00 2001 From: Acclution <42910256+Acclution@users.noreply.github.com> Date: Sun, 17 Nov 2024 17:07:54 +0100 Subject: [PATCH] fixed compile issue with latest sdlgpu3 --- backends/imgui_impl_sdlgpu3.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/imgui_impl_sdlgpu3.cpp b/backends/imgui_impl_sdlgpu3.cpp index 6633bd374..187dfcd11 100644 --- a/backends/imgui_impl_sdlgpu3.cpp +++ b/backends/imgui_impl_sdlgpu3.cpp @@ -154,7 +154,7 @@ static void ImGui_ImplSDLGPU3_CreateShaderModules() { ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData(); - SDL_GPUDriver driver = SDL_GetGPUDriver(bd->Device); + const char* driver = SDL_GetGPUDeviceDriver(bd->Device); if(bd->ShaderModuleVert == nullptr) { SDL_GPUShaderCreateInfo vert_info{}; @@ -162,7 +162,7 @@ static void ImGui_ImplSDLGPU3_CreateShaderModules() vert_info.entrypoint = "main"; vert_info.num_uniform_buffers = 1; // UBO set 1 binding 0 - if(driver == SDL_GPU_DRIVER_VULKAN) + if(strcmp(driver, "vulkan") == 0) { vert_info.code_size = sizeof(__glsl_shader_vert_spv); vert_info.code = (uint8_t*)__glsl_shader_vert_spv; @@ -184,7 +184,7 @@ static void ImGui_ImplSDLGPU3_CreateShaderModules() frag_info.entrypoint = "main"; frag_info.num_samplers = 1; // sTexture set 0 binding 0 - if(driver == SDL_GPU_DRIVER_VULKAN) + if(strcmp(driver, "vulkan") == 0) { frag_info.code_size = sizeof(__glsl_shader_frag_spv); frag_info.code = (uint8_t*)__glsl_shader_frag_spv;