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