Skip to content

Commit

Permalink
Address compilation warnings on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
maroider committed May 21, 2021
1 parent 5b2518b commit ff7f07c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions glutin/src/api/egl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ mod make_current_guard;

pub use self::egl::Egl;
use self::make_current_guard::MakeCurrentGuard;
#[cfg(not(target_os = "windows"))]
use crate::Rect;
use crate::{
Api, ContextError, CreationError, GlAttributes, GlRequest, PixelFormat,
PixelFormatRequirements, Rect, ReleaseBehavior, Robustness,
PixelFormatRequirements, ReleaseBehavior, Robustness,
};

use glutin_egl_sys as ffi;
Expand Down Expand Up @@ -612,6 +614,7 @@ impl Context {
}

#[inline]
#[cfg(not(target_os = "windows"))]
pub fn swap_buffers_with_damage(&self, rects: &[Rect]) -> Result<(), ContextError> {
let egl = EGL.as_ref().unwrap();

Expand Down Expand Up @@ -655,6 +658,7 @@ impl Context {
}

#[inline]
#[cfg(not(target_os = "windows"))]
pub fn swap_buffers_with_damage_supported(&self) -> bool {
let egl = EGL.as_ref().unwrap();
egl.SwapBuffersWithDamageKHR.is_loaded()
Expand Down Expand Up @@ -1217,7 +1221,7 @@ where
}
value
}};
};
}

let desc = PixelFormat {
hardware_accelerated: attrib!(egl, display, config_id, ffi::egl::CONFIG_CAVEAT)
Expand Down
2 changes: 1 addition & 1 deletion glutin/src/platform_impl/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ impl Context {
}

#[inline]
pub fn swap_buffers_with_damage(&self, rects: &[Rect]) -> Result<(), ContextError> {
pub fn swap_buffers_with_damage(&self, _rects: &[Rect]) -> Result<(), ContextError> {
Err(ContextError::OsError("buffer damage not suported".to_string()))
}

Expand Down

0 comments on commit ff7f07c

Please sign in to comment.