Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tests/unit/test_linux_consumers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,7 @@ namespace {
const auto deadline = std::chrono::steady_clock::now() + std::chrono::seconds {3};
while (
std::chrono::steady_clock::now() < deadline &&
SDL_GameControllerGetAxis(controller.get(), SDL_CONTROLLER_AXIS_TRIGGERRIGHT) < 16000
) {
SDL_GameControllerGetAxis(controller.get(), SDL_CONTROLLER_AXIS_TRIGGERRIGHT) < 16000) {
SDL_GameControllerUpdate();
pump_sdl_events();
std::this_thread::sleep_for(std::chrono::milliseconds {20});
Expand Down
6 changes: 2 additions & 4 deletions tools/virtualhid_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,7 @@ namespace {
void render_device_panel(const std::vector<DeviceListItem> &devices) {
ImGui::TextUnformatted("Profile");
const auto *choice = current_profile_choice();
if (const auto preview = choice == nullptr ? std::string {"Select profile"} : to_utf8(choice->label);
ImGui::BeginCombo("##profile", preview.c_str())) {
if (const auto preview = choice == nullptr ? std::string {"Select profile"} : to_utf8(choice->label); ImGui::BeginCombo("##profile", preview.c_str())) {
for (std::size_t index = 0; index < profile_choices.size(); ++index) {
const auto label = to_utf8(profile_choices[index].label);
const auto selected = index == profile_index_;
Expand Down Expand Up @@ -549,8 +548,7 @@ namespace {

{
ScopedDisabled disabled {!enabled};
if (const auto state_label = to_utf8(battery_choices[static_cast<std::size_t>(battery_state_index_)].label);
ImGui::BeginCombo("State", state_label.c_str())) {
if (const auto state_label = to_utf8(battery_choices[static_cast<std::size_t>(battery_state_index_)].label); ImGui::BeginCombo("State", state_label.c_str())) {
for (std::size_t index = 0; index < battery_choices.size(); ++index) {
const auto label = to_utf8(battery_choices[index].label);
const auto selected_state = static_cast<int>(index) == battery_state_index_;
Expand Down