diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-02-19 20:33:04 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-02-19 20:33:04 +0100 |
commit | 95d70ce549f776794a89c6c83d1df707b914ab8f (patch) | |
tree | 43fd7839834a25aae0a35f09ec339bf74fbcff5b | |
parent | 72e9c0fc59ba2cef9178a33119d691d74b7f4caf (diff) | |
parent | 1ee6f8fa1ada590c0718b75e387ebb90fa155d63 (diff) | |
download | glutin-95d70ce549f776794a89c6c83d1df707b914ab8f.tar.gz glutin-95d70ce549f776794a89c6c83d1df707b914ab8f.zip |
Merge pull request #283 from tomaka/update-rustc
Update for rustc
-rw-r--r-- | src/win32/init.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/win32/init.rs b/src/win32/init.rs index 90a6035..94e2fa0 100644 --- a/src/win32/init.rs +++ b/src/win32/init.rs @@ -111,7 +111,7 @@ fn init(title: Vec<u16>, builder: BuilderAttribs<'static>, builder_sharelists: O if handle.is_null() { return Err(OsError(format!("CreateWindowEx function failed: {}", - os::error_string(os::errno() as usize)))); + os::error_string(os::errno())))); } handle @@ -122,7 +122,7 @@ fn init(title: Vec<u16>, builder: BuilderAttribs<'static>, builder_sharelists: O let hdc = unsafe { user32::GetDC(dummy_window) }; if hdc.is_null() { let err = Err(OsError(format!("GetDC function failed: {}", - os::error_string(os::errno() as usize)))); + os::error_string(os::errno())))); unsafe { user32::DestroyWindow(dummy_window); } return err; } @@ -139,7 +139,7 @@ fn init(title: Vec<u16>, builder: BuilderAttribs<'static>, builder_sharelists: O mem::size_of::<winapi::PIXELFORMATDESCRIPTOR>() as winapi::UINT, &mut output) } == 0 { let err = Err(OsError(format!("DescribePixelFormat function failed: {}", - os::error_string(os::errno() as usize)))); + os::error_string(os::errno())))); unsafe { user32::DestroyWindow(dummy_window); } return err; } @@ -151,7 +151,7 @@ fn init(title: Vec<u16>, builder: BuilderAttribs<'static>, builder_sharelists: O unsafe { if gdi32::SetPixelFormat(dummy_hdc, 1, &pixel_format) == 0 { let err = Err(OsError(format!("SetPixelFormat function failed: {}", - os::error_string(os::errno() as usize)))); + os::error_string(os::errno())))); user32::DestroyWindow(dummy_window); return err; } @@ -211,7 +211,7 @@ fn init(title: Vec<u16>, builder: BuilderAttribs<'static>, builder_sharelists: O if handle.is_null() { return Err(OsError(format!("CreateWindowEx function failed: {}", - os::error_string(os::errno() as usize)))); + os::error_string(os::errno())))); } handle @@ -222,7 +222,7 @@ fn init(title: Vec<u16>, builder: BuilderAttribs<'static>, builder_sharelists: O let hdc = unsafe { user32::GetDC(real_window) }; if hdc.is_null() { let err = Err(OsError(format!("GetDC function failed: {}", - os::error_string(os::errno() as usize)))); + os::error_string(os::errno())))); unsafe { user32::DestroyWindow(real_window); } return err; } @@ -233,7 +233,7 @@ fn init(title: Vec<u16>, builder: BuilderAttribs<'static>, builder_sharelists: O unsafe { if gdi32::SetPixelFormat(hdc, 1, &pixel_format) == 0 { let err = Err(OsError(format!("SetPixelFormat function failed: {}", - os::error_string(os::errno() as usize)))); + os::error_string(os::errno())))); user32::DestroyWindow(real_window); return err; } @@ -395,7 +395,7 @@ fn create_context(extra: Option<(&gl::wgl_extra::Wgl, &BuilderAttribs<'static>)> if ctxt.is_null() { return Err(OsError(format!("OpenGL context creation failed: {}", - os::error_string(os::errno() as usize)))); + os::error_string(os::errno())))); } Ok(ctxt as winapi::HGLRC) @@ -508,7 +508,7 @@ fn load_opengl32_dll() -> Result<winapi::HMODULE, CreationError> { if lib.is_null() { return Err(OsError(format!("LoadLibrary function failed: {}", - os::error_string(os::errno() as usize)))); + os::error_string(os::errno())))); } Ok(lib) |