Commit Graph

1111 Commits

Author SHA1 Message Date
Terry MacDonald
ae7bb095e2 Revamped display layout image shortcut generation
Made many changes to simplify the configuration and make the profile display layout image generation faster and more reliable.
2022-04-19 21:12:00 +12:00
Terry MacDonald
51806494ab Added checks for non-NVIDIA screens to NVIDIA mode
This will ensure that all screens show up in the images even if they aren't connected through an NVIDIA device. I also made the same changes to the AMD mode.
2022-04-19 15:23:35 +12:00
Terry MacDonald
716942812e Updated build number 2022-04-19 10:01:24 +12:00
Terry MacDonald
b7194dd6e9 Added extra logging 2022-04-19 09:51:35 +12:00
Terry MacDonald
f042622921 Added SpaceDesk to recognised PCI devices
Also improved logging around PatchAdapterIDs
2022-04-19 09:31:07 +12:00
Terry MacDonald
ff93a1007c Found exception when tracking taskbar location
This is a subtle error, caused by either the NVIDIA driver being slow, or windows being slow in updating the location of the windows taskbar edge. This was causing an error in the GetNVIDIASCreenPositions function. Have added a 0.5 second delay to allow windows to update iit's display layout before we try to read it which should help, and also if we can't find the taskbar location in the settings, we just assume it is at the bottom. This should avoid exception.
2022-04-17 23:15:55 +12:00
Terry MacDonald
6f778f556d Detect 0 width and height screens and alert
Added specific checks to find and alert on 0 width or 0 height screens. This will then break other parts of the display layout.

Also moved the cloned screen check higher up to ensure we skip them properly.
2022-04-16 15:07:10 +12:00
Terry MacDonald
cc5f334917 Fix to ToTightestBitmap
Removed a divide by zero issue with ToTighestBitmap that could cause issues.
2022-04-16 14:55:24 +12:00
Terry MacDonald
c99c166b3d Cloned display image layout fixes
Cloned displays weren't showing properly in the image layouts, and this fixes that issue.
2022-04-15 15:13:27 +12:00
Terry MacDonald
fa05920618 Fixed Desktop right-click menu
Had forgottent to update the profiles json file to new v2.3 filename.
2022-04-15 11:46:46 +12:00
Terry MacDonald
25b8d1102f [WIP] Partially overhauled NVIDIA screen calculations
Had some mistakes in the way that the profile graphics images were calculated on NVIDIA video cards. This meant that in some situations it calculated the image structures incorrectly, and didn't put the displays in the right places. This now changes that fact.

There is still an outstanding issue that the GetNVIDIAScreenPositions function still doesn't put the taskbar location in the right place yet. I need to fix that tomorrow.
2022-04-13 22:48:32 +12:00
Terry MacDonald
5d97bf5d38 Fixed issues creating new Shortcuts 2022-04-13 21:28:18 +12:00
Terry MacDonald
11792ec1a3 Fixed incorrect log function name 2022-04-13 09:30:27 +12:00
Terry MacDonald
d75289145e Fixed display profile upgrade bug during upgrade
DisplayMagician incorrectly tried copying the old DisplayProfile over to a new file when upgraading from v2.2 format to v2.3 format. This is incorrect as the file format can't be upgraded. This was stopping DisplayMagician from working upon first restart. Now fixed.
2022-04-12 08:55:32 +12:00
Terry MacDonald
e4aab07b03 Tweaked error messages to better represent errorlevel
Changed a few ERROR level log messages to WARN as that better represents their classification.
2022-04-10 09:40:28 +12:00
Terry MacDonald
0c3dab719a Latest build 2022-04-10 09:14:46 +12:00
Terry MacDonald
5eb268bda5 Added new v2.3 profiles to support zip file
Also fixed issue where Display Profile window and the Shortcut Library window wouldn't always be shown on screen when returning from a different shortcut. This made using the application difficult. This has now been rectified.
2022-04-07 18:47:22 +12:00
Terry MacDonald
412ac2c855 Attempt to open the singleInstance if passed no command parameters
Also attempted to set the system tray notification popup correctly after a shortcut has been run.
2022-04-06 23:07:06 +12:00
Terry MacDonald
17a23009ff Working RunShortcut and improved process error logging 2022-04-03 16:33:09 +12:00
Terry MacDonald
5a9dbed680 Fixed command line errorlevels
The errorlevels are now reported properly across the application
2022-04-03 09:37:13 +12:00
Terry MacDonald
9a9db8373a Tweaked bypassing single instance mode
Made CurrentProfile work even if there was already another instance of DisplayMagician working. Added another the ability to have command line commands that will bypass the SingleInstance mode. Used only for commands that are useful for powershell, and that don't change anything.
2022-04-02 08:35:05 +13:00
Terry MacDonald
ee8d855d23 Made CurrentProfile work across instances
There is a caveat with that, that the one that is running first is the one that will generate the console output. This isn't what everyone would want unfortunately, as it may not be caught from a catch/powershell file. The 'DisplayMagician CurrentProfile' command will work perfectly if there are no other DisplayMagician's running, but because we have moved to a SIngleInstance model if there is already another DisplayMagician instance running, the instance started by the batch file will close and the batch file/powershell file won't get an answer :(.

Nothing I can do about that I'm afraid.
2022-03-30 21:52:57 +13:00
Terry MacDonald
28f7543fc3 Added CurrentProfile commandline option
The CurrentProfile will just output the name of the current profile and will return an errorlevel of  0 if it matched a known profile.
2022-03-30 18:59:12 +13:00
Terry MacDonald
2d554d217a Updated NVIDIALIbrary to latest version 2022-03-30 18:37:24 +13:00
Terry MacDonald
3cadb9a0fe Fixed SetDisplayConfig memory management 2022-03-30 12:05:53 +13:00
Terry MacDonald
53375df302 Fix memory deallocation
There were some issues with memory deallocation where AllocateHGlobal memory was being freed incorrectly with FreeCoTaskMem. This was causing issues with subsequent memory allocations.
2022-03-30 11:50:43 +13:00
Terry MacDonald
7bb96956f1 Fixed merge errors 2022-03-30 10:56:24 +13:00
Terry MacDonald
168fab9fc2 Merge from feature branch 2022-03-30 10:49:10 +13:00
Terry MacDonald
b4f9f32e1d Fully working DisplayConfig
NVIDIALibrary updated to properly support DisplayConfig functionality. Even works with Cloned mode now!
2022-03-30 10:43:47 +13:00
Terry MacDonald
e12cd19d14 [WIP] Error with Timing
The Advanced Target Info object returned by the NVIDIA driver points to memory outside the allocated memory. I need to figure out how the NVIDIA code allocates the memory, so I can account for it on return.
2022-03-30 09:01:15 +13:00
terrymacdonald
d826b0f975
Merge pull request #94 from terrymacdonald/dependabot/nuget/develop/NLog-4.7.15
Bump NLog from 4.7.14 to 4.7.15
2022-03-30 08:08:08 +13:00
Terry MacDonald
490a5f135f [WIP] Partially fixed GetDisplayConfig
The returned structure doesn't match the structure put in
2022-03-29 10:09:29 +13:00
dependabot[bot]
8643ae5300
Bump NLog from 4.7.14 to 4.7.15
Bumps [NLog](https://github.com/NLog/NLog) from 4.7.14 to 4.7.15.
- [Release notes](https://github.com/NLog/NLog/releases)
- [Changelog](https://github.com/NLog/NLog/blob/v4.7.15/CHANGELOG.md)
- [Commits](https://github.com/NLog/NLog/compare/v4.7.14...v4.7.15)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 08:36:01 +00:00
Terry MacDonald
cd9765e765 [WIP] Partially working GetDisplayConfig third pass
Need to get the timing stuff working as it isn't populated properly.
2022-03-26 21:29:53 +13:00
Terry MacDonald
3b4a5ac29d [WIP] Trying a different memeory structure for GetDisplayConfig 2022-03-26 20:11:52 +13:00
Terry MacDonald
faaa61586c [WIP] Understanding memory leak in GetDisplayConfig 2022-03-25 22:57:32 +13:00
Terry MacDonald
37e336cb95 Updated nuget packages 2022-03-25 22:44:46 +13:00
Terry MacDonald
37b9a79ff2 [WIP] Partial integration of new libraries.
Still some bits broken.
2022-03-25 21:51:38 +13:00
Terry MacDonald
842854e957 Merged from feature-update-libraries 2022-03-24 22:41:16 +13:00
Terry MacDonald
67c1015730 Updated the NVIDIALibrary and WinLibrary to v1.7.0
This is the version used within NVIDIAInfo v1.7.0
2022-03-24 22:36:42 +13:00
terrymacdonald
b82ba2320c
Merge pull request #92 from terrymacdonald/dependabot/nuget/develop/nunit-3.13.3
Bump nunit from 3.13.2 to 3.13.3
2022-03-24 22:23:53 +13:00
dependabot[bot]
6682a926f8
Bump nunit from 3.13.2 to 3.13.3
Bumps [nunit](https://github.com/nunit/nunit) from 3.13.2 to 3.13.3.
- [Release notes](https://github.com/nunit/nunit/releases)
- [Changelog](https://github.com/nunit/nunit/blob/v3.13.3/CHANGES.md)
- [Commits](https://github.com/nunit/nunit/compare/v3.13.2...v3.13.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 08:34:09 +00:00
terrymacdonald
17694cb0a1
Merge pull request #89 from terrymacdonald/dependabot/nuget/develop/Microsoft.NET.Test.Sdk-17.1.0
Bump Microsoft.NET.Test.Sdk from 17.0.0 to 17.1.0
2022-03-07 07:54:43 +13:00
terrymacdonald
473d69058e
Merge pull request #90 from terrymacdonald/dependabot/nuget/develop/NLog-4.7.14
Bump NLog from 4.7.13 to 4.7.14
2022-03-07 07:54:32 +13:00
Terry MacDonald
72b1acfe46 [WIP] Attempt to get TaskBar changing to work 2022-03-05 18:46:47 +13:00
dependabot[bot]
2472ea5c39
Bump NLog from 4.7.13 to 4.7.14
Bumps [NLog](https://github.com/NLog/NLog) from 4.7.13 to 4.7.14.
- [Release notes](https://github.com/NLog/NLog/releases)
- [Changelog](https://github.com/NLog/NLog/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/NLog/NLog/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-23 08:24:04 +00:00
dependabot[bot]
23e73440f5
Bump Microsoft.NET.Test.Sdk from 17.0.0 to 17.1.0
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.0.0 to 17.1.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.0.0...v17.1.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-17 08:26:24 +00: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
1f6af1f0c7 Working taskbar refresh after stopping programs
Moved the refreshnotificationarea logic to only be used when needed.
2022-02-07 15:18:30 +13:00