Skip to content

Commit 5a4c7c2

Browse files
committed
wip
1 parent 256eb5c commit 5a4c7c2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/platform/win/gl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ pub struct GlContextInner {
4444
}
4545

4646
impl GlContextInner {
47-
pub unsafe fn create(window: HWnd, config: GlConfig) -> Result<Self, CreationFailedError> {
48-
let gl_library = LibraryModule::load(s!("opengl32.dll"))?;
47+
pub fn create(window: HWnd, config: GlConfig) -> Result<Self, CreationFailedError> {
48+
let gl_library = unsafe { LibraryModule::load(s!("opengl32.dll"))? };
4949

5050
// Create temporary window and context to load function pointers
5151
let extra = with_dummy_window(|hwnd_tmp| {

src/platform/win/window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ impl WindowImpl for BaseviewWindow {
135135

136136
#[cfg(feature = "opengl")]
137137
if let Some(gl_config) = self.gl_config.clone() {
138-
let gl_context = unsafe { gl::GlContextInner::create(window, gl_config) }
138+
let gl_context = gl::GlContextInner::create(window, gl_config)
139139
.expect("Could not create OpenGL context");
140140

141141
let Ok(()) = self.window_state.gl_context.set(Rc::new(gl_context)) else {

0 commit comments

Comments
 (0)