aboutsummaryrefslogtreecommitdiffstats
path: root/src/osx/monitor.rs
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-01-02 09:22:27 +0100
committertomaka <pierre.krieger1708@gmail.com>2015-01-02 09:22:27 +0100
commitebe32bb2d803bc22c4b309acbbd48f3dc2a12127 (patch)
treeb2cc041b67dd54f64c6123981bffbd0201f9620a /src/osx/monitor.rs
parentf68bf85a85ceb416f714bc36ff5aa5c6ae65c008 (diff)
parenta698146943bcd6df2a61bbfd56badf3018662709 (diff)
downloadglutin-ebe32bb2d803bc22c4b309acbbd48f3dc2a12127.tar.gz
glutin-ebe32bb2d803bc22c4b309acbbd48f3dc2a12127.zip
Merge pull request #180 from TyOverby/event-change
Change the way that event iterators are represented.
Diffstat (limited to 'src/osx/monitor.rs')
-rw-r--r--src/osx/monitor.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/osx/monitor.rs b/src/osx/monitor.rs
index 383fd32..3fb1d74 100644
--- a/src/osx/monitor.rs
+++ b/src/osx/monitor.rs
@@ -1,9 +1,10 @@
use core_graphics::display;
+use std::collections::RingBuf;
pub struct MonitorID(u32);
pub fn get_available_monitors() -> Vec<MonitorID> {
- let mut monitors = Vec::new();
+ let mut monitors = RingBuf::new();
unsafe {
let max_displays = 10u32;
let mut active_displays = [0u32, ..10];
@@ -12,7 +13,7 @@ pub fn get_available_monitors() -> Vec<MonitorID> {
&mut active_displays[0],
&mut display_count);
for i in range(0u, display_count as uint) {
- monitors.push(MonitorID(active_displays[i]));
+ monitors.push_back(MonitorID(active_displays[i]));
}
}
monitors