aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--src/win32/init.rs18
2 files changed, 11 insertions, 10 deletions
diff --git a/README.md b/README.md
index 596af94..baaf022 100644
--- a/README.md
+++ b/README.md
@@ -71,7 +71,8 @@ fn main() {
- Some events are not implemented
- Implementation is still work-in-progress
- Vsync not implemented
- - Changing the cursor (set_cursor) is not implemented
+ - Changing the cursor (set_cursor) is not implemented
+
### Win32
- You must call `glFlush` before `swap_buffers`, or else on Windows 8 nothing will be visible on the window
diff --git a/src/win32/init.rs b/src/win32/init.rs
index 8a91214..246a6b7 100644
--- a/src/win32/init.rs
+++ b/src/win32/init.rs
@@ -114,7 +114,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
@@ -125,7 +125,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;
}
@@ -142,7 +142,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;
}
@@ -154,7 +154,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;
}
@@ -214,7 +214,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
@@ -225,7 +225,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;
}
@@ -236,7 +236,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;
}
@@ -407,7 +407,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)
@@ -520,7 +520,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)