diff options
| author | tomaka <pierre.krieger1708@gmail.com> | 2014-12-23 17:18:08 +0100 | 
|---|---|---|
| committer | tomaka <pierre.krieger1708@gmail.com> | 2014-12-23 17:18:08 +0100 | 
| commit | 6b0dd62681829308017fe9a435502df6b97f08af (patch) | |
| tree | cde58df17d65dc6a950a8e61bd5fdd9743484770 /examples | |
| parent | 1ec98f611b8877a20700e2a9eea68d0d7c02e115 (diff) | |
| parent | dbb82968baf17acdc341303813ecbbd8420de19c (diff) | |
| download | glutin-6b0dd62681829308017fe9a435502df6b97f08af.tar.gz glutin-6b0dd62681829308017fe9a435502df6b97f08af.zip  | |
Merge pull request #170 from tomaka/update-rustc
Update for rustc
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/multiwindow.rs | 12 | ||||
| -rw-r--r-- | examples/window.rs | 2 | 
2 files changed, 10 insertions, 4 deletions
diff --git a/examples/multiwindow.rs b/examples/multiwindow.rs index 5fe9b71..1f390cd 100644 --- a/examples/multiwindow.rs +++ b/examples/multiwindow.rs @@ -6,6 +6,8 @@ extern crate android_glue;  extern crate glutin; +use std::thread::Thread; +  mod support;  #[cfg(target_os = "android")] @@ -20,17 +22,21 @@ fn main() {      let window2 = glutin::Window::new().unwrap();      let window3 = glutin::Window::new().unwrap(); -    spawn(move || { +    let t1 = Thread::spawn(move || {          run(window1, (0.0, 1.0, 0.0, 1.0));      }); -    spawn(move || { +    let t2 = Thread::spawn(move || {          run(window2, (0.0, 0.0, 1.0, 1.0));      }); -    spawn(move || { +    let t3 = Thread::spawn(move || {          run(window3, (1.0, 0.0, 0.0, 1.0));      }); + +    t1.join(); +    t2.join(); +    t3.join();  }  #[cfg(feature = "window")] diff --git a/examples/window.rs b/examples/window.rs index 400aa84..910d6e6 100644 --- a/examples/window.rs +++ b/examples/window.rs @@ -23,7 +23,7 @@ fn resize_callback(width: uint, height: uint) {  fn main() {      let mut window = glutin::Window::new().unwrap();      window.set_title("A fantastic window!"); -    window.set_window_resize_callback(Some(resize_callback)); +    window.set_window_resize_callback(Some(resize_callback as fn(uint, uint)));      unsafe { window.make_current() };      let context = support::load(&window);  | 
