MartinGC94 / DisplayConfig

PowerShell module for configuring Windows display settings
MIT License
45 stars 2 forks source link

The refresh rate argument completer only lists rounded integers #8

Open MartinGC94 opened 2 months ago

MartinGC94 commented 2 months ago

The API I use to get the display settings (EnumDisplaySettingsExW) only returns rounded values. The DirectX APIs supposedly returns a fractional value (see: https://learn.microsoft.com/en-us/windows/win32/api/dxgi/nf-dxgi-idxgioutput-getdisplaymodelist ) however I'm having a hard time understanding how to use the DirectX APIs to get this info.

As a workaround, users can tab complete the nearest value and just use -AllowChanges like this: Set-DisplayRefreshRate 1 59 -AllowChanges to have Windows find and set the nearest valid refresh rate.