Skip to content
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

Merged
merged 1 commit into from
Aug 14, 2023
Merged

Update to windows v0.51 #56

merged 1 commit into from
Aug 14, 2023

Conversation

kennykerr
Copy link
Collaborator

No description provided.

@@ -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(),
Copy link
Collaborator Author

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)?;
Copy link
Collaborator Author

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)?;
Copy link
Collaborator Author

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().

@kennykerr kennykerr changed the title Update to window v0.51 Update to windows v0.51 Aug 14, 2023
@robmikh robmikh merged commit 8a8aa8b into master Aug 14, 2023
1 check passed
@robmikh
Copy link
Owner

robmikh commented Aug 14, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants