aboutsummaryrefslogtreecommitdiffstats
path: root/src/win32
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2015-03-26 19:07:59 +0100
committerPierre Krieger <pierre.krieger1708@gmail.com>2015-03-28 20:17:30 +0100
commit697d42a64f89e7c8e142d6f444eaa2dde3eb421b (patch)
tree64cffb1cbda7e605e5b0c3f4b9c7054e2c8d82d4 /src/win32
parentd7c44b95b04fa3ea25a5e5943148583c862ab025 (diff)
downloadglutin-697d42a64f89e7c8e142d6f444eaa2dde3eb421b.tar.gz
glutin-697d42a64f89e7c8e142d6f444eaa2dde3eb421b.zip
choose_pixel_format now returns a Result
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/init.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/win32/init.rs b/src/win32/init.rs
index 5266ae4..08d54c0 100644
--- a/src/win32/init.rs
+++ b/src/win32/init.rs
@@ -136,7 +136,7 @@ unsafe fn init(title: Vec<u16>, builder: BuilderAttribs<'static>,
// getting the pixel format that we will use and setting it
{
let formats = enumerate_native_pixel_formats(&dummy_window);
- let (id, _) = builder.choose_pixel_format(formats.into_iter().map(|(a, b)| (b, a)));
+ let (id, _) = try!(builder.choose_pixel_format(formats.into_iter().map(|(a, b)| (b, a))));
try!(set_pixel_format(&dummy_window, id));
}
@@ -206,7 +206,7 @@ unsafe fn init(title: Vec<u16>, builder: BuilderAttribs<'static>,
enumerate_native_pixel_formats(&real_window)
};
- let (id, _) = builder.choose_pixel_format(formats.into_iter().map(|(a, b)| (b, a)));
+ let (id, _) = try!(builder.choose_pixel_format(formats.into_iter().map(|(a, b)| (b, a))));
try!(set_pixel_format(&real_window, id));
}