projects
/
mandelwow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix benchmarks for latest glium/glutin API
[mandelwow.git]
/
timer.rs
diff --git
a/timer.rs
b/timer.rs
index 9f4abe0fa85ce830642c4a3f2e942f420a792375..93458388961fc272201867377c5357033cf2b947 100644
(file)
--- a/
timer.rs
+++ b/
timer.rs
@@
-4,7
+4,7
@@
use std::time::{Duration, Instant};
use rust_rocket;
#[cfg(feature = "editor")]
use rust_rocket;
#[cfg(feature = "editor")]
-type Rocket = rust_rocket::
Rocke
t;
+type Rocket = rust_rocket::
client::RocketClien
t;
#[cfg(not(feature = "editor"))]
type Rocket = ();
#[cfg(not(feature = "editor"))]
type Rocket = ();
@@
-100,17
+100,19
@@
impl Timer {
#[cfg(feature = "editor")]
fn poll_rocket(&mut self) {
#[cfg(feature = "editor")]
fn poll_rocket(&mut self) {
+ use rust_rocket::client::Event;
+
match self.rocket {
Some(ref mut rocket) => {
let current_row = (self.t * BPS) as u32;
match self.rocket {
Some(ref mut rocket) => {
let current_row = (self.t * BPS) as u32;
- if let Some(event) = rocket.poll_events() {
+ if let Some(event) = rocket.poll_events()
.unwrap()
{
match event {
match event {
-
rust_rocket::
Event::SetRow(row) => {
+ Event::SetRow(row) => {
println!("SetRow (row: {:?})", row);
self.t = row as f32 / BPS;
}
println!("SetRow (row: {:?})", row);
self.t = row as f32 / BPS;
}
-
rust_rocket::
Event::Pause(_) => {
- let track1 = rocket.get_track_mut("test");
+ Event::Pause(_) => {
+ let track1 = rocket.get_track_mut("test")
.unwrap()
;
println!("Pause (value: {:?}) (row: {:?})", track1.get_value(current_row as f32), current_row);
}
_ => (),
println!("Pause (value: {:?}) (row: {:?})", track1.get_value(current_row as f32), current_row);
}
_ => (),