1
0
Fork 0

Fix Windows build

This commit is contained in:
Billy Messenger 2020-09-11 10:44:05 -05:00
parent 83f2ffd27a
commit 9efade9a18

View file

@ -77,10 +77,13 @@ unsafe extern "system" fn wnd_proc<H: WindowHandler>(
WM_MOUSEMOVE => {
let x = (lparam & 0xFFFF) as i32;
let y = ((lparam >> 16) & 0xFFFF) as i32;
window_state
.borrow_mut()
.handler
.on_event(&mut window, Event::CursorMotion(x, y));
window_state.borrow_mut().handler.on_event(
&mut window,
Event::Mouse(MouseEvent::CursorMoved {
x: x as i32,
y: y as i32,
}),
);
return 0;
}
WM_TIMER => {
@ -94,7 +97,7 @@ unsafe extern "system" fn wnd_proc<H: WindowHandler>(
window_state
.borrow_mut()
.handler
.on_event(&mut window, Event::WillClose);
.on_event(&mut window, Event::Window(WindowEvent::WillClose));
return DefWindowProcA(hwnd, msg, wparam, lparam);
}
_ => {}