mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
commit
760f9d5fc5
|
@ -11,12 +11,7 @@ mod support;
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
android_start!(main);
|
android_start!(main);
|
||||||
|
|
||||||
#[cfg(not(feature = "window"))]
|
fn main() {
|
||||||
fn main() { println!("This example requires glutin to be compiled with the `window` feature"); }
|
|
||||||
|
|
||||||
#[cfg(feature = "window")]
|
|
||||||
fn main() {
|
|
||||||
|
|
||||||
let window = glutin::WindowBuilder::new().build().unwrap();
|
let window = glutin::WindowBuilder::new().build().unwrap();
|
||||||
window.set_title("A fantastic window!");
|
window.set_title("A fantastic window!");
|
||||||
unsafe { window.make_current() };
|
unsafe { window.make_current() };
|
||||||
|
|
|
@ -11,10 +11,6 @@ mod support;
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
android_start!(main);
|
android_start!(main);
|
||||||
|
|
||||||
#[cfg(not(feature = "window"))]
|
|
||||||
fn main() { println!("This example requires glutin to be compiled with the `window` feature"); }
|
|
||||||
|
|
||||||
#[cfg(feature = "window")]
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// enumerating monitors
|
// enumerating monitors
|
||||||
let monitor = {
|
let monitor = {
|
||||||
|
|
|
@ -11,10 +11,6 @@ mod support;
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
android_start!(main);
|
android_start!(main);
|
||||||
|
|
||||||
#[cfg(not(feature = "window"))]
|
|
||||||
fn main() { println!("This example requires glutin to be compiled with the `window` feature"); }
|
|
||||||
|
|
||||||
#[cfg(feature = "window")]
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let window = glutin::WindowBuilder::new().build().unwrap();
|
let window = glutin::WindowBuilder::new().build().unwrap();
|
||||||
window.set_title("glutin - Cursor grabbing test");
|
window.set_title("glutin - Cursor grabbing test");
|
||||||
|
|
|
@ -11,10 +11,6 @@ mod support;
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
android_start!(main);
|
android_start!(main);
|
||||||
|
|
||||||
#[cfg(not(feature = "window"))]
|
|
||||||
fn main() { println!("This example requires glutin to be compiled with the `window` feature"); }
|
|
||||||
|
|
||||||
#[cfg(feature = "window")]
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let window1 = glutin::WindowBuilder::new().build().unwrap();
|
let window1 = glutin::WindowBuilder::new().build().unwrap();
|
||||||
let window2 = glutin::WindowBuilder::new().build().unwrap();
|
let window2 = glutin::WindowBuilder::new().build().unwrap();
|
||||||
|
@ -37,7 +33,6 @@ fn main() {
|
||||||
let _ = t3.join();
|
let _ = t3.join();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "window")]
|
|
||||||
fn run(window: glutin::Window, color: (f32, f32, f32, f32)) {
|
fn run(window: glutin::Window, color: (f32, f32, f32, f32)) {
|
||||||
let _ = unsafe { window.make_current() };
|
let _ = unsafe { window.make_current() };
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#![cfg(feature = "window")]
|
|
||||||
|
|
||||||
use std::ffi::CStr;
|
use std::ffi::CStr;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
|
@ -9,15 +9,10 @@ mod support;
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
android_start!(main);
|
android_start!(main);
|
||||||
|
|
||||||
#[cfg(not(feature = "window"))]
|
|
||||||
fn main() { println!("This example requires glutin to be compiled with the `window` feature"); }
|
|
||||||
|
|
||||||
#[cfg(feature = "window")]
|
|
||||||
fn resize_callback(width: u32, height: u32) {
|
fn resize_callback(width: u32, height: u32) {
|
||||||
println!("Window resized to {}x{}", width, height);
|
println!("Window resized to {}x{}", width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "window")]
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut window = glutin::WindowBuilder::new().with_decorations(false)
|
let mut window = glutin::WindowBuilder::new().with_decorations(false)
|
||||||
.with_transparency(true)
|
.with_transparency(true)
|
||||||
|
|
|
@ -9,15 +9,10 @@ mod support;
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
android_start!(main);
|
android_start!(main);
|
||||||
|
|
||||||
#[cfg(not(feature = "window"))]
|
|
||||||
fn main() { println!("This example requires glutin to be compiled with the `window` feature"); }
|
|
||||||
|
|
||||||
#[cfg(feature = "window")]
|
|
||||||
fn resize_callback(width: u32, height: u32) {
|
fn resize_callback(width: u32, height: u32) {
|
||||||
println!("Window resized to {}x{}", width, height);
|
println!("Window resized to {}x{}", width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "window")]
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut window = glutin::WindowBuilder::new().build().unwrap();
|
let mut window = glutin::WindowBuilder::new().build().unwrap();
|
||||||
window.set_title("A fantastic window!");
|
window.set_title("A fantastic window!");
|
||||||
|
|
Loading…
Reference in a new issue