Commit Graph

352 Commits

Author SHA1 Message Date
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
6bd9898ea8 Fixed inconsistent NVIDIA HDR display setting
THere was an unneeded check that prevented the NVIDIA HDR settings being applied when it should have been. This in turn meant that the display profile equality matching wasn't working as the applied display profile was sufficiently different to the one selected and applied that it wouldn't match, and would instead display the brand new profile interface. This has been corrected now.
2021-09-09 09:21:53 +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
1966412162 Mostly working Equality part 3
Equality works until we return from a surround profile to a non-surround profile. At this point the displays are reordered by windows, and the windows display configus don't match any more. Addtionally, it looks as though we need a 0.5 second pause between applying the configuration, and reading the new config. There appears to be a difference between HDR before we changed to the surround proile and after we've returned, and that's not a good thing!
2021-09-08 11:00:00 +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
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
13cc7a96c4 Basic working NVIDIA and Windows DisplayMagician
Tested ok so far! Manages to cope with surround dual screen with another standaalone screen fine, and copes with individual screens as well as just surround screens. Tested playing a game shortcut, and it sworks with that too.  It also changes the display background as per the profile settings as was intended! So pretty much everything seems to work fine so far.

I will do a bit more testing, then will probably provide a test version to a couple of testers to try and find errors. I need to try and make this a bit more robust.
2021-09-04 21:16:49 +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
964d982bd1 Fixed Video mode detection without forced parameter
Accidentally broke the auto detection when no forced video command line option given. Now works again.
2021-09-03 22:15:23 +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
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
ee1d2e4717 Fixed screen drawing for icons and forms
Fixed the NVIDIA screen drawing so that it works fine now.
2021-09-01 22:13:22 +12:00
Terry MacDonald
b6bd89bed2 Updated NVIDIALibrary and WinLibrary based on NVIDIAInfo testing
Added in the ability to map the Windows CCD Display name to NVAPI DisplayId, which will make it possible to use that information within DisplayMagician.
2021-09-01 20:44:00 +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
bc6242a8bb Updated NVIDIALibrary and WinLibrary with latest versions.
Latest versions based on tests from NVIDIAInfo
2021-08-31 21:06:08 +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
1a6282df1a Initial Windows desktop wallpaper functionality
This is the initial windows desktop functionality, and may work. I've added it to the earlier version of DisplayMagician, but I'm not sure I'll release it. This will instead probably be part of v2.0.0.
2021-08-30 12:26:43 +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
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
5eea1f0a95 Fixed NVIDIA profile matching! 2021-08-25 22:00:14 +12:00
Terry MacDonald
ad732d388f Added missing NVAPI Equals tests 2021-08-25 21:45:40 +12:00
Terry MacDonald
f66c841431 Updated csproj file to remove deleted files 2021-08-25 20:27:35 +12:00
Terry MacDonald
be31c3b467 Update csproj file 2021-08-25 20:25:51 +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
0b864f09ca Working JSON display profile load 2021-08-24 20:19:49 +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
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
01ffda8428 [WIP] Graphic library integration part 1 2021-08-22 12:54:39 +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
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
55caba468c Remove unneeded NVIDIA check
Removed the NVIDIA check for the DisplayTarget
device path containing 'UID5120' as this isn't supported
by the Quadro cards.
2021-07-26 19:43:12 +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
c9f2cffe0a [WIP] Saving earlier work
No idea what I did here.
2021-07-24 15:19:24 +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
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
7efd4f0349 Update to v2.0.0 and added functions
Decided that the DisplayProfile changes would
have to be breaking changes if I was going to
add HDR support, and be able to handle adding
future video cards from different manufacturers.
This all requires a change to the DisplayProfile
format. So now this is going to use a file called
DisplayProfiles_2.0.json rather than a file called
DisplayProfiles_1.0.json. This is because the
profiles will need to be generated again from
scratch, as they will all be completely different
to the format in DisplayProfiles_1.0.json.
2021-06-20 16:37:00 +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
Terry MacDonald
d82c49af9f Finally detecting connectable displays
I finally figured out how to check for displays
that are selectable, but aren't in use. It's not
as striaght forward with AMD ASL library as
it is with NVIDIA's driver, thats for sure.

Seem to have fixed the exceptions based on
all the testing I've been doing. So there is at
least that!
2021-06-19 20:39:58 +12:00
Terry MacDonald
108a08688f Fix incorrect marshalling struct 2021-06-19 20:24:29 +12:00
Terry MacDonald
65653df73a Changed marshalling to be more reliable 2021-06-19 20:19:29 +12:00
Terry MacDonald
aaaf0287ac Correcting trace logging name 2021-06-19 19:42:54 +12:00
Terry MacDonald
9065735ad9 Added AMD ADL Exception handling 2021-06-19 19:39:50 +12:00
Terry MacDonald
a01d5defaa Added trace logging to ADLWrapper 2021-06-19 19:31:25 +12:00
Terry MacDonald
76c94c76ae Update version to v1.2.0 2021-06-19 13:38:32 +12:00
Terry MacDonald
48703759bf [WIP] Additional dispId generation tweaks 2021-06-19 13:36:57 +12:00
Terry MacDonald
16c143cffe [WIP] Working nearly DisplayIds
Have now go the required data, but for some
reason AMD is returning two valid adapters
when there is actually just one in the system!

Could be a problem with the device installation,
but I will need figuring out how to either remove
duplicates, or figure out the information to use as
a filter for ignoring one of the adapters.
2021-06-19 13:04:38 +12:00
Terry MacDonald
0808c6b1ba Added additional adapter output 2021-06-19 10:01:04 +12:00
Terry MacDonald
b1e9e6c295 [WIP] Added HDR functions to lib 2021-06-19 09:48:47 +12:00
Terry MacDonald
cf446101dd [WIP] Enough data for the Idenitifier
We now have enough data for me to identify
all the connected display devices, and to
generate a display identifier which will work
no matter if AMD Eyefinity is enabled or not!

This should allow me to generate an display
identifier that will work like the NVIDIA ones.
2021-06-18 21:31:55 +12:00
Terry MacDonald
3feef6f429 [WIP] Additional ADL2 conversions 2021-06-18 18:11:32 +12:00
Terry MacDonald
71550ba9a7 [WIP] Partial move to ADL2
Need to do this to gain access to extra
useful fields that just don't exist in ADL
functions. Example being HDR capabilties.
2021-06-18 18:02:14 +12:00
Terry MacDonald
6d64c1769a [WIP] Partial migration to ADL2
Its the only way to get HDR information :(
2021-06-18 12:33:46 +12:00
Terry MacDonald
3d0cf2542e [WIP] testing ways to get all displays
Trying different ways to get a list of all the connnected
displays via the AMD ADL library. It seems pretty
onerous at the moment, and seems like there is still a
lot of work to go :/. AGS may have been the better
way to go, but ADL at least had a C# example for me
to start with!
2021-06-17 21:40:10 +12:00
Terry MacDonald
854a359807 Fixed correct connector info 2021-06-17 20:10:14 +12:00
Terry MacDonald
b1b0ae26f5 Partially working displayids
It needs to be fixed as it isn't getting
the underlying displays when eyefinity
is turned on. Need to find a way around
that
2021-06-17 18:51:48 +12:00
Terry MacDonald
a39d9cbe01 [WIP] Working adapter and display grabbing
Need to add Display Device info extraction.
Have created consts for the connector types
in c#, but now need to add the logic to decode
the ADLDeviceConfig returned value!
2021-06-16 22:15:15 +12:00
Terry MacDonald
583fffb612 [WIP] Learning about PInvoke
This is a lot of learning about Pinvoke
and the way to marshal c structures
into c# managed structures when passed
as out.

This is all a lot more indepth than I was
hoping it was going to be!
2021-06-15 21:55:15 +12:00
Terry MacDonald
ee7c5fe1da [WIP] Building AMD library functions
There is a long road ahead of me, but
at least some of the structure is working
now! We can at least call the AMD ADL
library and get results returned back!
2021-06-14 21:42:16 +12:00
Terry MacDonald
a8c0307ace [WIP] Working basic adapter detection
Need to begin to put this in the right
places....
2021-06-14 20:37:35 +12:00
Terry MacDonald
f3acb9d292 [WIP] Seemingly basic connectivity working
So much left to do though!
2021-06-13 22:54:19 +12:00
Terry MacDonald
9c00081d7a Updated to v1.2.0 2021-06-13 09:52:30 +12:00
Terry MacDonald
668d01e8a6 [WIP] Partially extended AMD ADL lib 2021-06-13 09:44:36 +12:00
Terry MacDonald
77d67d7ef5 Merge branch 'main' into feature/amd-eyefinity-support 2021-06-10 19:28:24 +12:00
Terry MacDonald
d403f2d0ef Update to v1.1.4 2021-06-08 07:55:52 +12:00
Terry MacDonald
34e4833ba1 [WIP] partial pause 2021-06-08 07:21:36 +12:00
Terry MacDonald
cc1e9307cc [WIP] Added the multiple extern mappings
ADL2_Display_SLSMapConfig_SetState
ADL2_Display_SLSGrid_Caps
ADL2_Display_SLSMapIndexList_Get
ADL2_Display_SLSMapIndex_Get

Have to try and sort out the delegates and
the other bits to match the rest of the
AMD provided library entries.
2021-06-07 21:57:50 +12:00
Terry MacDonald
09e2b19bc3 [WIP] Added initial ADL2_Display_SLSMapConfig_Get()
Tried to add the first SLS map config get function into
the ADL.cs file, as well as all the supporting data
structures. Time will tell whether this will work or not!
2021-06-07 21:41:48 +12:00
Terry MacDonald
dbfaf1f7c8 Initial ADL library import
Using the example ADL.cs from
https://github.com/GPUOpen-LibrariesAndSDKs/display-library/tree/master/Sample-Managed
2021-06-07 17:55:44 +12:00
Terry MacDonald
63410627a6 Update version to v1.1.3 2021-06-07 11:05:29 +12:00
Terry MacDonald
0f294996c1 Refactored stopping start programs
Changed the process stopping logic
to make it more relable, and also make it
much more likely to actually stop the
programs even if they do things like
launch other programs and stop themselves

Added more helpful instructions

Added a link to the Example Start Programs
settings on the wiki by clicking on a button
in the ShortcutForm itself.

Added helpful MessageBox telling people
they need to select a Game Shortcut in order
to run, edit, delete or save it. Also included
text about the mouse right-click menu.

Clarified text on the StartProgramControl.
2021-06-03 21:04:40 +12:00
Terry MacDonald
09bedc9d3a Update version to v1.1.1
Also updating the homepage on
displaymagician.littlebitbig.com.
2021-05-23 10:32:26 +12:00
Terry MacDonald
6565e2f2cc Fixed error when removing unsaved startprograms
The startPrograms UI would error when someone tried
to remove an unsaved startprogram from the FLP.
This has now been resolved.

Also managed to update a warning in the logs when
a program starts and the original exe is a loader that
loads another exe then closes itself. I've provided that
warning in the log file now.
2021-05-21 14:41:49 +12:00
Terry MacDonald
d14ee49996 Update version to 1.1.0
Also fix a csproj error.
2021-05-20 21:21:13 +12:00
Terry MacDonald
0dc7c9c0d1 Fixing slight logic error during restructure
Managed to break some logic when trying to
add robustness.... effectively doing the
opposite of what I was trying to do :/. Now
*should* be fixed, but we shall see with more
testing.
2021-05-19 22:24:04 +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
5bdb2adba8 Mostly working Game icons!
Well this took enough time! I have
almost corrected all the issues with
the icon parsing functions, but I still
have a couple of edge cases to fix.
2021-05-16 21:46:58 +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
43374ff1b2 Merged in hotfix for 1.0.6 2021-04-30 21:50:41 +12:00
Terry MacDonald
3ae712f578 Update version to v1.0.6 2021-04-30 21:25:34 +12:00
Terry MacDonald
6af0603d8f Fixed OriginLibrary issue
OriginLibrary wasn't added to the validity
checking, so no Origin games would work.
Also added a LOAD more trace logging with the
Origin library so I can see from the logs what's
happening. Also updated the version to 1.0.5.1.
And finally, removed unneeded validityrefresh
from the base ShortcutItem constructor as it
is refreshed later anyway. Should speed up
object creation a little.
2021-04-30 17:28:01 +12:00
Terry MacDonald
e9f401960e [WIP] Still moving to NHotkey 2021-04-28 22:14:54 +12:00
Terry MacDonald
209e3f0338 [WIP] Partway through swap to NHotkey
Also trying to port Willy-Kimura's HKL
HotkeySelector code over as well cause
it is ace!
2021-04-27 22:19:44 +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
4ef1100ec2 Updated version to v1.0.5.0 2021-04-23 17:47:18 +12:00
Terry MacDonald
d57ad60121 Added robustness for video card errors
Added exception protection around the video
card identifier errors to at least allow
DisplayMagician to kind of keep working even
if there are errors in the NVIDIA drivers. This fix
was brought about to get around problems with
NVIDIA RTX 2080Ti cards when using NVIDIA
driver 466.11. This fix should allow users with
cards that report data incorrectly to recreate new
DisplayProfiles, and then change all their shortcuts
to use those new Display Profiles. DisplayMagician
should then start working again. Fixes #7.

NOTE: This problem is a workaround for a broken
NVIDIA driver. Once NVIDIA find out and fix it, then
you will need to recreate your Display Profile again
and change all your shortcuts to the new Display
Prrofile in order for your shortcuts to work again.
2021-04-21 22:14:30 +12:00
Terry MacDonald
0c4023fa64 Update to v1.0.4 2021-04-10 22:21:56 +12:00
Terry MacDonald
c799121a77 Testing WINAPI device recognition
Tests to make sure the WINAP display
detection and recognition are working
as expected. They tested fine.
2021-04-09 20:21:02 +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
64871f3ddc Update to v1.0.3
Had to update the version so that the
new explorer reboot during setup upgrade
will work.
2021-03-28 22:32:48 +13:00
Terry MacDonald
44e7f0df38 Update toversion 1.0.2 2021-03-28 20:28:42 +13:00
Terry MacDonald
965f73377b Changed shortcut cancellation logic 2021-03-28 20:25:01 +13: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
795f006e2d Updating versions to 1.0.1 2021-03-17 20:13:06 +13:00
Terry MacDonald
f4c34f5cff Updated nuget packages 2021-03-12 10:09:35 +13:00
Terry MacDonald
75ac861ee7 Changed version to v1.0.0 2021-03-11 21:31:53 +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
Terry MacDonald
07ceed3ec4 Make red error when sc profile gone
This will inform the user to choose another
profile when the profile is used in a shortcut
and yet the profile doesn't exist any longer
2021-03-06 17:43:07 +13:00
Terry MacDonald
34ae9069c7 Refactored tracking errors
Moved tracking profile errors into ProfileRepository
and moved shortcut errors into ShortcutRepository.
2021-03-05 14:44:53 +13:00
Terry MacDonald
001e351106 Fixing error loading games
It was erroring when loading games into
a blank shortcut screen. This was stopping
us being able to select any games at all.
Fixed another problem with Shortcut.IsValid
causing exception when loading a profle
that no longer existed. It now will correctly
report that the shortcut is isvalid.
2021-03-05 11:12:27 +13:00
Terry MacDonald
f22450b9a0 Fix profile selection issues
Fixed the profiles selection so it doesn't change
when you swap screens. Made the 'View
current display' button refresh the profile validity
too, so that a user now only has to change their
display settings in Windows and then swap back
DisplayMagician and click the View Current Display
button and the profiles will be updated.
2021-03-05 10:34:51 +13:00
Terry MacDonald
d6a5b752c9 [WIP] partial profiles ILV render creation 2021-02-28 21:34:59 +13:00
Terry MacDonald
f122719b80 Sped up profile possbility detection
Now caches the possbility detection for
profiles, so it only runs the expensive
detection logic when the UI changes.
2021-02-28 21:24:12 +13:00
Terry MacDonald
25df13e52a Library include cleanup 2021-02-21 20:23:41 +13:00
Terry MacDonald
bb37dc908a Changed LogLevel applies immediately
Configured NLog so that the loglevel
UI changes happen straight away. Also
am using NLog to generate the user
messages while it's running.
2021-02-20 22:03:19 +13:00
Terry MacDonald
6b02e2ccbe Added logging and improved readme
Added logging to ProfileRepository and
ShortcutRepository
2021-02-15 20:33:46 +13:00
Terry MacDonald
aece0cce29 Added extra debug logging 2021-02-14 22:42:48 +13:00
Terry MacDonald
dd8939b395 Logging changes
Combined DisplayMagicianShared logging into
the main log file to simplify log reporting for the
future. Also started adding info and debug
statements to the program to make the debug
level log work well for troubleshooting. This is
going to take a LONG time to complete, but will
be worth it in the end.
2021-02-10 22:40:22 +13:00
Terry MacDonald
a06651190d Upgrade nuget libraries
Upgrade CommanlineUtils, HTMLAgility
and other libraries. Leaving ValveKeyValue
as it requires some breaking changes.
2021-02-07 15:22:54 +13:00
Terry MacDonald
ba636414c0 Improve exception handling of existing ex
Added logger instances for DisplayMagicianShared
functions. Also added logger debug commands to
all exceptions with existing ex objects.
2021-02-07 14:42:17 +13:00
Terry MacDonald
0f38881709 More code analysis suppression 2021-01-28 22:20:00 +13:00
Terry MacDonald
88bd1a71fa Fixing some CodeAnalyzer suggestions 2021-01-28 22:03:02 +13:00
Terry MacDonald
6ab1e0842a Additional suppression messages 2021-01-28 21:34:45 +13:00
Terry MacDonald
3ecababc73 Suppressing CLS compliance errors
Some functions and procedures require CLS
non-compliance due to file formats and the like.
Suppressing these compiler warnings
2021-01-28 21:19:20 +13:00
Terry MacDonald
ed167459fa Fixed UplayGame monitoring
Also fixed errors caused by trying to access
32bit processes information from 64-bit
processes by using smoe cool code thanks
to Jeff Mercado and Mike Fuchs:
https://stackoverflow.com/questions/9501771/how-to-avoid-a-win32-exception-when-accessing-process-mainmodule-filename-in-c
2020-12-28 21:34:59 +13:00
Terry MacDonald
e4ed01f33b Added .Net 4.8 and Win 10 checks to installer 2020-12-21 15:02:06 +13:00
Terry MacDonald
9e1ef4a095 [WIP] First working WiX installer
Installer works, but there are a few issues with it.
- It doesn't register the DesktopBackground COM server
- It doesn't create a start menu shortcut with the AUMID
- It doesn't check for .Net Framework 4.8 or later
- It doesn't try to install .Net Framework 4.8 or later if not there
- It doesn't have any customised backgrounds...
- It doesn't ask to run DisplayMagician when install is finished
2020-12-20 20:42:04 +13:00
Terry MacDonald
41fd798a07 Renamed projects to work with WiX file harvesting 2020-12-20 15:50:32 +13:00