Skip to content

Commit

Permalink
Fix compilation on 32-bit targets
Browse files Browse the repository at this point in the history
  • Loading branch information
maroider committed Jul 10, 2021
1 parent ab48b56 commit b12b1b5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/platform_impl/windows/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,9 +637,7 @@ fn insert_event_target_window_data<T>(
};
let input_ptr = Box::into_raw(Box::new(userdata));

unsafe {
winuser::SetWindowLongPtrW(thread_msg_target, winuser::GWL_USERDATA, input_ptr as isize)
};
unsafe { winuser::SetWindowLongPtrW(thread_msg_target, winuser::GWL_USERDATA, input_ptr as _) };

tx
}
Expand Down Expand Up @@ -776,7 +774,7 @@ pub(super) unsafe extern "system" fn public_window_callback<T: 'static>(
if let Some((win, userdata)) = runner.catch_unwind(|| (initdata.post_init)(window)) {
initdata.window = Some(win);
let userdata = Box::into_raw(Box::new(userdata));
winuser::SetWindowLongPtrW(window, winuser::GWL_USERDATA, userdata as LONG_PTR);
winuser::SetWindowLongPtrW(window, winuser::GWL_USERDATA, userdata as _);
userdata
} else {
return -1;
Expand Down

0 comments on commit b12b1b5

Please sign in to comment.