emoon / rust_minifb

Cross platfrom window and framebuffer crate for Rust
MIT License
1.01k stars 97 forks source link

windows: use c_void from winapi #235

Closed xobs closed 3 years ago

xobs commented 3 years ago

The SelectObject() call accepts a HGDIOBJ which is typecast to a std::os::raw::c_void when building using libstd, and is its own thing when building with std disabled:

winapi/0.3.9/src/winapi/lib.rs.html:

    #[cfg(feature = "std")]
    pub use std::os::raw::c_void;
    #[cfg(not(feature = "std"))]
    pub enum c_void {}

This patch uses the winapi c_void as the typecast as necessary.

emoon commented 3 years ago

Thanks!