Skip to content

Commit cde0fb4

Browse files
committed
InputManager: fix screen flash when active controller changed
not sure why Selectable caused screen flash, button seems to work fine
1 parent 924c206 commit cde0fb4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/input_manager.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -870,17 +870,16 @@ class InputManager
870870

871871
auto* controller = controllers[i];
872872
std::string name = SDL_GetGamepadName(controller);
873-
bool isPrimary = (int)i == primaryControllerIndex;
874873

875-
if (ImGui::Selectable(name.c_str(), isPrimary))
874+
if(ImGui::Button(name.c_str()))
876875
{
877876
primaryControllerIndex = i;
878877
setupGamepad(controller);
879878
}
880879

881880
ImGui::TableNextColumn();
882881

883-
if (isPrimary)
882+
if (int(i) == primaryControllerIndex)
884883
ImGui::Text("Active/Primary");
885884
else
886885
ImGui::Text("Inactive");

0 commit comments

Comments
 (0)