Improved the minimum form sizes for multiple forms to stop them looking bad.
Updated the DisplayMagician and DisplayMagicianShared assembly versions to v2.1.2.0 in preparation for release as the next version of DisplayMagician.
This version adds USB device support, and SuperDisplay detection (it is a way to use an Android Tablet as another windows display).
Also fixes cloned displays so that it uses the path priority rather than relying on HDR settings for mapping the cloned display ID to the real Display ID. This corrects some errors which occurred when some earlier screens didn't support HDR or the advanced Windows colour settings. It will now work in those situations.
Now supports multiple display adapters. Has been tested by @matthex with his 7 screens and 2 display adapters and works. Should fix#60 finally.
Also changed the way that cloned display configurations are patched. Was using the HDR structure previously as that contains a direct mapping, but of course it completely breaks if HDR information isn't supported by the monitor, or provided over the connection technology used. So the changes I made now use the display path priority order to figure out which cloned monitor belongs to which item.
Firstly, the UID's are pulled from the physical displays so that we have a list of them. We then go through the paths, and for each target we check if there is a matching physical UID. If there is NOT a matching physical ID, then it is a cloned display target. We store that for later.
Next, we go through the paths again, and we figure out which physical displays are NOT in use as display targets. When we have that list, we then map the left over physical displays to the cloned displays in path priority order.
Finally, we then go through each cloned display target in the paths array, and set it to the configuration that windows needs so it will make a cloned display. We also go through the modes array, and set the physical display id to the corresponding mapped physical UID we calculated earlier.
All of this results in Windows accepting the cloned display configuration as expected.
This corrects some errors with the WinLibrary and how it handles cloned displays.
Also removed the 0.5 second delay between the end of the NVIDIALibrary call, and the start of the WinLibrary one, because they do not appear to be needed based on the NVIDIALibrary testing we've been doing with NVIDIAInfo.
Also corrected some log entries and comments.
I *think* that NVIDIA Surround and AMD Eyefinity changes are so great that WinLibrary gets confused and gives up. NVIDIA Surround and AMD Eyefinity affects the windows display layout so much. This change adds a windows config refresh after the NVIDIA or AMD config is applied to make sure that the winLibrary calls are using the latest updated active config that results from the NVIDIALibrary and AMDLibrary config changes.
This version of WinLibrary improves handling of multiple display adapters to cope with multiple displays across multiple display adapters. Hopefully fixes#60 (but no guarantees yet)
This code will only register and deregister the app if this isn't an installed version of displaymagician. It won't do this if this is run for the installed version of DisplayMagician.
Added Cancel button to shortcut library form to allow people to cancel the monitoring from either a Windows Toast or from the shortcut library form itself. All works now!
Disabled the Process Impersonation logic as it was causing issues with an mscorlib.dll CTD. Have disabled as it's not strictily necessary, and it means that the games all work!
The DisplayMagician profile name is now shown when the user hovers over the system tray icon. Implements #61 for @whitestar127.
Also added some try/catch statements in the SteamLibrary IsRunning functions just-in-case :).
This was WAY harder than it needed to be, as the loading window runs in a separate thread. It does a bit of trickery to get it to work reliably, but now it works ok. I really should be factoring the work into a background thread rather than running it in the UI thread, but that's something I'll revisit when I rebuild it under .net 6.0 and MAUI.
Finally tested the process launching, and finally managed to get it working! THis has been quite a lot of problems to get right, so pretty happy it's all working.
Tried to remove the unneeded bits of the ProcessUtils module, and to streamline the process monitoring process to make it sane, and have code only live in one place. I also wanted to make use of the TryExecute_Impersonated if possible. I hope I've done that all today!
The previous launching process just didn't work! It's the last outstanding thing I've got to sort out, so trying a new process launching method as used within MediaPortal project.