Fix Windows build
This commit is contained in:
parent
83f2ffd27a
commit
9efade9a18
1 changed files with 8 additions and 5 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
|
|
Loading…
Add table
Reference in a new issue