-
Notifications
You must be signed in to change notification settings - Fork 122
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
DEVMODE structure has fields with incorrect types #1325
Comments
Thanks @Skrity, looks like several struct members are incorrectly defined in metadata (DEVMODE_COLOR, DEVMODE_TRUETYPE_OPTION, DEVMODE_COLLATE). Transferring over there! |
Can you clarify what's broken here? Is the struct defined incorrectly? Or is the API for some reason returning the wrong values? @riverar you mentioned some enums but the repro doesn't mention any fields that use these enums. |
@mikebattista At a quick glance, it appears DEVMODE_COLOR, DEVMODE_TRUETYPE_OPTION, DEVMODE_COLLATE are defined as If you don't beat me to it, I can possibly take a look later in the evenings. |
Since you're more familiar with the Rust toolchain, I'll assign to you to make the type changes in enums.json and validate the Rust repro. |
Since this isn't specific to Rust, it would be great if you have some kind of build validation that compared all struct sizes in metadata against MSVC. |
Thanks @Skrity, should see this trickle into the next Rust crate update |
The |
Yes that's a bug. I will fix. |
Windows.Win32.Graphics.Gdi.DEVMODE_DISPLAY_FIXED_OUTPUT added |
Which crate is this about?
windows
Crate version
0.42.0
Summary
When querying display via EnumDisplaySettings(A,W,ExA,ExW) display parameters get inserted into wrong fields. Tested on 2 pcs so far.
Toolchain version/configuration
Default host: x86_64-pc-windows-gnu
rustup home: C:_scoop\persist\rustup.rustup
stable-x86_64-pc-windows-gnu (default)
rustc 1.64.0 (a55dd71d5 2022-09-19)
Reproducible example
Crate manifest
Expected behavior
Result: BOOL(1)
dmBitsPerPel: *
dmPelsWidth: 2560
dmPelsHeight: 1440
dmDisplayFrequency: 165
others
dmSpecVersion: *
dmDriverVersion: *
dmDriverExtra: *
dmLogPixels: *
dmICMMethod: *
Actual behavior
Result: BOOL(1)
dmBitsPerPel: 1440
dmPelsWidth: 0
dmPelsHeight: 165
dmDisplayFrequency: 0
others
dmSpecVersion: 1025
dmDriverVersion: 1025
dmDriverExtra: 0
dmLogPixels: 2560
dmICMMethod: 0
Additional comments
No response
The text was updated successfully, but these errors were encountered: