Commit Graph

58 Commits

Author SHA1 Message Date
Terry MacDonald
cf1ff873ef Added patch to convert v2.0.1 displaySource to list
This should help avoid a crash to desktop when using cloned displays. Partially fixes #47
2021-10-16 16:45:49 +13:00
Terry MacDonald
e41279d706 Improved NVIDIALIbrary SetActiveOverride function
It now only applies configuration changes if they are needed to be applied. If the colour settings are the same then they aren't applied.
2021-10-09 19:58:22 +13:00
Terry MacDonald
c5b06988dd Fixed broken apply profile logic
Changed an AND to a NAND and now it works.
2021-10-09 18:42:50 +13:00
Terry MacDonald
8d060edf83 Updated ProfileItem so it applies overrides later
Updated the profile so that it applies the new split video application process properly to DisplayMagician profiles. Should fix #45 (we shall soon see).
2021-10-07 21:15:14 +13:00
Terry MacDonald
e0bb774fde First fully working AMD Eyefinity implementation.
AMD Eyefinity now works just as well as the NVIDIA implementation... probably even more robustly than the NVIDIA one. Fixes #37 and #21. I'll now start on some other bugfixing and features in preparation for DisplayMagician v2.0.0
2021-09-21 21:21:10 +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
67bb58ae57 Fixed exception during transition to Mosaic
Issue when creating screens structure while NVIDIA setup is still partway through its changeover as it causes an exception. Now capture that exception and ignore it, as the screens structure is updated correctly when the screen finally settles down.
2021-09-09 19:55:24 +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
fef3dbf1e0 Part 2 of the move to a single ProfileItem
Mostly works now! Only bit still needing work is the Avtive profile detection to detect the non-surround profile when we return from surround. I think it's to do with the windows display number changing :(. I need to check that.
2021-09-07 22:08:54 +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
0c32b206c0 Potential fix for libraryfolders.vdf change
This (hopefully) should fix #38. Big thanks to @DragRedSim for their help. This will attempt to use the new library file liocation if it's available, and will fall back to the older config.vdf discovery mechanism if it doesn't find the new file.
2021-09-05 22:16:16 +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
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
eef92abebf Fixed DisplayProfile ImageListView
I'd managed to break the Display Profile imagelistview with one of my code clearing escapades, but now I have managed to fix it again!
2021-09-02 15:09:06 +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
9cef45416e First working display background per profile
Added functionality to implement display wallpaper changes with each display profile as per #36 and #10. Tested in Windows 10 ok.
2021-09-02 10:42:26 +12:00
Terry MacDonald
52d2f4f0f6 [WIP] Partially completed NVIDIA spannedScreens
Partway through having the Screens properly populated for the NVIDIA surround screen setups, but have struck an issue with the extra non-surround screens in a combined surround and non-surround screen setup. The additional non-surround screens don't have any X & Y positions set within the mosaic config, which means I should really be using the WIndows config details, but there isn't anyway to identify which windows screen path matches which nvidia display ID. THe only way to do this is to start storing the NVIDIA displayconfig too.
2021-09-01 14:30:33 +12:00
Terry MacDonald
b374850bfe Merged develop branch to simplify development 2021-08-30 12:35:52 +12:00
Terry MacDonald
93c85d7d87 [WIP] Adding wallpaper manipulation 2021-08-27 22:26:12 +12:00
Terry MacDonald
cf0a15acdd Add initial wallpaper changing code 2021-08-27 21:15:53 +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
b65c1572bd Working spanned screen bitmap drawing
This is the initial version of the spanned screen bitmap drawing. It woks by showing one giant screen, but it currently doesn't insert any information about the individual screens that make up the spanned screen at all. I'm going to add that improvement at a later date, because the main thing is to get the new libraries up and running, and used by people.
2021-08-24 21:49:18 +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
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
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
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
Terry MacDonald
2096322cf0 Make EDID detection robust
Modified EDID detection to make it more
robust and to report what went wrong in
the logs in more detail. Aids in #16
2021-05-19 21:32:49 +12:00
Terry MacDonald
4ec7829a43 Made the shortcut images more reliable
Also added a ton of trace logging to be
able to fix issues remotely.
2021-05-02 22:05:25 +12:00
Terry MacDonald
e9f401960e [WIP] Still moving to NHotkey 2021-04-28 22:14:54 +12:00
Terry MacDonald
023a1a8862 [WIP] Shortcut and Profile hotkey UI
Completed the Shortcut and Display Profile
hotkey UI interface to a satisfactory level.
The hotkey settings are stored with the
profile JSON for profiles, and with the
shortcut JSON for shortcuts. This means
they load correctly and are remembered
between runs of DisplayMagician.

Next step is to actually register the Hotkeys
so they work, and then allow them to be
replaced or removed when they are changed.
2021-04-25 21:13:25 +12:00
Terry MacDonald
40dd147388 Fixed Display Driver change impacts
NVIDIA just updated their device driver, and
as part of those changes, it changed the name
that was reported by the NVIDIA driver. This
impacts our profile matching, as we previously
used the name that it returned in the fingerprint
we store about connected displays. This change
removes that name so that it will correctly match
on the old driver or the new driver.

NOTE: This requires recreating the profiles though!
2021-04-04 18:59:38 +12:00
Terry MacDonald
e913640751 Separated profile equals from possible
This change was to separate 'Equals'
(which checks for exactly the same) with
'Possible' (which checks that the connected
displays are available to use. Should make
the profile comparison a lot more accurate.
2021-03-27 16:15:17 +13:00
Terry MacDonald
846001548e Fixed Profile matching again
This time adjusted profile matching
so that it will work no matter what order
the displayidentifiers or paths are stored
in. Should be a bit slower but a lot more
reliable.
2021-03-26 23:55:35 +13:00
Terry MacDonald
1b6cc7967d Fixed Profile matching for Surround
Fixed the Profile.Equals logic so that it
could detect the difference between
Surround and non-Surround triple screen
configurations. Now seems to work fine.

Also adjusted the ProfileAdapter so that
the profile imagelistview works correctly.
Moved to using the UUID rather than the
name to allow users to change the name
without affecting the UUID. That was a
change I should have made AGES ago.
2021-03-26 22:57:05 +13:00
Terry MacDonald
11cd923e46 Changed profile matching logic
Relaxed the profile matching logic to
use my looser displayidentifier logic
as it is more likely that connections to
a display is changed rather thant the
display paths, resolution or anything like
that. Will use this as an experiment to
see if it works or not.

Also fixed the shortcut renaming errors
by searching for the UUID, not the shortcut
name which is the pretty much the way
I should have done it in the first place!
2021-03-26 21:54:45 +13:00
Terry MacDonald
4531a0d4d5 [WIP] Partially working shortcut detection
Fixed the profile validitiy detection on load,
but now have issue with the shortcut detection
2021-03-07 17:11:46 +13:00
Terry MacDonald
1588cd6a0b Added Save to Desktop Profile Button
Added a button to save a profile shortcut
to the Windows desktop. This will enable
people to quickly change to another display
configuration if they want to using a desktop
display. This will work even if they are unable
to get admin rights to install the background
popup menu.
2021-03-07 14:50:52 +13:00