mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
Merge pull request #190 from tomaka/update-rustc
Update for rust alpha 1.0
This commit is contained in:
commit
f72b09bcb7
|
@ -1,13 +1,10 @@
|
||||||
install:
|
install:
|
||||||
- ps: Start-FileDownload 'https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-gnu.exe'
|
- ps: Start-FileDownload 'https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-gnu.exe'
|
||||||
- ps: Start-FileDownload 'https://static.rust-lang.org/cargo-dist/cargo-nightly-i686-pc-windows-gnu.tar.gz'
|
|
||||||
- rust-nightly-i686-pc-windows-gnu.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
|
- rust-nightly-i686-pc-windows-gnu.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
|
||||||
- 7z e cargo-nightly-i686-pc-windows-gnu.tar.gz
|
|
||||||
- 7z x cargo-nightly-i686-pc-windows-gnu.tar
|
|
||||||
- SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
|
- SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
|
||||||
- SET PATH=%PATH%;%CD%\cargo-nightly-i686-pc-windows-gnu\bin
|
|
||||||
- rustc -V
|
- rustc -V
|
||||||
- cargo -V
|
- cargo -V
|
||||||
|
- git submodule update --init --recursive
|
||||||
|
|
||||||
build: false
|
build: false
|
||||||
|
|
||||||
|
|
1
deps/apk-builder
vendored
1
deps/apk-builder
vendored
|
@ -1 +0,0 @@
|
||||||
Subproject commit fe9acb5bd465da1df4561e2bd4ebcc6d305134a4
|
|
|
@ -19,7 +19,7 @@ fn main() {
|
||||||
// enumerating monitors
|
// enumerating monitors
|
||||||
let monitor = {
|
let monitor = {
|
||||||
for (num, monitor) in glutin::get_available_monitors().enumerate() {
|
for (num, monitor) in glutin::get_available_monitors().enumerate() {
|
||||||
println!("Monitor #{}: {}", num, monitor.get_name());
|
println!("Monitor #{}: {:?}", num, monitor.get_name());
|
||||||
}
|
}
|
||||||
|
|
||||||
print!("Please write the number of the monitor to use: ");
|
print!("Please write the number of the monitor to use: ");
|
||||||
|
@ -27,7 +27,7 @@ fn main() {
|
||||||
.expect("Plase enter a number");
|
.expect("Plase enter a number");
|
||||||
let monitor = glutin::get_available_monitors().nth(num).expect("Please enter a valid ID");
|
let monitor = glutin::get_available_monitors().nth(num).expect("Please enter a valid ID");
|
||||||
|
|
||||||
println!("Using {}", monitor.get_name());
|
println!("Using {:?}", monitor.get_name());
|
||||||
|
|
||||||
monitor
|
monitor
|
||||||
};
|
};
|
||||||
|
@ -47,6 +47,6 @@ fn main() {
|
||||||
context.draw_frame((0.0, 1.0, 0.0, 1.0));
|
context.draw_frame((0.0, 1.0, 0.0, 1.0));
|
||||||
window.swap_buffers();
|
window.swap_buffers();
|
||||||
|
|
||||||
println!("{}", window.wait_events().collect::<Vec<glutin::Event>>());
|
println!("{:?}", window.wait_events().collect::<Vec<glutin::Event>>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,15 +20,15 @@ fn main() {
|
||||||
let window2 = glutin::Window::new().unwrap();
|
let window2 = glutin::Window::new().unwrap();
|
||||||
let window3 = glutin::Window::new().unwrap();
|
let window3 = glutin::Window::new().unwrap();
|
||||||
|
|
||||||
let t1 = Thread::spawn(move || {
|
let t1 = Thread::scoped(move || {
|
||||||
run(window1, (0.0, 1.0, 0.0, 1.0));
|
run(window1, (0.0, 1.0, 0.0, 1.0));
|
||||||
});
|
});
|
||||||
|
|
||||||
let t2 = Thread::spawn(move || {
|
let t2 = Thread::scoped(move || {
|
||||||
run(window2, (0.0, 0.0, 1.0, 1.0));
|
run(window2, (0.0, 0.0, 1.0, 1.0));
|
||||||
});
|
});
|
||||||
|
|
||||||
let t3 = Thread::spawn(move || {
|
let t3 = Thread::scoped(move || {
|
||||||
run(window3, (1.0, 0.0, 0.0, 1.0));
|
run(window3, (1.0, 0.0, 0.0, 1.0));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ pub fn load(window: &glutin::Window) -> Context {
|
||||||
|
|
||||||
let version = unsafe {
|
let version = unsafe {
|
||||||
use std::ffi;
|
use std::ffi;
|
||||||
ffi::c_str_to_bytes(&(gl.GetString(gl::VERSION) as *const i8)).to_string()
|
String::from_utf8(ffi::c_str_to_bytes(&(gl.GetString(gl::VERSION) as *const i8)).to_vec()).unwrap()
|
||||||
};
|
};
|
||||||
|
|
||||||
println!("OpenGL version {}", version);
|
println!("OpenGL version {}", version);
|
||||||
|
|
|
@ -30,6 +30,6 @@ fn main() {
|
||||||
context.draw_frame((0.0, 1.0, 0.0, 1.0));
|
context.draw_frame((0.0, 1.0, 0.0, 1.0));
|
||||||
window.swap_buffers();
|
window.swap_buffers();
|
||||||
|
|
||||||
println!("{}", window.wait_events().collect::<Vec<glutin::Event>>());
|
println!("{:?}", window.wait_events().collect::<Vec<glutin::Event>>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -419,7 +419,7 @@ pub fn new_window(builder_dimensions: Option<(uint, uint)>, builder_title: Strin
|
||||||
unsafe { winapi::TranslateMessage(&msg) };
|
unsafe { winapi::TranslateMessage(&msg) };
|
||||||
unsafe { winapi::DispatchMessageW(&msg) }; // calls `callback` (see below)
|
unsafe { winapi::DispatchMessageW(&msg) }; // calls `callback` (see below)
|
||||||
}
|
}
|
||||||
}).detach();
|
});
|
||||||
|
|
||||||
rx.recv().unwrap()
|
rx.recv().unwrap()
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,6 @@ fn main() {
|
||||||
|
|
||||||
assert!(value == (0, 255, 0, 255) || value == (0, 64, 0, 255) ||
|
assert!(value == (0, 255, 0, 255) || value == (0, 64, 0, 255) ||
|
||||||
value == (0, 64, 0, 255) || value == (0, 64, 0, 0),
|
value == (0, 64, 0, 255) || value == (0, 64, 0, 0),
|
||||||
"value is: {}", value);
|
"value is: {:?}", value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue