diff --git a/tests/tests.cpp b/tests/tests.cpp index 85a023e..e54ff58 100644 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -99,14 +99,14 @@ auto main(int argc, char* argv[]) -> int for (auto const id : input_device_ids) { - auto const info = input_stream.device_info(id); - bool const is_selected = info.name == combo_text; - if (ImGui::Selectable(info.name.c_str(), is_selected)) + auto const info = input_stream.device_info(id); + bool const is_selected2 = info.name == combo_text; + if (ImGui::Selectable(info.name.c_str(), is_selected2)) { input_stream.use_given_device(info); } - if (is_selected) // Set the initial focus when opening the combo (scrolling + keyboard navigation focus) + if (is_selected2) // Set the initial focus when opening the combo (scrolling + keyboard navigation focus) ImGui::SetItemDefaultFocus(); } ImGui::EndCombo();