Skip to content

Commit

Permalink
chore(wgl): use == false.into() instead of != 0 to match rest of …
Browse files Browse the repository at this point in the history
…file
  • Loading branch information
SK83RJOSH committed Sep 22, 2024
1 parent 16362ec commit 81758df
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions glutin/src/api/wgl/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,11 @@ impl<T: SurfaceTypeTrait> Surface<T> {
WglSurface::Window(..) => None,
WglSurface::PBuffer(hbuf, _) => {
let extra = self.display.inner.wgl_extra.unwrap();

let mut value = 0;
if unsafe { extra.QueryPbufferARB(hbuf, attr as _, &mut value) } != 0 {
Some(value)
} else {
if unsafe { extra.QueryPbufferARB(hbuf, attr as _, &mut value) } == false.into() {
None
} else {
Some(value)
}
},
}
Expand Down

0 comments on commit 81758df

Please sign in to comment.