mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
eefa361773
There was an error that occurred in NvAPI_SetDisplayConfig when attempting to go from an NVIDIA Surround to a non-NVIDIA Surround setup on a machine that has multiple video cards installed in it. This is due to the fact that the NVIDIA driver only sees the displays connected to NVIDIA video adapters. The previous DM logic tried to set the DisplayConfig after switching to or from a Surround display profile, but this would fail when returning from a a Surround display profile on Win 10 devices. It appears that the NVIDIA driver AUTOMATICALLY disables all additional displays in windows when it returns from a Surround profile. This simple fact means that the DisplayConfig won't be applied properly, and it errors with an NVAPI_INVALID_ARGUMENT error. This doesn't actually matter though, as the WinLibrary comes to the rescue. WinLibrary can see all the video adapters available, and so will turn the required displays back on and set them up just right! We *may* lose are some specific DisplayConfig parameters abeing set as part of this process, but I'm not totally sure about that as WinLibrary is basically feature parity with the DisplayConfig settings as far as I can tell. The fix is to look specifically for the NVAPI_INVALID_ARGUMENT error when attempting to set the NvAPI_DisplayConfig, and if this happens we check if we were going from a surround profile to a non-surround profile. If that is true, then we simply ignore that error. WinLibrary then clears up that problem and everything proceeds as normal. This should (fingers crossed) fix #119! This change also makes it far faster to grab and set the tabaskbar settings from registry, though this logic may not detect some Windows 10 formats which appear to be LOCALDISPLAY(\d,\d,\d\d) settings which I've never seen before. It should be generally much faster and more reliable. |
||
---|---|---|
.. | ||
AMD | ||
NVIDIA | ||
Properties | ||
Resources | ||
UserControls | ||
Windows | ||
DisplayMagicianShared.csproj | ||
DisplayMagicianStartupAction.cs | ||
PixelShift.cs | ||
ProfileIcon.cs | ||
ProfileItem.cs | ||
ProfileRepository.cs | ||
ResizeDrawing.cs | ||
RestartManagerSession.cs | ||
Rotation.cs | ||
Scaling.cs | ||
ScanLineOrdering.cs | ||
SharedLogger.cs | ||
ShellHelper.cs | ||
Utils.cs | ||
Wallpaper.cs |