-
-
Notifications
You must be signed in to change notification settings - Fork 478
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
egl/display: Pass *pointer to* output variable when querying `DEVICE_…
…EXT` By casting a `null_mut()` ptr and passing it directly _by value_ to `QueryDisplayAttribEXT()`, the function ignores writing the output as it didn't receive an address (it received `NULL`) to write the device to. Instead we should take the _pointer address of this `null_mut()` pointer_ and provide that to the function instead so that it can _overwrite_ it with a pointer to the requested `eglDevice`. This is even more clear when allocating a `MaybeUninit` in which the pointer will be returned, which has a convenient `.as_mut_ptr()` member to pass its pointer value directly into `QueryDisplayAttribEXT()`.
- Loading branch information
Showing
2 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters