mirror of
https://github.com/italicsjenga/rust_minifb.git
synced 2024-12-23 11:21:30 +11:00
parent
f92e38a181
commit
b48e531e8d
|
@ -207,6 +207,12 @@ unsafe extern "system" fn wnd_proc(
|
|||
let mut wnd: &mut Window = mem::transmute(user_data);
|
||||
|
||||
match msg {
|
||||
winuser::WM_SYSCOMMAND => {
|
||||
if wparam == winuser::SC_KEYMENU {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
winuser::WM_MOUSEWHEEL => {
|
||||
let scroll = ((((wparam as u32) >> 16) & 0xffff) as i16) as f32 * 0.1;
|
||||
wnd.mouse.scroll = scroll;
|
||||
|
@ -224,6 +230,11 @@ unsafe extern "system" fn wnd_proc(
|
|||
return 0;
|
||||
}
|
||||
|
||||
winuser::WM_SYSKEYDOWN => {
|
||||
update_key_state(wnd, (lparam as u32) >> 16, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
winuser::WM_CHAR => {
|
||||
char_down(wnd, wparam as u32);
|
||||
}
|
||||
|
@ -269,6 +280,11 @@ unsafe extern "system" fn wnd_proc(
|
|||
return 0;
|
||||
}
|
||||
|
||||
winuser::WM_SYSKEYUP => {
|
||||
update_key_state(wnd, (lparam as u32) >> 16, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
winuser::WM_COMMAND => {
|
||||
if lparam == 0 {
|
||||
wnd.accel_key = (wparam & 0xffff) as usize;
|
||||
|
|
Loading…
Reference in a new issue