mach: Rename scroll -> mouse_scroll and use f32 for offsets

This commit is contained in:
iddev5 2022-06-05 18:11:58 +05:30 committed by Stephen Gutekanst
parent a2a6c2a288
commit efe90fc64f
2 changed files with 6 additions and 6 deletions

View file

@ -256,9 +256,9 @@ pub const Platform = struct {
fn callback(window: glfw.Window, xoffset: f64, yoffset: f64) void {
const pf = (window.getUserPointer(UserPtr) orelse unreachable).platform;
pf.pushEvent(.{
.scroll = .{
.xoffset = xoffset,
.yoffset = yoffset,
.mouse_scroll = .{
.xoffset = @floatCast(f32, xoffset),
.yoffset = @floatCast(f32, yoffset),
},
});
}