Commit Graph

906 Commits

Author SHA1 Message Date
Terry MacDonald
8326b5697f Updated README 2021-12-18 22:28:45 +13:00
Terry MacDonald
11f231a9f1 Merge branch 'develop' 2021-12-18 21:58:12 +13:00
Terry MacDonald
f5018398f4 Made new build. 2021-12-18 21:57:46 +13:00
Terry MacDonald
648bbccaca Tweaked various UI features to support resizing
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.
2021-12-18 21:55:39 +13:00
Terry MacDonald
a54ca31503 Made Display Profile window resizeable 2021-12-18 16:12:43 +13:00
Terry MacDonald
97a4e5f170 Added resizable Shortcut Form 2021-12-18 14:38:00 +13:00
Terry MacDonald
da8d5de7c3 Fixed GUI display across multiple adapters
Found a bug in the NVIDIA screen generation logic. Fixed it, then replicated the fix in AMD and Windows functions.
2021-12-17 12:25:02 +13:00
Terry MacDonald
94e8ffe338 [WIP] Attempt to fix the GUI display for MST DisplayPort connections
Displays daisy-chained via DIsplayPort MST devices aren't shown in the GUI properly. First attempt at a fix.
2021-12-17 11:53:23 +13:00
Terry MacDonald
de1d93ee4d Updated WinLibrary to v1.3.8
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.
2021-12-16 12:25:11 +13:00
Terry MacDonald
22ae2bc178 Fixed multiple adapters and unsupported HDR parsing
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.
2021-12-12 09:23:24 +13:00
Terry MacDonald
9416ac3346 Updated WinLibrary to latest version
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.
2021-12-11 00:15:49 +13:00
Terry MacDonald
a7ef20677d Fixed some log entry names 2021-12-09 08:40:51 +13:00
Terry MacDonald
d546bf85fb Added a WinLibrary update config to refresh config
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.
2021-12-08 21:43:22 +13:00
terrymacdonald
041bdfe74f
Merge pull request #62 from terrymacdonald/dependabot/nuget/develop/NLog-4.7.13
Bump NLog from 4.7.12 to 4.7.13
2021-12-07 18:33:44 +13:00
Terry MacDonald
b34cdcce6c Updated to latest WinLibrary version
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)
2021-12-07 18:33:16 +13:00
dependabot[bot]
b826cc05fc
Bump NLog from 4.7.12 to 4.7.13
Bumps [NLog](https://github.com/NLog/NLog) from 4.7.12 to 4.7.13.
- [Release notes](https://github.com/NLog/NLog/releases)
- [Changelog](https://github.com/NLog/NLog/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/NLog/NLog/compare/v4.7.12...v4.7.13)

---
updated-dependencies:
- dependency-name: NLog
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 08:24:45 +00:00
terrymacdonald
6205ff21c4
Update codeql-analysis.yml 2021-12-04 11:12:26 +13:00
terrymacdonald
690d974911
Update codeql-analysis.yml 2021-12-04 11:10:33 +13:00
terrymacdonald
8c70eb37aa
Update codeql-analysis.yml 2021-12-04 11:04:10 +13:00
terrymacdonald
5f47ea8582
Update codeql-analysis.yml 2021-12-04 11:00:40 +13:00
terrymacdonald
23eaae6d17
Update codeql-analysis.yml 2021-12-04 10:58:35 +13:00
terrymacdonald
be457712a8
Update codeql-analysis.yml 2021-12-04 10:49:06 +13:00
terrymacdonald
942b03ecdc
Update codeql-analysis.yml 2021-12-04 10:42:41 +13:00
Terry MacDonald
a4bfc62c92 Deregister app shortcut if temporary
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.
2021-12-03 12:23:35 +13:00
Terry MacDonald
4c6891ad2a Added cancel button to shortcut library form
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!
2021-12-03 11:19:02 +13:00
Terry MacDonald
e3d85f9e96 Working waiting cancellation by toast 2021-12-03 10:59:52 +13:00
Terry MacDonald
20a7c85279 Updated toast notification to work from zip install
Used some amazing code from David Air at https://gist.github.com/davidair/c4ea207bf6eece4ef08b97ab29a3036f to enable toasts without install from a setup program. This allows me to debug toasts within VS2019.
2021-12-03 10:38:29 +13:00
Terry MacDonald
b200c2bd01 [WIP] Adding cancelling monitoring to the Windows Toast
Added the button. Now need to figure out the logic.
2021-12-03 09:11:45 +13:00
Terry MacDonald
37788855b7 Disabled Process Impersonation and added Profile Name to Tray Icon
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 :).
2021-12-02 22:00:33 +13:00
terrymacdonald
de694d20e3
Update codeql-analysis.yml 2021-12-01 21:51:57 +13:00
Terry MacDonald
03d15fb8e9 Updated ValveKeyValue to latest version
Have had problems in the past uprading to the latest version but this one worked fine!
2021-11-27 14:07:00 +13:00
terrymacdonald
20c04a1f00
Create codeql-analysis.yml 2021-11-26 15:19:31 +13:00
terrymacdonald
958b7b9f55
Update dependabot.yml 2021-11-26 15:18:39 +13:00
terrymacdonald
9c28d4dd20
Update dependabot.yml 2021-11-26 15:11:52 +13:00
terrymacdonald
03f9709e3d
Create Dependabot.yml 2021-11-26 15:10:00 +13:00
Terry MacDonald
24d5014441 Updated to v2.1.1.1 2021-11-23 21:34:15 +13:00
Terry MacDonald
f6be9e04b2 Trying to get process to launch with UAC
Not really much luck at present, so have decided to add this functionality later.
2021-11-23 21:25:58 +13:00
Terry MacDonald
6a9f3abc6d Centered the shortcutform loading window
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.
2021-11-23 21:04:28 +13:00
Terry MacDonald
971a45b2e8 [WIP] Trying to get ShortcutLoadingForm to show centerparent
Still haven't been able to get the loading form to show center parent. Need to try again tomorrow.
2021-11-22 23:13:49 +13:00
Terry MacDonald
f8f2dc89d9 Tweaks to the lessen ShortcutRepository logging
At the moment the logs are just getting too large, so trying to remove some of the less important and repetitive log entries.
2021-11-22 22:53:31 +13:00
Terry MacDonald
67729942a1 Working ProcessUtils
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.
2021-11-22 22:51:07 +13:00
Terry MacDonald
fdb4fce977 [WIP] ProcessUtils refactor and trim
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!
2021-11-22 21:53:14 +13:00
Terry MacDonald
0d96a9287d [WIP] Partially working process launching
Still need to iron out all the bugs and get it working with launchers etc.
2021-11-21 22:35:14 +13:00
Terry MacDonald
852d42ed6f [WIP] First working process start
Need to add process returning and monitoring so that we're able to handle launcher processes.
2021-11-21 13:25:23 +13:00
Terry MacDonald
cca916c515 [WIP] Adding some exectuable awareness 2021-11-21 13:21:47 +13:00
Terry MacDonald
e4add2570f RunShortcut reliability changes 2021-11-21 13:08:11 +13:00
Terry MacDonald
c9c9fcc8b4 [WIP] Nearly ready to test the new process utils 2021-11-21 10:29:06 +13:00
Terry MacDonald
ba2e0afb71 [WIP] Process launching refactor
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.
2021-11-21 10:17:15 +13:00
Terry MacDonald
10d387d53b Fixed bug with startprograms UI not clearing 2021-11-20 21:38:26 +13:00
Terry MacDonald
5b15dd367e Make available updates hide the loading page 2021-11-20 11:56:25 +13:00