Skip to content

Conversation

@Wumpf
Copy link
Contributor

@Wumpf Wumpf commented Dec 14, 2024

..and make windows' hwnd a non-option, removing lots of 'unwrap'.

I think I actually broke the hinstance in a previous PR! Turns out that GetWindowLongPtrW(raw_hwnd, GWLP_HINSTANCE) always returned null. So instead, I make now sure to use the same hinstance that was used when creating the window in the rist place.

I noticed this when trying to use wgpu with a Vulkan backend on windows which requires a valid hinstance. I didn't notice so far because wgpu always fell back to OpenGL because it (correctly) couldn't create a surface for Vulkan. But now when disabling OpenGL that error of course bubbled up.

..and make windows' hwnd a non-option, removing lots of 'unwrap'
@emoon emoon merged commit 70a984f into emoon:master Dec 14, 2024
4 checks passed
@emoon
Copy link
Owner

emoon commented Dec 14, 2024

Nice! Yeah, this looks much clear. Thanks for the cleanup :)

@Wumpf Wumpf deleted the windows-hinstance branch December 14, 2024 14:48
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