mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
commit
118b7d32b4
|
@ -101,7 +101,7 @@ pub fn get_primary_monitor() -> MonitorID {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fail!("Failed to find the primary monitor")
|
panic!("Failed to find the primary monitor")
|
||||||
}
|
}
|
||||||
|
|
||||||
impl MonitorID {
|
impl MonitorID {
|
||||||
|
|
|
@ -510,7 +510,7 @@ impl Window {
|
||||||
pub unsafe fn make_current(&self) {
|
pub unsafe fn make_current(&self) {
|
||||||
let res = ffi::glx::MakeCurrent(self.display, self.window, self.context);
|
let res = ffi::glx::MakeCurrent(self.display, self.window, self.context);
|
||||||
if res == 0 {
|
if res == 0 {
|
||||||
fail!("glx::MakeCurrent failed");
|
panic!("glx::MakeCurrent failed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ pub fn get_available_monitors() -> Vec<MonitorID> {
|
||||||
let nb_monitors = unsafe {
|
let nb_monitors = unsafe {
|
||||||
let display = ffi::XOpenDisplay(ptr::null());
|
let display = ffi::XOpenDisplay(ptr::null());
|
||||||
if display.is_null() {
|
if display.is_null() {
|
||||||
fail!("get_available_monitors failed");
|
panic!("get_available_monitors failed");
|
||||||
}
|
}
|
||||||
let nb_monitors = ffi::XScreenCount(display);
|
let nb_monitors = ffi::XScreenCount(display);
|
||||||
ffi::XCloseDisplay(display);
|
ffi::XCloseDisplay(display);
|
||||||
|
@ -26,7 +26,7 @@ pub fn get_primary_monitor() -> MonitorID {
|
||||||
let primary_monitor = unsafe {
|
let primary_monitor = unsafe {
|
||||||
let display = ffi::XOpenDisplay(ptr::null());
|
let display = ffi::XOpenDisplay(ptr::null());
|
||||||
if display.is_null() {
|
if display.is_null() {
|
||||||
fail!("get_available_monitors failed");
|
panic!("get_available_monitors failed");
|
||||||
}
|
}
|
||||||
let primary_monitor = ffi::XDefaultScreen(display);
|
let primary_monitor = ffi::XDefaultScreen(display);
|
||||||
ffi::XCloseDisplay(display);
|
ffi::XCloseDisplay(display);
|
||||||
|
|
Loading…
Reference in a new issue