mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Add some error detection
This commit is contained in:
parent
d3e3590b84
commit
cbf07d3190
|
@ -144,7 +144,13 @@ impl Window {
|
||||||
// creating the dummy context
|
// creating the dummy context
|
||||||
let dummy_context =
|
let dummy_context =
|
||||||
ffi::glXCreateContext(display, &visual_infos, ptr::null(), 1);
|
ffi::glXCreateContext(display, &visual_infos, ptr::null(), 1);
|
||||||
ffi::glXMakeCurrent(display, window, dummy_context);
|
if dummy_context.is_null() {
|
||||||
|
return Err(format!("glXCreateContext failed"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ffi::glXMakeCurrent(display, window, dummy_context) == 0 {
|
||||||
|
return Err(format!("glXMakeCurrent with dummy context failed"));
|
||||||
|
}
|
||||||
|
|
||||||
// getting the pointer
|
// getting the pointer
|
||||||
let fn_ptr = {
|
let fn_ptr = {
|
||||||
|
|
Loading…
Reference in a new issue