Commit Graph

1166 Commits

Author SHA1 Message Date
dependabot[bot]
2e6bd7eda3
Bump NLog from 5.0.1 to 5.0.2
Bumps [NLog](https://github.com/NLog/NLog) from 5.0.1 to 5.0.2.
- [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/v5.0.1...v5.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 08:25:40 +00:00
terrymacdonald
b45a675d66
Merge pull request #136 from terrymacdonald/dependabot/nuget/develop/Microsoft.NET.Test.Sdk-17.3.0
Bump Microsoft.NET.Test.Sdk from 17.2.0 to 17.3.0
2022-08-12 16:21:17 +12:00
dependabot[bot]
31c12535f9
Bump Microsoft.NET.Test.Sdk from 17.2.0 to 17.3.0
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.2.0 to 17.3.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.2.0...v17.3.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-08-11 08:32:22 +00:00
Terry MacDonald
24c0d4657b Working FOV file save
The only thing left is to populate the game instructions. I will leave this for later though, and will actualy merge this into the main develop branch now (with the reminder in my Trello board).
2022-08-10 21:36:25 +12:00
Terry MacDonald
7210c6c3f7 Moved to using RTF formatted game output so that a user can copy it to another document or something to keep the settings. 2022-08-09 22:14:19 +12:00
Terry MacDonald
803544f3e1 [WIP] Mostly working FOV UI
Print button doesn't work, and the Game output is a bit ugly! Other than that it works the same as Markus Ewert's awesome FOV calculator at https://github.com/dinex86/FOV-Calculator.
2022-08-09 21:33:03 +12:00
Terry MacDonald
98d45e7da2 First proper working FOV Calculator
Basic FOV functionality working now. Need to sort out the layout as it's not easy to follow or use. Also need to extract out the horizontal and vertical generic FOV entries to show them separately.
2022-08-08 22:01:58 +12:00
Terry MacDonald
681a795a67 [WIP] Nearly working FOV winForm 2022-08-08 10:25:07 +12:00
Terry MacDonald
3772d91cfc [WIP] Working FOV logic
Added a couple of other games e.g. F1 2019 and F1 2021. Still have to hook up and develop the UI.
2022-08-07 22:35:25 +12:00
Terry MacDonald
f2cc26db03 [WIP] Working FOV calculator 2022-08-07 21:00:44 +12:00
Terry MacDonald
16b9d39415 [WIP] Partial FOV Calc 2022-08-07 09:57:02 +12:00
terrymacdonald
4cb6ad9b1e
Merge pull request #134 from terrymacdonald/dependabot/nuget/develop/YamlDotNet-12.0.0
Bump YamlDotNet from 11.2.1 to 12.0.0
2022-08-01 19:43:26 +12:00
dependabot[bot]
01a9a3e748
Bump YamlDotNet from 11.2.1 to 12.0.0
Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 11.2.1 to 12.0.0.
- [Release notes](https://github.com/aaubry/YamlDotNet/releases)
- [Commits](https://github.com/aaubry/YamlDotNet/compare/v11.2.1...v12.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 08:30:44 +00:00
terrymacdonald
a767623402
Merge pull request #132 from terrymacdonald/dependabot/nuget/develop/Autoupdater.NET.Official-1.7.4
Bump Autoupdater.NET.Official from 1.7.3 to 1.7.4
2022-07-15 22:05:42 +12:00
dependabot[bot]
a96df7df74
Bump Autoupdater.NET.Official from 1.7.3 to 1.7.4
Bumps [Autoupdater.NET.Official](https://github.com/ravibpatel/AutoUpdater.NET) from 1.7.3 to 1.7.4.
- [Release notes](https://github.com/ravibpatel/AutoUpdater.NET/releases)
- [Commits](https://github.com/ravibpatel/AutoUpdater.NET/compare/v1.7.3...v1.7.4)

---
updated-dependencies:
- dependency-name: Autoupdater.NET.Official
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-15 08:26:39 +00:00
Terry MacDonald
eefa361773 Fixed error when returning from Mosaic layouts in WIndows 10
There was an error that occurred in NvAPI_SetDisplayConfig when attempting to go from an NVIDIA Surround to a non-NVIDIA Surround setup on a machine that has multiple video cards installed in it. This is due to the fact that the NVIDIA driver only sees the displays connected to NVIDIA video adapters.

The previous DM logic tried to set the DisplayConfig after switching to or from a Surround display profile, but this would fail when returning from a a Surround display profile on Win 10 devices. It appears that the NVIDIA driver AUTOMATICALLY disables all additional displays in windows when it returns from a Surround profile. This simple fact means that the DisplayConfig won't be applied properly, and it errors with an NVAPI_INVALID_ARGUMENT error. This doesn't actually matter though, as the WinLibrary comes to the rescue.

WinLibrary can see all the video adapters available, and so will turn the required displays back on and set them up just right! We *may* lose are some specific DisplayConfig parameters abeing set as part of this process, but I'm not totally sure about that as WinLibrary is basically feature parity with the DisplayConfig settings as far as I can tell.

The fix is to look specifically for the NVAPI_INVALID_ARGUMENT error when attempting to set the NvAPI_DisplayConfig, and if this happens we check if we were going from a surround profile to a non-surround profile. If that is true, then we simply ignore that error. WinLibrary then clears up that problem and everything proceeds as normal.

This should (fingers crossed) fix #119!

This change also makes it far faster to grab and set the tabaskbar settings from registry, though this logic may not detect some Windows 10 formats which appear to be LOCALDISPLAY(\d,\d,\d\d) settings which I've never seen before. It should be generally much faster and more reliable.
2022-07-14 22:41:59 +12:00
Terry MacDonald
15f17f832b Update to the latest build 2022-07-03 20:06:21 +12:00
Terry MacDonald
e92a76a950 Update save display profile message
Updated the save display profile message shown to users to inform them it could take up to 20 seconds to save the profile.
2022-07-02 15:12:13 +12:00
Terry MacDonald
83b8938e1a Reduces config scanning delay as much as possible
WinLibrary currently waits 5 seconds if it can't read the taskbar registry, and then it tries again. This is because based on my testing, if a screen layout changes, windows takes up to 20 seconds to update registry to record this fact. We have to wait until windows has finished 4 times before we are sure to have passed the 20 second window.

This is likely the delay you have mentioned. I *think* that I can slightly speed this up. We only MUST to do this delay when we are recording the config (i.e. creating a new display profile), and other times it's kind of a nice to have. So I've attempted to speed this up using a 'fastScan' option for the WinLibrary GetActiveConfig function. This will enable it to only query once for the general scans of the active config, and if there is a problem getting the data it will just accept that fact and will still return quickly. But it will still take up to 20 seconds when creating a new display profile as it is REALLY important we get that data correctly.

Fixes #129
2022-07-02 15:08:54 +12:00
Terry MacDonald
010c8c33b2 Produced first test v2.4.1 build. 2022-07-01 16:28:52 +12:00
Terry MacDonald
7a7445632a Fix CTD when centering window from a system tray or desktop shortcut
Fixes #128
2022-07-01 16:17:04 +12:00
Terry MacDonald
47cc5eb6c4 Updated README for v2.4.0 release 2022-07-01 10:44:03 +12:00
Terry MacDonald
1d2cfc8306 Improve Windows Form centering after resolution change 2022-07-01 08:37:58 +12:00
Terry MacDonald
372e6d0f58 Build new version 2022-06-29 20:54:41 +12:00
Terry MacDonald
6326fd03ba Center Shortcut Library window on return
This makes the Shortcut Library Window center itself on the primary display when finishing running a shortcut.
2022-06-29 20:43:52 +12:00
Terry MacDonald
20c390d6f9 Fixed ProcessPriority error in StartProgramControl
This is now working properly.
2022-06-29 20:37:20 +12:00
terrymacdonald
bf60ec8f8b
Delete displayprofileform.cs 2022-06-28 13:58:35 +12:00
Terry MacDonald
eed6952604 Tweaked messagebox shown after Support ZIP File is created 2022-06-28 13:57:00 +12:00
Terry MacDonald
e99db6d4af Updated NLog exception logging format to capture all details
Updated the NLog exception handling to make use of the additional logging options released recently. This will help provide me with more details when users create the Support ZIP File.
2022-06-28 13:47:56 +12:00
Terry MacDonald
895a6d4e10 Updated ProgramSettings to save on exit
Also adjusted the NLog exception logging to hopefully provide more details when an exception occurs.
2022-06-28 13:34:11 +12:00
terrymacdonald
5999e25f97
Merge pull request #126 from terrymacdonald/dependabot/nuget/develop/protobuf-net-3.1.17
Bump protobuf-net from 3.1.4 to 3.1.17
2022-06-28 12:03:55 +12:00
Terry MacDonald
5cb653f449 Remove uneeded DPI_VALUES array
Had forgotten to remove the uneeded DPI_VALUES array. This would have crashed the WinLibrary SetDisplayConfig process.
2022-06-28 11:43:18 +12:00
Terry MacDonald
2e18ca1832 Change to work with the new DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED option
This change means that DisplayMagician only supports Windows 10 (version 1809 or later), or Windows 11. This fixes issue #123.
2022-06-28 11:39:14 +12:00
Terry MacDonald
01d6c1b9a9 First attempt at setting Process DPI Awareness
This is required so that the undocumented DISPLAYCONFIG_SOURCE_DPI_SCALE_GET Windows CCD call is given the correct information by Windows 10/11. It gives an abnormal number on some hardware if this is not set. What we do now is set the process DPI context to "System Aware" on boot, but when we are either getting or setting the Windows DPI settings, we quickly swap to "Monitor Aware v2" DPI context, before swapping back to "System Aware" when we're done. This *should* return the correct per monitor settings.
2022-06-28 09:29:18 +12:00
Terry MacDonald
e0d1d13c54 Fixed DisplayProfileForm 2022-06-27 21:10:35 +12:00
Terry MacDonald
da92bf7a97 Revert "Form update"
This reverts commit 0bee4dd16c.
2022-06-27 21:08:35 +12:00
Terry MacDonald
0bee4dd16c Form update 2022-06-27 21:07:11 +12:00
Terry MacDonald
cb45185014 Fixed merge 2022-06-27 21:06:37 +12:00
Terry MacDonald
b1800245a6 Patch 2022-06-27 21:04:58 +12:00
dependabot[bot]
1e63335ef5
Bump protobuf-net from 3.1.4 to 3.1.17
Bumps [protobuf-net](https://github.com/protobuf-net/protobuf-net) from 3.1.4 to 3.1.17.
- [Release notes](https://github.com/protobuf-net/protobuf-net/releases)
- [Changelog](https://github.com/protobuf-net/protobuf-net/blob/main/docs/releasenotes.md)
- [Commits](https://github.com/protobuf-net/protobuf-net/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-27 08:43:24 +00:00
Terry MacDonald
857aaafb3c Change automatic renaming of old config files
Rewrote the automatic renaming of old config files to make it more reliable, and automatically avoid renaming the files currently in use by this version of DisplayMagician. Should make it far harder for me to incorrectly break the config files.

Also make DisplayMagician log TRACE level files by default (can be adjusted by the user if wanted). This was done to make it easier for new users to log errors when things break.
2022-06-27 20:41:16 +12:00
Terry MacDonald
ec875debe7 Built new version 2022-06-21 19:01:57 +12:00
Terry MacDonald
61a24534b1 Added more extensive logging at program start
This is to help troubleshoot errors in #123
2022-06-21 19:00:48 +12:00
Terry MacDonald
9827cfac9a Fixed excessive config gathering
The NVAPI and Windows APIs were checked multiple times in a row due to a logic error. THis has been partially corrected, but needs a lot of work to straighten it out.
2022-06-18 21:31:37 +12:00
Terry MacDonald
076f9524cd Remove unneeded NvAPI_Mosaic_GetSupportedTopoInfo function
This function isn't needed, but seems to be unreliable when it's used. So diabling it within NVIDIALibrary to reduce the chances of there being memory errors thrown.
2022-06-17 10:34:31 +12:00
Terry MacDonald
bd16ecc8e9 Merge branch 'develop' of https://github.com/terrymacdonald/DisplayMagician into develop 2022-06-17 10:19:04 +12:00
Terry MacDonald
e893fbac69 Increased logging and improved uplay library processing 2022-06-17 10:18:55 +12:00
terrymacdonald
c1e57fc05b
Merge pull request #122 from terrymacdonald/dependabot/nuget/develop/Autoupdater.NET.Official-1.7.3
Bump Autoupdater.NET.Official from 1.7.2 to 1.7.3
2022-06-15 21:57:11 +12:00
dependabot[bot]
db5fce8cec
Bump Autoupdater.NET.Official from 1.7.2 to 1.7.3
Bumps [Autoupdater.NET.Official](https://github.com/ravibpatel/AutoUpdater.NET) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/ravibpatel/AutoUpdater.NET/releases)
- [Commits](https://github.com/ravibpatel/AutoUpdater.NET/compare/v1.7.2...v1.7.3)

---
updated-dependencies:
- dependency-name: Autoupdater.NET.Official
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-14 08:55:05 +00:00
Terry MacDonald
bf2f95a992 Merge branch 'develop' of https://github.com/terrymacdonald/DisplayMagician into develop 2022-06-13 23:49:12 +12:00