Commit Graph

80 Commits

Author SHA1 Message Date
Terry MacDonald
6e82557ec6 Removed some uneeded variables from AMDLibrary 2022-06-02 20:18:02 +12:00
Terry MacDonald
340387dcc4 Updated WinLibrary, NVIDIALibrary and AMDLIbrary to latest versions
Updated video libraries to v1.7.5
2022-05-31 09:02:18 +12:00
Terry MacDonald
f40640ccbd Updated UpdateActiveConfig 2022-05-29 21:16:55 +12:00
Terry MacDonald
567c9b7af2 Reduced the displayid calls for profile comparison 2022-05-29 21:01:08 +12:00
Terry MacDonald
87f62aa322 Made display changes reliable 2022-02-12 09:18:03 +13:00
Terry MacDonald
963b267158 Move SkippedConnectionTypes earlier to stop error 2022-02-10 09:02:17 +13:00
Terry MacDonald
4f64537d89 Update AMDLibrary and WinLibrary to skip HDR if connector doesn't support it
This works for WinLibrary and *should* work for AMDLibrary, but I don't have an AMD video card to test it with :(.
2022-02-06 15:33:15 +13:00
Terry MacDonald
d4494aa699 Updated NVIDIA, AMD and Windows Video libraries
Updated with enhancements to make application of colour more robust, and to avoid a Windows CCD display validation issue.
2021-11-13 15:06:54 +13:00
Terry MacDonald
1ef9e5b818 Made some changes to allow more statuses as ok
Added all of the OK ADL statuses to be considered as successful. Should minimise the chances of things going wrong if there is a little issue like the display driver being busy, or if the display is fine but needs to wait for the next modeset.
2021-10-30 20:43:47 +13:00
Terry MacDonald
b44bc3f269 Updated incorrect error message 2021-10-29 22:36:12 +13:00
Terry MacDonald
1faa8ecc5b Updated AMDLibrary and WinLibrary to latest versions
AMDLibrary had an error that caused issues due to a missing call to get a valid default config. WinLibrary had an issue where it wasn't applying the GDIDisplaySettings correctly after a reboot. This has now been fixed.
2021-10-25 15:19:02 +13:00
Terry MacDonald
e321893876 Updated WinLibrary, AMDLibrary and NVIDIALibrary to v1.2.1
This integrates all the library enhancements that I've been working on for the last 2 weeks into DisplayMagician. This fixes $47, #46 and possibly others.
2021-10-24 21:06:59 +13:00
Terry MacDonald
a824f06b33 Updated DM will latest video libraries
Brought over all the latest working code from NVIDIAInfo, AMDInfo and CCDInfo. This includes the new split between the NVIDIA and AMD specific layout, and the NVIDIA and AMD specific color application, so that the video application logic goes like this:
1. Apply NVIDIA Surround or AMD Eyefinity and any 'pre' windows settings
2. Apply the Windows Display Layout
3. Apply the NVIDIA or AMD 'post' windows settings e.g. driver specific color overrides

This new process works.
2021-10-07 21:08:10 +13:00
Terry MacDonald
b6de9aa85f Partial fix for OriginLibrary v3.x
Note - doesn't work with Origin v2.1 files yet... still troubleshooting those!
2021-10-04 22:40:32 +13:00
Terry MacDonald
5aa100802b Fixed AMDLibrary null default config
This would stop DisplayMagician from loading if left in there.
2021-09-22 21:11:09 +12:00
Terry MacDonald
5a1960720a Updated AMDInfo to final working version
WIth @scowling incredible help I managed to get the AMDLibrary to work, even if the user removes the Eyefinity configuration. AMDLibrary is now clever enough to automatically recreate the SLSMap even if the user has deleted it! This is a great robustness improvement, and will help reduce my support calls greatly!
2021-09-21 20:13:39 +12:00
Terry MacDonald
cbdc810606 Updated AMDLibrary from AMDInfo
Made some improvements to SetActiveConfig from AMDInfo testing, so ported them back into DisplayMagician.
2021-09-20 18:41:25 +12:00
Terry MacDonald
cd71725617 [WIP] Fixed error loading JSON after save
There was a problem with the unused display config containing null values on save, which meant that the JSON would be invalid when loaded in the next time. The fix was to ensure that both NVIDIA and AMD both were filled with a default config when a new profiles was created. This means that the real config would overwrite whichever config was needed, and the JSON file would work as all objects were populated correctly!
2021-09-19 20:56:58 +12:00
Terry MacDonald
1591fd534e Upgraded AMDLibrary to v1.0.0
This is the first actual working version of the AMDLibrary from AMDInfo v1.0.0. This is the first time that all 3 different video libraries are in DisplayMagician and working (mostly). The AMD Screens structu creation logic in ProfileItem still needs to be updated to cope with the AMD Eyefinity configuration, but it at least defaults to the windows one at the moment so it doesn't crash (whew).

Also managed to bugfix the recent libraryfolder.vdf parsing change that a recent Steam Library change oforced on us. The logic wasn't working, and so the parsing didn't work, which in turn caused an exception when it came time to look up the game shortcut validity.
2021-09-18 21:55:43 +12:00
Terry MacDonald
28a8f131b3 Workaround Windows changing display source order
Windows changes the display source order which mucks up the equality matching in DM. This change attempts to mitigate that fact.

There were also errors in the HDR settings captured, which indicate that the HDR changes weren't finishing before they were being recorded. This change attempts to take care of that too.

All tests so far seem to work, so lets see how things go!
2021-09-08 20:04:37 +12:00
Terry MacDonald
f8e9eecf81 Removed derived ProfileItem classes
The derived ProfilteItem classes were an unnecessary distraction and wasted time I could be spending on other things. This set of changes are the first part of removing those derived classes and moving to a single ProfilItem class again, but with different configuration slots within it. Makes equality comparison SO MUCH EASIER!
2021-09-07 21:26:42 +12:00
Terry MacDonald
c59f236524 Still vainly trying to get Equals to work
I am a lot closer at the moment, but there is some bit of logic matching that is escaping me. I think I'm just too tired at the moment, and I need a sleep. I bet this will seem simple in the morning.
2021-09-06 22:08:22 +12:00
Terry MacDonald
7c21c19056 Fixed Profile Matching
Found an underlying problem of using the OutputID for displayIdentifier matching as the outputID changes after each reboot. CHanged the DisplayIdentifier to record the type of the connection to the display, which stays the same even if the OututID changes. Also made the ProfileItem.Equals look for DisplayIdentifier ids and match them even if they are in a different order. This seems to happen some times, and I'm not sure why the NVIDIA driver does it!
2021-09-05 21:00:36 +12:00
Terry MacDonald
a07e4ad3f5 Corrected an incorrect logging message clarification
It was set to Error instead of Trace! Corrected now.

Also corrected some incorrect log message descriptions that will mean I look at the right code when I see the errors. There were all the same (as I copied a lot of the code).
2021-09-04 21:27:40 +12:00
Terry MacDonald
708acd3c12 Fixed CompareTo and some Profile Repository loading order 2021-09-04 20:58:08 +12:00
Terry MacDonald
a112326e50 Implemented new derived class equality logic
Used new derived class equality class from https://codinghelmet.com/articles/equals-override which helped me understand the logic for deriving equality between base classes and derived classes. It has now exposed another error in the way FORCED_VIDEO_MODE is being applied and that is now something else I need to fix!
2021-09-04 16:32:42 +12:00
Terry MacDonald
7772b27f89 Fixed error in comparison function 2021-09-02 14:52:46 +12:00
Terry MacDonald
cab056b7fd Updated the Equality and Comparable operators for ProfileItems
And in doing so, managed to break the Profile image logic!
2021-09-02 14:44:35 +12:00
Terry MacDonald
e2ca69e404 First working new NVIDIA library build!
Amazing! This is the first working version of DisplayMagician using the new NVIDIA and Windows CCD library. It works properly, and now I can start to tidy up some of the additioanl functionality I need to sort out before a release. I also then need to work on the AMD library as well!
2021-08-24 22:46:32 +12:00
Terry MacDonald
90c13c7426 Working profile comparisons 2021-08-24 20:37:32 +12:00
Terry MacDonald
5aad5003ac [WIP] First working save and load
Still have an issue where the 'Equals' doesn't detect that there is a different primary screen, so it won't let me save a new profile for the slightly changed display settings.
2021-08-22 21:57:29 +12:00
Terry MacDonald
ddbd6431c5 [WIP] Mostly working NVIDIAProfileItem
NVIDIA Profiles can be created, JSON file saved ok, and the bitmaps and icons are drawn correctly and showin in the Display Profile window. The problem comes when the DisplayProfiles_2.0.json file is loaded. JsonConvert causes an exception trying to populate ProfileBitmap, and I can't figure out why!
2021-08-22 21:45:51 +12:00
Terry MacDonald
508f3751b9 Fixed AMDProfileItem and WindProfileItem
DisplayMagician starts, but displayprofile form doesn't work at all.
2021-08-22 18:58:08 +12:00
Terry MacDonald
998293621e [WIP] Almost ready to test new libs 2021-08-22 16:49:38 +12:00
Terry MacDonald
40b8525dd8 [WIP] Added video card detection
Added ability for ProfileRepository to know what mode it is in when DisplayMagician starts.
2021-08-22 15:42:12 +12:00
Terry MacDonald
01ffda8428 [WIP] Graphic library integration part 1 2021-08-22 12:54:39 +12:00
Terry MacDonald
4d1f074f42 Initial NVIDIA, AMD and CCD Integration
Putting the current libraries into DisplaayMagician so I can work on the logic.
2021-08-21 21:46:36 +12:00
Terry MacDonald
0123e061e0 [WIP] initial library integration into DM
Have almost integrated the new CCD, AMD and NVIDIA
libraries into DIsplayMagician. The CCD library is working
fine. The AMD library is partially completed, but is awaiting
some help from AMD, as it appears one of their driver functions
is broken (or at least incorrectly documented). The NVIDIA
library is currently still under development, but I've still copied
it across so that I could work on the additional profile objects
that need to be prepared in order for this to work.

As I am waiting on a response from AMD, the plan is now that
I will swap over to an NVIDIA based video card in my test machines
and I will start work on the NVIDIA library. The NVIDIA library seems
straight forward compared to AMD, so that hopefully won't take too
long to do. Once that library is compete, I'll test it within NVIDIAInfo
application until its working, and then I'll port it back over to
DisplayMagician. That will then let me complete the last bits of the
integration so that I can complete the last of the NVIDIA tests.
Hopefully by the time all this happens I will have heard back from
AMD and I will be able to continue work with that section of code.
2021-07-24 16:05:38 +12:00
Terry MacDonald
86375b06aa Added initial CCD library code
Added some basic CCD library functionality
to be able to set Windows displays directly
from the code. This will enable future native
HDR support through windows, as well as
allow positioning and screen setup to work
better through here than via the AMD driver.

Will still need to work on AMD Eyefinity support
once this is completed.
2021-06-29 22:15:57 +12:00
Terry MacDonald
600bb39ec6 Added PossibleAddAndRemove function 2021-06-27 20:57:46 +12:00
Terry MacDonald
33bf28149e Added many DisplayConfigMap functions
Added most of the ADL2 DisplayConfigMap
functions to the ADL library in order to test
them out ans see which ones make sense to
use.
2021-06-27 20:46:32 +12:00
Terry MacDonald
2285da1844 [WIP] Initial apply AMD profile scaffolding
Have now got it so that an AMD DisplayProfile
now results in the profile attempting to be applied.
2021-06-27 15:10:59 +12:00
Terry MacDonald
a715e50fe5 Fixing AMDProfile.IsPossible 2021-06-27 14:44:10 +12:00
Terry MacDonald
04a0b56b59 [WIP] Basic working DisplayProfile writing and reading
Now have the DisplayProfile storing the minimal set of
data that it needs. It also recreates the Screens list (used
for creating profile bitmaps and icons) and recreates the
DisplayProfileBitmaps each time at present. I will add some
logic to deerialise the bitmaps again at a later date once
I've compeleted actually applying the AMD display confs.
2021-06-27 13:53:00 +12:00
Terry MacDonald
240c69fcdb [WIP] Adjusted DisplayView size
Now works with single screens and similar
so that they show correctly on the page without
being hidden by foreground stuff. Still might
make the DisplayView larger if it makes sense.
2021-06-26 22:18:41 +12:00
Terry MacDonald
99d43bc245 [WIP] Initial working AMD displayview
Have managed to get a working displayview
for AMD (not working in spanned mode) and
currently playing with the colours and layout.
Once I have something locked in, I'll troubleshoot
the ProfileDisplay file writing.
2021-06-26 21:54:11 +12:00
Terry MacDonald
6a3068fb32 [WIP] Connecting AMDProfile to screens
Trying to figure out a video card agnostic way
of generating the display icons fo both standard
and spanned displays. Still trying to figure out
exactly which AMD ADL calls I need to make to
get all the information I need. It is NOT very well
documented. It's actually really annoying! AMD
need to do better.
2021-06-25 21:52:02 +12:00
Terry MacDonald
5cb0984637 [WIP] Partial profile image restructure
Trying to make the DisplayView and ProfileIcon
image drawing logic more generic so that it will
work with NVIDIA, AMD , Intel and Windows video
card drivers. Having to reverse engineer the amazing
wok that Soroush did with this stuff. I just know that
I'm going to break this before I fix it, but I really think
this is needed in order for this new video card
separation refactoring to work. This is going to take a
while I feel!
2021-06-24 22:14:39 +12:00
Terry MacDonald
ac5d51bb12 [WIP] Initial ProfileItem split into libraries
This is part of the new strategy to split the
ProfileItems into different derived clases with
one per Video card technology. The purpose is
to allow each video card driver to produce a
slightly different profiledata section which is
customised to the needs of that video card.

This will allieviate the need for us to extend
the Path object to support AMD, as we'll be
doing the differentiation at each ProfileItem.
Time will tell if this is a better strategy or not.

This is all to do with my even longer term
strategy of devloping video card driver library
files inhouse. This strategy was directly created
just so that I can make changes in my own code
if I need to support some additional features
such as HDR support within the profiles. It is very
difficult to do this if I'm using another video card
library. Much more simple to update my own code!
2021-06-22 21:05:24 +12:00
Terry MacDonald
3ec33def99 [WIP] saving a copy for later 2021-06-22 19:44:50 +12:00