Commit Graph

82 Commits

Author SHA1 Message Date
Terry MacDonald
90149e1d9d Merged develop into feature-taskbar-setting branch 2022-01-25 09:30:23 +13:00
Terry MacDonald
918e3cda04 Initial working TaskBar position changes
Note - doesn't work n Windows 11.
2022-01-23 10:33:14 +13:00
Terry MacDonald
f860b91a72 Enforced update to file format v2.2 2022-01-21 20:37:56 +13:00
Terry MacDonald
f5a8a05e63 Removed unused settings 2022-01-21 18:34:31 +13:00
Terry MacDonald
195820bea6 Make load profile function handle later versions of config file
This change makes the ProfileRepository handle loading json config files from later versions of DM without causing an exception. This will mean that you can install later model config files and still have them work ok.
2022-01-21 18:09:04 +13:00
Terry MacDonald
d24b15d37a [WIP] Threading improvements
Found that I was combining Threads and Tasks together...never a good idea. Have moved fully over to a Task based model. Now still having issues with parallelism.
2022-01-10 21:06:02 +13:00
Terry MacDonald
ddd48b577d Changed notification icon handling
Made the code more robust and able to work using the new threaded instances
2022-01-06 09:05:55 +13:00
Terry MacDonald
f72fc6feea Attempted to reduce the number of video card library calls
Found some calls that were bypassing the video library state buffering I'd put in place earlier. This should generally make DisplayMagician faster and minimise the number of log entries written to DisplayMagician.log.
2021-10-31 12:50:57 +13:00
Terry MacDonald
5743cd377b Fixed bug in ApplyingProfile caused by new profile buffering
As I'd changed the profile config to buffer it within the libraries themselves, ApplyProfile wasn't telling the libraries to update their config. Therefore they thought they were still on the original display config, and that meant that ApplyProfile didn't revert the profile after the application had closed. This is now fixed.
2021-10-26 21:19:48 +13:00
Terry MacDonald
6e35825b10 Update ProfileRepository 2021-10-24 21:39:49 +13:00
Terry MacDonald
419969ad5f Changed profile detection
Changed Profiles to use new methods for profiles detection provided by the new video card library updates for NVIDIALibrary, AMDLibrary and WinLibrary. This should make DisplayMagician faster as there is less repetition.
2021-10-24 21:29:53 +13:00
Terry MacDonald
707c43375d Changed DisplayProfile file location to DisplayProfiles_2.1.json
There have been such large changes with v2.1.0 that I've had to move to a new file display profile format again :(. I'm really hopeful this will be the last time, as it seems to cope with all the different display layouts, colour settings, hdr etc.
2021-10-23 15:30:20 +13:00
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
d98372bf39 Patch Profiles that are missing GDI settings
This will ensure that existing display profiles will at least load. Anyone with refresh settings changes or BPC or other device context settings will need to recreate their display profiles.
2021-10-16 09:37:52 +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
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
8bd3d07fa4 Fixed some UI status messages 2021-10-02 16:22:36 +13:00
Terry MacDonald
8b73a51fe3 Added additional checks to library mode matching 2021-09-22 20:37:10 +12:00
Terry MacDonald
c820c9bac4 Fixed incorrect return value from ApplyProfile
Fixes #41. Silly error from previous return value.
2021-09-22 08:22:57 +12:00
Terry MacDonald
21b121199b Fixed ProfileDisplayIdentifier double up
Now ProfileItem loads properly from JSON file, which means that the profile matching works, so DisplayMagician now matches the profile if it's current.
2021-09-19 21:00:47 +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
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
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
65bbd1ab66 Added --force-video-library command line option
This feature will allow users to bypass the automatic driver detection functionality so that they can at least force  the use of the built-in Windows driver if NVIDIA or AMD ever have an issue with their drivers.
2021-09-02 13:47:28 +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
4c8ecc0bf6 Initial completed develop branch merge
Code now compiles, so now it is just some testing to see what is broken!
2021-08-30 12:51:44 +12:00
Terry MacDonald
b374850bfe Merged develop branch to simplify development 2021-08-30 12:35:52 +12:00
Terry MacDonald
cf0a15acdd Add initial wallpaper changing code 2021-08-27 21:15:53 +12:00
Terry MacDonald
012fe76b34 [WIP] Researching broken NVIDIA profile matching 2021-08-27 20:57:02 +12:00
Terry MacDonald
293ca14730 Moved RunProfile to ProfileRepository
It makes WAY more sense here.
2021-08-27 17:53:32 +12:00
Terry MacDonald
ad732d388f Added missing NVAPI Equals tests 2021-08-25 21:45:40 +12:00
Terry MacDonald
90c13c7426 Working profile comparisons 2021-08-24 20:37:32 +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
bd89993770 Removed WindowsDisplayAPI
No longer need WindowsDisplayAPI as I've build a Windows CCD library as part of DisplayMagician itself now.
2021-08-22 15:51:13 +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
7753e26917 Commented code tidy up 2021-08-21 22:14:25 +12:00
Terry MacDonald
a4662bed6c Removed prior graphics libraries to enable new lib integration.
Tweaked some easy to fix integration errors.
2021-08-21 22:09:41 +12:00
Terry MacDonald
224b666bba [WIP] Added NVIDIA in using similar structure as AMD
Still a LOT of integration work still left to do, and of course some work to
use the new libraries as part of the getting and setting the config.
2021-08-21 22:01:23 +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
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
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
d654b80377 [WIP] Part work on new Profile data structs
Moving to a situation where each library has
it's own ProfileData structure which will require
me to break the existing Profile structure.
This will be better once finished, but it could
be a month before I get this rewrite finished :/
2021-06-20 17:13:21 +12:00
Terry MacDonald
4774b9a995 Change Display Profiles to v2.0
We have to do this as we will be moving
to a new video card library-based way of
getting the Display Profiles information.
This is designed to enable me to add new
video card drivers in the future, such as
Intel, in order to support 'combined'
video screens,
2021-06-20 15:20:43 +12:00
Terry MacDonald
484b6d86b4 Renamed ADLWrapper to AMDLibrary
It better reflects the purpose of the class.
2021-06-20 10:45:45 +12:00