mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Update for rustc
This commit is contained in:
parent
47ccf46c9b
commit
77df8e52bc
|
@ -1,6 +1,3 @@
|
||||||
extern crate native;
|
|
||||||
|
|
||||||
use self::native::NativeTaskBuilder;
|
|
||||||
use std::task::TaskBuilder;
|
use std::task::TaskBuilder;
|
||||||
use std::sync::atomic::AtomicBool;
|
use std::sync::atomic::AtomicBool;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
@ -32,7 +29,7 @@ pub fn new_window(builder_dimensions: Option<(uint, uint)>, builder_title: Strin
|
||||||
// GetMessage must be called in the same thread as CreateWindow,
|
// GetMessage must be called in the same thread as CreateWindow,
|
||||||
// so we create a new thread dedicated to this window.
|
// so we create a new thread dedicated to this window.
|
||||||
// This is the only safe method. Using `nosend` wouldn't work for non-native runtime.
|
// This is the only safe method. Using `nosend` wouldn't work for non-native runtime.
|
||||||
TaskBuilder::new().native().spawn(proc() {
|
spawn(proc() {
|
||||||
// registering the window class
|
// registering the window class
|
||||||
let class_name = {
|
let class_name = {
|
||||||
let class_name: Vec<u16> = "Window Class".utf16_units().chain(Some(0).into_iter())
|
let class_name: Vec<u16> = "Window Class".utf16_units().chain(Some(0).into_iter())
|
||||||
|
|
Loading…
Reference in a new issue