Commit ab6cd30 1 parent 0eba417 commit ab6cd30 Copy full SHA for ab6cd30
File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -657,9 +657,14 @@ fn extension_loader_thread() -> WGLExtensionFunctions {
657
657
assert_ne ! ( window_class_atom, 0 ) ;
658
658
659
659
let mut extension_functions = WGLExtensionFunctions :: default ( ) ;
660
+ // The `lpClassName` parameter of `CreateWindowExA()` takes either
661
+ // a pointer to a null-terminated c string, or an `ATOM` / `u16` encoded
662
+ // in the lower bytes of the pointer type. We do the latter by forcing an
663
+ // `as` cast of the ATOM to the pointer type `LPCSTR`.
664
+ let lpClassName = window_class_atom as LPCSTR ;
660
665
let window = winuser:: CreateWindowExA (
661
666
0 ,
662
- window_class_atom as LPCSTR ,
667
+ lpClassName ,
663
668
window_class_name,
664
669
WS_OVERLAPPEDWINDOW | WS_VISIBLE ,
665
670
0 ,
You can’t perform that action at this time.
0 commit comments