From b2d3ded6f4af0ed25f2f1b71070219aa91b0c8b5 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Tue, 5 Aug 2025 08:30:24 -0400 Subject: [PATCH] style(sonar): fix cpp:S1110 (#4130) --- src/platform/windows/audio.cpp | 8 ++++---- src/platform/windows/input.cpp | 4 ++-- src/process.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/platform/windows/audio.cpp b/src/platform/windows/audio.cpp index e92688e5..94863409 100644 --- a/src/platform/windows/audio.cpp +++ b/src/platform/windows/audio.cpp @@ -172,19 +172,19 @@ namespace { std::to_string(waveformat.Format.nSamplesPerSec) + " "; switch (waveformat.dwChannelMask) { - case (waveformat_mask_stereo): + case waveformat_mask_stereo: result += "2.0"; break; - case (waveformat_mask_surround51_with_backspeakers): + case waveformat_mask_surround51_with_backspeakers: result += "5.1"; break; - case (waveformat_mask_surround51_with_sidespeakers): + case waveformat_mask_surround51_with_sidespeakers: result += "5.1 (sidespeakers)"; break; - case (waveformat_mask_surround71): + case waveformat_mask_surround71: result += "7.1"; break; diff --git a/src/platform/windows/input.cpp b/src/platform/windows/input.cpp index da552e27..68bca308 100644 --- a/src/platform/windows/input.cpp +++ b/src/platform/windows/input.cpp @@ -1598,8 +1598,8 @@ namespace platf { uint16_t y = touch.y * 943; uint8_t touchData[] = { (uint8_t) (x & 0xFF), // Low 8 bits of X - (uint8_t) (((x >> 8) & 0x0F) | ((y & 0x0F) << 4)), // High 4 bits of X and low 4 bits of Y - (uint8_t) (((y >> 4) & 0xFF)) // High 8 bits of Y + (uint8_t) ((x >> 8 & 0x0F) | (y & 0x0F) << 4), // High 4 bits of X and low 4 bits of Y + (uint8_t) (y >> 4 & 0xFF) // High 8 bits of Y }; report.sCurrentTouch.bPacketCounter++; diff --git a/src/process.cpp b/src/process.cpp index c009fda3..fb123470 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -158,7 +158,7 @@ namespace proc { _env["SUNSHINE_CLIENT_GCMAP"] = std::to_string(launch_session->gcmap); _env["SUNSHINE_CLIENT_HOST_AUDIO"] = launch_session->host_audio ? "true" : "false"; _env["SUNSHINE_CLIENT_ENABLE_SOPS"] = launch_session->enable_sops ? "true" : "false"; - int channelCount = launch_session->surround_info & (65535); + int channelCount = launch_session->surround_info & 65535; switch (channelCount) { case 2: _env["SUNSHINE_CLIENT_AUDIO_CONFIGURATION"] = "2.0";