-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to windows
v0.51
#56
Conversation
@@ -34,7 +34,7 @@ impl Window { | |||
REGISTER_WINDOW_CLASS.call_once(|| { | |||
let class = WNDCLASSW { | |||
hCursor: unsafe { LoadCursorW(None, IDC_ARROW).ok().unwrap() }, | |||
hInstance: instance, | |||
hInstance: instance.into(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Win32 metadata decided to use different types for HINSTANCE
and HMODULE
- I hope to correct this with riddle...
@@ -53,7 +53,7 @@ impl Window { | |||
bottom: height as i32, | |||
}; | |||
unsafe { | |||
AdjustWindowRectEx(&mut rect, window_style, false, window_ex_style).ok()?; | |||
AdjustWindowRectEx(&mut rect, window_style, false, window_ex_style)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function now returns Result
so no need for ok()
.
@@ -161,7 +161,7 @@ impl Window { | |||
fn get_window_size(window_handle: HWND) -> Result<SizeInt32> { | |||
unsafe { | |||
let mut rect = RECT::default(); | |||
GetClientRect(window_handle, &mut rect).ok()?; | |||
GetClientRect(window_handle, &mut rect)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same. This function now returns Result
so no need for ok()
.
Thanks! |
No description provided.