Commit Graph

307 Commits

Author SHA1 Message Date
Terry MacDonald
3fba28087c Made TaskBarLayout creation more robust
TaskBarLayout now catches exceptions recording the taskbar location and handles them properly. It will skip any screenss that it cannot access the taskbar information for. The Screen layout generator for NVIDIA, AMD and Windows have all been updated to handle having no taskbar layout information (it just assumes the taskbar is down the bottom of the screen).

Hopefully fixes #114
2022-06-02 19:51:07 +12:00
Terry MacDonald
56c2410d85 Updated WinLibrary so it patches adapter IDs accurately
This was a major error that somehow slipped through previous work. WinLibrary was only partially patching the Windows Display Config when it was being loaded, and that resulted in some parts  of the Windows Display Config not working after a windows reboot. This should now be fixed!

Fixes #103
2022-06-02 18:14:51 +12:00
Terry MacDonald
a318dc64f2 Adding WIndows DPI Scaling config patching for DisplayMagician
IMPORTANT: This patching means that DisplayMagician is able to use your existing Display Profiles, but there is a catch! DisplayMagician won't be able to detect that your old profiles are currently in use... in other words DisplayMagician will constantly think that you have a new Display Profile until you save a copy of the DisplayProfile again.

This occurs because DisplayMagician now gets and compares the NVIDIA 3D Settings and there is no way for us to figure out what previous 3D settings were in use when you set up previous display profiles. For that reason we'll just need you to save new Display Profiles.
2022-05-31 20:55:48 +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
a93c9e62d2 Added Windows per source DPI scaling settings 2022-05-30 10:01:43 +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
f6b1eed990 Fixed ProgramSetting loading and use
There was a flaw in the way that ProgramSettings was being used that meant there was a lot of reloading and saving going on which was unnecessary. Additionally there were some errors in the way that the Settings file was upgraded which mean that the old settings were keeping on getting overwritten. Fixes #104.
2022-05-28 21:09:53 +12:00
dependabot[bot]
335250035c
Bump NLog from 4.7.15 to 5.0.0
Bumps [NLog](https://github.com/NLog/NLog) from 4.7.15 to 5.0.0.
- [Release notes](https://github.com/NLog/NLog/releases)
- [Changelog](https://github.com/NLog/NLog/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/NLog/NLog/compare/v4.7.15...v5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-17 08:27:33 +00:00
Terry MacDonald
f8a9ca8e1e Added in partial DRS Setting support
This DRS Support is just reserving a space for the future addition of DRS Settings pulled from the driver. This will allow the recording of settings listed in the 3D Settings within the NVIDIA Control panel.
2022-04-20 20:35:51 +12:00
Terry MacDonald
9a745ea3e7 Adjusted mainform startup now we're singleinstance
Made some adjustments to when the MainForm is loaded, and how the NotifyIcon works for system tray.

Also Adjusted the way that the Windows Screens are computed so that we can reuse some of the code in AMD and NVIDIA screen generation so that the additional non-NVIDIA and non-AMD connected screens are still shown.
2022-04-20 17:39:34 +12:00
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
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
11792ec1a3 Fixed incorrect log function name 2022-04-13 09:30:27 +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
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
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
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
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
Terry MacDonald
b65d42e3ea Working taskbar notification tray refresh 2022-02-07 15:01:59 +13:00
Terry MacDonald
093663bb1c Reverted attempts to get notification tray refresh
I have been attempting to force Windows to refresh the notification tray using various Win32 API methods by sending messages to those notification tray windows to get them to refresh, but I haven't been able to get the right combination of setings. I am now leaving it for the next littlw while to concentrate on other issues.
2022-02-07 14:43:20 +13:00
Terry MacDonald
2e52e3ceb1 [WIP] Attempt to refresh Taskbar SystemTary and Overflow Notification Window
Trying to get rid of any left over applications that DIsplayMagician had to kill the process of, so that the system tray is nice and tidy. Having some issues doing so.
2022-02-06 21:54:00 +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
2d31efd4d2 Working NVIDIA screen displayview for non-mosaic screens
Had to make a few changes to how it showed non-mosaic screens to make it more reliable
2022-02-06 13:47:30 +13:00