From a59e03e1e74f5b11b1d3eee1c42973d7a1da2f48 Mon Sep 17 00:00:00 2001 From: moonpower Date: Thu, 25 Dec 2025 00:11:45 +0300 Subject: [PATCH] Examples: enhance sdl2 surface --- examples/example_sdl2_surface/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/example_sdl2_surface/main.cpp b/examples/example_sdl2_surface/main.cpp index e2e935d23..966660f59 100644 --- a/examples/example_sdl2_surface/main.cpp +++ b/examples/example_sdl2_surface/main.cpp @@ -41,10 +41,12 @@ int main(int, char**) IMGUI_CHECKVERSION(); ImGui::CreateContext(); ImGuiIO& io = ImGui::GetIO(); (void)io; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; ImGui::StyleColorsDark(); - ImGui_ImplSDL2_InitForSDLRenderer(window, nullptr); + ImGui_ImplSDL2_SetGamepadMode(ImGui_ImplSDL2_GamepadMode_AutoFirst, nullptr, 0); ImGui_ImplSDLSurface2_Init(framebuffer); bool show_demo_window = true;