Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/lib/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ use std::fmt;
use std::libc::*;
use std::ptr;
use std::str;
use std::vec;
use std::vec_ng::Vec;
use std::vec::Vec;
use std::slice;
use semver::Version;

pub mod ffi;
Expand Down Expand Up @@ -355,7 +355,7 @@ impl Monitor {
unsafe {
let mut count = 0;
let ptr = ffi::glfwGetMonitors(&mut count);
vec::from_buf(ptr, count as uint).map(|&m| Monitor { ptr: m })
slice::from_buf(ptr, count as uint).map(|&m| Monitor { ptr: m })
}
}

Expand Down Expand Up @@ -396,7 +396,7 @@ impl Monitor {
unsafe {
let mut count = 0;
let ptr = ffi::glfwGetVideoModes(self.ptr, &mut count);
vec::from_buf(ptr, count as uint).map(VidMode::from_glfw_vid_mode)
slice::from_buf(ptr, count as uint).map(VidMode::from_glfw_vid_mode)
}
}

Expand All @@ -417,9 +417,9 @@ impl Monitor {
unsafe {
let llramp = *ffi::glfwGetGammaRamp(self.ptr);
GammaRamp {
red: vec::from_buf(llramp.red, llramp.size as uint),
green: vec::from_buf(llramp.green, llramp.size as uint),
blue: vec::from_buf(llramp.blue, llramp.size as uint),
red: slice::from_buf(llramp.red, llramp.size as uint),
green: slice::from_buf(llramp.green, llramp.size as uint),
blue: slice::from_buf(llramp.blue, llramp.size as uint),
}
}
}
Expand Down Expand Up @@ -1236,7 +1236,7 @@ impl Joystick {
unsafe {
let mut count = 0;
let ptr = ffi::glfwGetJoystickAxes(*self as c_int, &mut count);
vec::from_buf(ptr, count as uint).map(|&a| a as f32)
slice::from_buf(ptr, count as uint).map(|&a| a as f32)
}
}

Expand All @@ -1245,7 +1245,7 @@ impl Joystick {
unsafe {
let mut count = 0;
let ptr = ffi::glfwGetJoystickButtons(*self as c_int, &mut count);
vec::from_buf(ptr, count as uint).map(|&b| b as c_int)
slice::from_buf(ptr, count as uint).map(|&b| b as c_int)
}
}

Expand Down