Commit Graph

31 Commits

Author SHA1 Message Date
Terry MacDonald
081d54cbb1 Fixed Game process detection
Also updated the update json so that
it will update correctly.
2021-03-28 21:52:55 +13:00
Terry MacDonald
965f73377b Changed shortcut cancellation logic 2021-03-28 20:25:01 +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
baa275b8a6 Option to start pgm only if needed
Added the ability for user to only start a
program if it hasn't been started yet. This
is for things like SimHub that should
already be started by Windows when the
PC first boots.

Also corrects a bug that ignored the autoname
property so that it overwrote the suggested
filename when saving a shortcut.
2021-03-17 21:25:42 +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
79597b077f Fixed profile selection for Shortcuts
Fixed the logic for profile selection on
shortcuts so that the profile is either
selected or not based on its existence
or whether the profile is valid to use now
or whether the shortcut is new.
2021-03-07 14:24:58 +13:00
Terry MacDonald
5260d8a087 Refactor shortcut validity
Moved the logic to the right places.
Removed the need for the separate
error and warning lookup arrays.
2021-03-07 13:45:49 +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
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
b6c007fe6f Updated shortcut repository logging
Added yet more debug logging to the
software so we can get information when
there is an error.
2021-02-14 12:00:47 +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
ff33dfb95a Fixed SteamGame race condition
Found issue where the IsRunning process
checks were breaking because they were
being running before the steam process
had a chance to create the process. This
meant the information wasn't aviailable for
the SteamGame.IsRunning function to
inspect. Fixed by adding in a 0.5 sec delay.
2020-12-30 22:48:42 +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
49329b870e Initial Code Analysis fixes
Also fixed up the Setup properties
file for x64 build configuration.
2020-12-26 21:46:32 +13:00
Terry MacDonald
b5d6f3f680 Fully working Windows Toast 2020-12-26 16:59:45 +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
05bb163312 Fix Audio and Capture setting retention
Had problems storing ChangeAudioDevice and
SetAudioVolume settings (and the Capture Device
versions) so had to slightly change the way the
settings were stored.
2020-12-12 21:29:38 +13:00
Terry MacDonald
f55e2c29be Better described timeout as max wait (secs)
Also set it to a more reasonable 20 second timeout
and then it continues through the starting process.
Also added some NLog error handling in RunShortcut.
2020-12-11 21:40:45 +13:00
Terry MacDonald
0f65362860 Fix so application monitoring works
Application monitoring highlighted a failure
in logic, but I fixed it. It now waits for the
timeout period before exiting.
2020-12-11 18:07:17 +13:00
Terry MacDonald
58c8a7f9d2 Fixed failed waiting for game close
Added a 5 second delay before the start of
the monitoring for game closure. This is to
allow the games to be spawned by the game
library (e.g. Steam).
2020-12-11 11:43:51 +13:00
Terry MacDonald
0830ed58dd Fixed Steam and Uplay game detection
Fixed an issue where Steam and Uplay don't detect the
game correctly. Now they find the processes themselves.

Also fixed ProgramSettings so that it generates a new
settings file on startup.

Also added LogLevel option to the ProgramSettings so that
I can start rolling out the NLog log statements to report
errors from the binary when it's installed on people's
PCs.
2020-12-09 20:47:30 +13:00
Terry MacDonald
41fc905e8c Skip audio change if same audio device
Only perform an audio device change if the
audio device is a different one.
2020-12-07 21:11:51 +13:00
Terry MacDonald
45e2c32c30 Updated shell ext to createprofile 2020-12-06 21:19:03 +13:00
Terry MacDonald
c9957b28a5 Audio volume now set correctly
It also changes the audio device and then
rolls back the changes on game exit.
2020-12-05 17:41:15 +13:00
Terry MacDonald
c5cb6e52f1 Removing old code 2020-12-04 21:05:06 +13:00
Terry MacDonald
a596c0b252 Added Audio switching and reverting logic
Audio device now correctly switches and reverts.
Very happy how easy that was to do. This is an
amazing audio library!
2020-12-03 23:10:25 +13:00
Terry MacDonald
415ff0eed0 Rename HeliosPlus to DisplayMagician
Decided to rename the application to DisplayMagician
to make it way more discoverable. Turns out there are
a LOT of applications named HeliosPlus!
2020-12-02 21:11:23 +13:00