a modern tui library written in zig

tty(windows): fix mouse wheel direction calculation

authored by neurocyte.flow-control.dev and committed by rockorager.dev 3a0392c2 36696e87

Changed files
+4 -4
src
windows
+4 -4
src/windows/Tty.zig
··· 291 291 // High word of dwButtonState represents mouse wheel. Positive is wheel_up, negative 292 292 // is wheel_down 293 293 // Low word represents button state 294 - const mouse_wheel_direction: i32 = blk: { 295 - const wheelu64: u64 = event.dwButtonState >> 16; 296 - const wheelu32: u32 = @truncate(wheelu64); 297 - break :blk @bitCast(wheelu32); 294 + const mouse_wheel_direction: i16 = blk: { 295 + const wheelu32: u32 = event.dwButtonState >> 16; 296 + const wheelu16: u16 = @truncate(wheelu32); 297 + break :blk @bitCast(wheelu16); 298 298 }; 299 299 300 300 const buttons: u16 = @truncate(event.dwButtonState);