mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 06:41:31 +11:00
Merge pull request #732 from zkirill/master
Fix this_platform_is_not_supported on OpenBSD.
This commit is contained in:
commit
2638db665a
|
@ -131,3 +131,10 @@ wayland-client = { version = "0.5.4", features = ["egl", "dlopen"] }
|
||||||
wayland-kbd = "0.3.3"
|
wayland-kbd = "0.3.3"
|
||||||
wayland-window = "0.2.2"
|
wayland-window = "0.2.2"
|
||||||
x11-dl = "~2.3"
|
x11-dl = "~2.3"
|
||||||
|
|
||||||
|
[target.x86_64-unknown-openbsd.dependencies]
|
||||||
|
osmesa-sys = "0.0.5"
|
||||||
|
wayland-client = { version = "0.5.4", features = ["egl", "dlopen"] }
|
||||||
|
wayland-kbd = "0.3.3"
|
||||||
|
wayland-window = "0.2.2"
|
||||||
|
x11-dl = "~2.3"
|
||||||
|
|
2
build.rs
2
build.rs
|
@ -63,7 +63,7 @@ fn main() {
|
||||||
"1.5", "core", &mut file).unwrap();
|
"1.5", "core", &mut file).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
if target.contains("linux") || target.contains("dragonfly") || target.contains("freebsd") {
|
if target.contains("linux") || target.contains("dragonfly") || target.contains("freebsd") || target.contains("openbsd") {
|
||||||
let mut file = File::create(&dest.join("glx_bindings.rs")).unwrap();
|
let mut file = File::create(&dest.join("glx_bindings.rs")).unwrap();
|
||||||
gl_generator::generate_bindings(gl_generator::StructGenerator,
|
gl_generator::generate_bindings(gl_generator::StructGenerator,
|
||||||
gl_generator::registry::Ns::Glx,
|
gl_generator::registry::Ns::Glx,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))]
|
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
|
||||||
#![allow(unused_variables, dead_code)]
|
#![allow(unused_variables, dead_code)]
|
||||||
|
|
||||||
use libc;
|
use libc;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))]
|
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
use std::os::raw::{c_void, c_char, c_int};
|
use std::os::raw::{c_void, c_char, c_int};
|
||||||
|
|
|
@ -33,5 +33,5 @@ pub type EGLNativeWindowType = winapi::HWND;
|
||||||
pub type EGLNativeWindowType = *const libc::c_void;
|
pub type EGLNativeWindowType = *const libc::c_void;
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
pub type EGLNativeWindowType = *const libc::c_void;
|
pub type EGLNativeWindowType = *const libc::c_void;
|
||||||
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
|
#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
|
||||||
pub type EGLNativeWindowType = *const libc::c_void;
|
pub type EGLNativeWindowType = *const libc::c_void;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#![cfg(any(target_os = "windows", target_os = "linux", target_os = "android",
|
#![cfg(any(target_os = "windows", target_os = "linux", target_os = "android",
|
||||||
target_os = "dragonfly", target_os = "freebsd"))]
|
target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
|
||||||
#![allow(unused_variables)]
|
#![allow(unused_variables)]
|
||||||
|
|
||||||
use ContextError;
|
use ContextError;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))]
|
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
|
||||||
|
|
||||||
use ContextError;
|
use ContextError;
|
||||||
use CreationError;
|
use CreationError;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))]
|
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
|
||||||
|
|
||||||
extern crate osmesa_sys;
|
extern crate osmesa_sys;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))]
|
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
|
||||||
|
|
||||||
pub use self::monitor::{MonitorId, get_available_monitors, get_primary_monitor};
|
pub use self::monitor::{MonitorId, get_available_monitors, get_primary_monitor};
|
||||||
pub use self::window::{PollEventsIterator, WaitEventsIterator, Window, WindowProxy};
|
pub use self::window::{PollEventsIterator, WaitEventsIterator, Window, WindowProxy};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))]
|
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
|
||||||
|
|
||||||
pub use self::monitor::{MonitorId, get_available_monitors, get_primary_monitor};
|
pub use self::monitor::{MonitorId, get_available_monitors, get_primary_monitor};
|
||||||
pub use self::window::{Window, XWindow, PollEventsIterator, WaitEventsIterator, Context, WindowProxy};
|
pub use self::window::{Window, XWindow, PollEventsIterator, WaitEventsIterator, Context, WindowProxy};
|
||||||
|
|
|
@ -54,9 +54,9 @@ extern crate cocoa;
|
||||||
extern crate core_foundation;
|
extern crate core_foundation;
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
extern crate core_graphics;
|
extern crate core_graphics;
|
||||||
#[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))]
|
#[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
|
||||||
extern crate x11_dl;
|
extern crate x11_dl;
|
||||||
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly"))]
|
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd"))]
|
||||||
#[macro_use(wayland_env)]
|
#[macro_use(wayland_env)]
|
||||||
extern crate wayland_client;
|
extern crate wayland_client;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))]
|
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
|
||||||
|
|
||||||
use libc;
|
use libc;
|
||||||
use Window;
|
use Window;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))]
|
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
|
||||||
|
|
||||||
use Api;
|
use Api;
|
||||||
use ContextError;
|
use ContextError;
|
||||||
|
|
|
@ -3,7 +3,7 @@ pub use self::platform::*;
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
#[path="windows/mod.rs"]
|
#[path="windows/mod.rs"]
|
||||||
mod platform;
|
mod platform;
|
||||||
#[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))]
|
#[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
|
||||||
#[path="linux/mod.rs"]
|
#[path="linux/mod.rs"]
|
||||||
mod platform;
|
mod platform;
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
|
@ -21,5 +21,5 @@ mod platform;
|
||||||
|
|
||||||
#[cfg(all(not(target_os = "ios"), not(target_os = "windows"), not(target_os = "linux"),
|
#[cfg(all(not(target_os = "ios"), not(target_os = "windows"), not(target_os = "linux"),
|
||||||
not(target_os = "macos"), not(target_os = "android"), not(target_os = "dragonfly"),
|
not(target_os = "macos"), not(target_os = "android"), not(target_os = "dragonfly"),
|
||||||
not(target_os = "freebsd"), not(target_os = "emscripten")))]
|
not(target_os = "freebsd"), not(target_os = "openbsd"), not(target_os = "emscripten")))]
|
||||||
use this_platform_is_not_supported;
|
use this_platform_is_not_supported;
|
||||||
|
|
Loading…
Reference in a new issue