mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 18:43:54 -06:00
Fix negative delta scroll (#19573)
This fixes the sign extension from 16 to 32 bit by casting from the unsigned to the signed type first. Closes #19391 Closes #19484
This commit is contained in:
parent
38d2fdad5f
commit
fb75fb56c0
@ -624,7 +624,7 @@ void IslandWindow::_OnGetMinMaxInfo(const WPARAM /*wParam*/, const LPARAM lParam
|
|||||||
const auto scale = GetCurrentDpiScale();
|
const auto scale = GetCurrentDpiScale();
|
||||||
const winrt::Windows::Foundation::Point real{ relative.x / scale, relative.y / scale };
|
const winrt::Windows::Foundation::Point real{ relative.x / scale, relative.y / scale };
|
||||||
|
|
||||||
winrt::Microsoft::Terminal::Core::Point wheelDelta{ 0, static_cast<int32_t>(HIWORD(wparam)) };
|
winrt::Microsoft::Terminal::Core::Point wheelDelta{ 0, std::bit_cast<int16_t>(HIWORD(wparam)) };
|
||||||
if (message == WM_MOUSEHWHEEL)
|
if (message == WM_MOUSEHWHEEL)
|
||||||
{
|
{
|
||||||
std::swap(wheelDelta.X, wheelDelta.Y);
|
std::swap(wheelDelta.X, wheelDelta.Y);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user