Coder Social home page Coder Social logo

Comments (56)

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

Thanks for your reply.

To clarify, I can always switch to the 'Three Screens' profile by using the Display Profiles from the DM program, or by using a saved desktop shortcut for the profile. But the system tray option never works, no matter which of my three profiles I have active.

To perform the test, so I deleted the Three Screens profile and saved it again as aaa Three.
The systray menu still showed 'Three Screens' so I closed DisplayMagician and restarted it.

Now, I am seeing 'aaa Three' as the first item in the list, but it is again grayed out. So it would appear to be something unique to this display profile itself.

aaa three

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

OK, I did some tests today with the latest codebase that will be part of DisplayMagician v2.1.0, and I was able to use the triple screen profile fine.

I'm thinking that the issue could be wrapped up in all the display logic errors that I've recently fixed in the codebase, and I expect that this issue should go away when you install the latest release (due in a few weeks from now). Please check if you still have the problem when I release DisplayMagician v2.1.0, and then if there is still a problem in v2.1.0 we'll work on it then.

Thanks
Terry

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

Thanks, I'll be sure to test it once 2.1.0 is ready.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

@erbkaiser I've managed to find and solve a WHOLE BOAT LOAD of issues over this last week. And I'm now at a point that I think the video library stuff is working. I'm confident enough to provide you with test version 2.1.0.35 for you to test. It should handle cloned windows, NVIDIA surround, weird layouts (even a combined surround with extra single display works!) and it works after multiple reboots.

It should also fix your issue.

I'd really love you to install this version, and to test the different displays. I really want you to try and break it :D.

DisplayMagicianSetup-v2.1.0.35-test.zip

One important thing to note - it will require you to create new Display Profiles as part of the upgrade. It turns out I needed a bit more information than was available in the DisplayProfiles_2.0.json format I created earlier. So this new 2.1 version creates a DisplayProfiles_2.1.json instead.

Hopefully everything works, and then I can release a new DisplayMagician version and move on to adding other features!

Thanks
Terry

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

Thanks, I'm downloading it now and will test out all the features.

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

Here's initial test results.

I closed DisplayMagician and installed the new version, then rebooted before opening it.
Upon opening it I recreated my display profiles and a game shortcut.

  1. System tray is not updated - also happened in 2.0
    After creating display profiles, they did not appear in the system tray until I quit (exit) and reopened DM.
    Game shortcuts remain permanently greyed out, see issue 3 in this list.

  2. Profile switching from the system tray works fine - for the first switch only.
    After the first switch, the profile I had before the switch is greyed out on the menu and will remain so. I can freely switch through the other two.
    Example, if I have Three Screens active before switching to Surround, I cannot switch back to Three Screens. But I can switch to Single, and from single to Surround again.
    Quitting DM and opening it again allows me to swap to Three Screens, but then the display profile I started with is once again greyed out.

  3. DM shows broken game shortcuts after reboot/initial launch
    I created two game shortcuts in DM which use the Surround screen, so I can test the automatic switch. Immediately after creating them they work, but if I close DM and open it again they are corrupted. See screenshot.
    On running one of them while they show the error cross, I get an error dialog with
    Value cannot be null. Parameter name: source.
    Details: Value cannot be null.txt
    This seems to to auto fix itself after some time, but I can also click Edit and re-save.
    game profiles

  4. Game shortcuts don't work from the system tray at all
    Regardless of their state in the main app window, the game shortcuts will not work from the systray menu.
    Launching from the DM program or by desktop shortcut works.

  5. "Choose what happens before" in game shortcuts doesn't work / crash after closing
    One of my game shortcuts should launch two additional programs before launching, it does nothing and only launches the main game.
    DM crashes with the following error when I close the game:
    Object reference not set to an instance of an object.
    Details: Object reference not set to an instance of an object.txt
    This crash does not happen when I have the additional programs open prior to game launch, and with "don't start if already running" active.
    The second profile which does not try to launch additional programs runs and closes fine.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

DisplayMagician.zip
Here's the existing folder, I'm going to try a fresh config now.

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

Did the same tests with a clean profile, no change in behaviour.
Here is the zipped folder.
DisplayMagician-new.zip

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

Hmmmmm. This is puzzling. I have others who are working fine with that exact same test version of DisplayMagician.....

Thanks for the files, I'll take a quick look now and see if I can find anything in there. I note that you're running 3x Samsung SyncMaster P2250's. They appear to be quite old monitors (released 2010, 11 years ago), so I'm wondering whether they support the EDID standard. The new DisplayMagician libraries make heavy use of the extra data that new monitors report to the video card as part of normal operations. It is possible that your monitors don't provide that data, and that is affecting the profile matching logic.

DisplayMagician has VERY detailed profile matching logic so that it knows when a particular profile is in use, and also has very detailed monitor fingerprinting logic so it knows which monitors are connected to the computer and therefore which display profiles it can use. Again, EDID is used heavily for that detail.

My gut feel is that the older screens you are using are not reporting the information that DisplayMagician is expecting, and that's the root cause of the issue.

I'll dive into the log files and configs that you've provided, but if it's as above, I'm not sure I'll be able to tweak things to make it work. If the information is there for me to use then there mightn't be anything I can do :(. The only solution might be to get new screens (or to use DisplayMagician v1.1.4 until you replace the screens).

Let me have a review and get back to you.

Thanks
Terry

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

Thanks for checking. If it's the monitors, at least I know what it is. They are indeed pretty old and don't even support HDMI, let alone DisplayPort -- I use adapters to connect my video card to their DVI-D inputs.

The profile switch by desktop shortcut works fine, and that is the main feature I am looking for. Everything else is a bonus.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

@erbkaiser How are the monitors connected? Is it over DisplayPort or HDMI? Or over DVI-D or some other DVI connection? Or a component connection? EDID only works over DisplayPort or HDMI as I understand it.

From the Samsung P2250 manual it looks like it's only DVI-D which means the EDID based detection currently used by DisplayMagician won't work:

image
(from user manual here: https://org.downloadcenter.samsung.com/downloadfile/ContentsFile.aspx?CDSite=UNI_PH&OriginYN=N&ModelType=N&ModelName=P2250&CttFileID=2233974&CDCttType=UM&VPath=UM%2F200909%2F20090930095411859%2FBN59-00906F-00Eng.pdf)

How are you connecting your 2060 Super to the displays? Do you use HDMI->DVI-D adapters? All of this is important for figuring out where the issues lie.

Thanks
Terry

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

To be precise, I use two Displayport > DVI-D adapters and one HDMI > DVI-D adapter.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

Cool. Ok looking at the newly created DisplayProfiles_2.1.json I see that the NVIDIALibrary surround display identifiers seem ok (representing the 3 displays):

"DisplayIdentifiers": [
        "NVIDIA|NVIDIA GeForce RTX 2060 SUPER|PCI_EXPRESS|1|DP|SAM|1316|1280455218|2147881088",
        "NVIDIA|NVIDIA GeForce RTX 2060 SUPER|PCI_EXPRESS|1|DP|SAM|1316|1280455218|2147881090",
        "NVIDIA|NVIDIA GeForce RTX 2060 SUPER|PCI_EXPRESS|1|DP|SAM|1316|1280455218|2147881093"
      ]

And the WinLibrary single display identifier (representing the single surround screen as seen by windows) looks ok too:

"WINAPI|\\\\?\\PCI#VEN_10DE&DEV_1F06&SUBSYS_40091458&REV_A1#4&346d1e9&1&0008#{5b45201d-f2f2-4f3b-85bb-30ff1f953599}|DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DVI|11596|1316|\\\\?\\DISPLAY#SAM0524#5&cc48c42&0&UID5120#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}|NV Surround"

When comparing this to the three screens profile, NVIDIALibrary reports the same as the surround (which is good):

"DisplayIdentifiers": [
        "NVIDIA|NVIDIA GeForce RTX 2060 SUPER|PCI_EXPRESS|1|DP|SAM|1316|1280455218|2147881088",
        "NVIDIA|NVIDIA GeForce RTX 2060 SUPER|PCI_EXPRESS|1|DP|SAM|1316|1280455218|2147881090",
        "NVIDIA|NVIDIA GeForce RTX 2060 SUPER|PCI_EXPRESS|1|DP|SAM|1316|1280455218|2147881093"
      ]

and WinLibrary reports the following, which is also good!:

"DisplayIdentifiers": [
        "WINAPI|\\\\?\\PCI#VEN_10DE&DEV_1F06&SUBSYS_40091458&REV_A1#4&346d1e9&1&0008#{5b45201d-f2f2-4f3b-85bb-30ff1f953599}|DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DVI|11596|1316|\\\\?\\DISPLAY#SAM0524#5&cc48c42&0&UID4353#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}|SyncMaster",
        "WINAPI|\\\\?\\PCI#VEN_10DE&DEV_1F06&SUBSYS_40091458&REV_A1#4&346d1e9&1&0008#{5b45201d-f2f2-4f3b-85bb-30ff1f953599}|DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DVI|11596|1316|\\\\?\\DISPLAY#SAM0524#5&cc48c42&0&UID4355#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}|SyncMaster",
        "WINAPI|\\\\?\\PCI#VEN_10DE&DEV_1F06&SUBSYS_40091458&REV_A1#4&346d1e9&1&0008#{5b45201d-f2f2-4f3b-85bb-30ff1f953599}|DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DVI|11596|1316|\\\\?\\DISPLAY#SAM0524#5&cc48c42&0&UID4358#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}|SyncMaster"
      ]

So from that perspective, the configuration should work as only the NVIDIALibrary display identifiers are used for checking if a profile can be used when in NVIDIA mode.

What this means is that the NVIDIA profile detection logic appears to be working as it should, and it isn't the bit that is messing up. I'm about to start work now, so I'll have to get back to this later tonight and over the weekend. I'll have an even more in-depth look at the log file to see if I can pinpoint something broken.

With those display identifiers working as above, I'm fairly confident I might be able to build a workaround for the issue we find with testing, and that may help others with older monitors work with DisplayMagician.

Are you happy to keep testing with me to see if we can find a solution?

Thanks
Terry

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

Certainly, I'm happy to help find the issue.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

So I've delved into the DisplayMagician.log, and it looks as though DVI-D does support EDID, as the NVIDIA drivers are accessing it fine. I had no idea that was even a thing that could happen! The upshot is that the NVIDIA driver and Windows driver understand many of the capabilities of the displays just fine.

I went through the issues you listed above one by one:

  1. This is a bug. I've added it to the list of things to fix. Thanks for alerting me.
  2. I don't get this error at all. I can swap between profiles from the system tray and it just works
  3. My game shortcuts work fine through the GUI after as many reboots of DM or even of the PC as I want to make.
  4. My game shortcuts work fine from the system tray
  5. I haven't had a chance to test this as yet, but I will tomorrow.

The first one is definitely a bug, but the rest is just weird.

I wonder whether it is something to do with a missing DLL or something? Maybe I missed a DLL when I added a new feature? I'll create a zip file now of the latest build and please just unzip this in the c:\program Files\DisplayMagician dir and we'll see if that's it...

All-DisplayMagician-Files-in-Folder.zip

This will put a copy of all the files into a single place. Please note that not all of those files will be needed, but if DisplayMagician now magically starts working, then we know that it's a problem with the Setup.

Additionally, can you please attempt to add another game to the list of game shortcuts? As both those are truck simulator games it would be useful to see if another game manufacturer worked ok.

If that doesn't fix the problem, then We'll need to do some more testing.

Thanks
Terry

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

Oh - one other thing to check. Have you installed the .net framework 4.8? DisplayMagician uses that, and the setup installer is supposed to install it automatically if you don't have it yet. Do you have it listed in your list of installed Programs?

image

If not, then you can install it from here: https://dotnet.microsoft.com/download/dotnet-framework/thank-you/net48-web-installer

If you've had to install it, then please try running DisplayMagician again, and see if that fixes things.

Thanks
Terry

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

I've overwritten DM with the zipped folder, I only didn't have the .pdb files.
There is no change in program behaviour.

x-x

The .NET installer wouldn't install as .NET Framework 4.8 or a later update is already installed on this computer.
I don't have it listed under programs but I think it's included in Windows 11 by default.

x-x

What follows is another round of various tests.

I added another random game for the single profile and that triggered a new error, probably because it has a very long name: Deathtrap Dungeon: The Interactive Video Adventure (Single)
DDungeon error.txt
Changing the shortcut name to Deathtrap Dungeon (Single) causes the same crash so I assume it doesn't like the Steam app name.

x-x

Another game with a shorther name (112 Operator on the Single profile) works fine - although it still won't work from the system tray.

Testing this game, I found another bug. Before today I never tested if launching a game shortcut from the desktop would work -- it doesn't. For 112 Operator (Single), it displays the following error:

---------------------------
Cannot run the Shortcut
---------------------------
Unable to run the shortcut '112 Operator (Single)': The Steam Game with AppID '793460' is not installed on this computer.
---------------------------
OK   
---------------------------

That game shortcut does work from the DisplayMagician window.

It shows the same error about Steam Games not being found for the other games I added.

A UPlay game throws the same error if launched from a DisplayMagician desktop shortcut:

---------------------------
Cannot run the Shortcut
---------------------------
Unable to run the shortcut 'Assassin's Creed® Valhalla (Single)': The Uplay Game with AppID '13504' is not installed on this computer.
---------------------------
OK   
---------------------------

It behaves otherwise the same as the Steam shortcuts with one difference: unlike the Steam games, it shows as enabled on the first (re)launch of DM.
image

Sluggish Morss is a non-DRM game I was using to test.

x-x

The desktop shortcut for a game profile for Sluggish Morrs (non-DRM) WORKS.

Both the Uplay game and the non-DRM game appear in the systray menu and launching them works
image
All the non-functional ones are Steam games.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

My current Steam version is Oct 13 2021's, the current one as of this time.

One possible cause for the initially broken shortcuts that comes to mind is that I have a large library of 6400+ games. Looking at the log, DM seems to try to load every game I possibly own. After launch the log file will grow for about 3 minutes to around 32000 lines. 31696 in the one provided.

It will stop growing there unless I open the Game Shortcuts window. Every click in that window causes the file to grow again. I did not test to see how large it could get.

Included is the (zipped) log file from launching 'Deathtrap Dungeon: The Interactive Video Adventure' - the game with the long name that causes a crash I don't see for other games. Note that I had to manually close the DisplayMagic window as it doesn't recognise the game has stopped playing, following the crash.
The game itself works fine by the way.
DisplayMagician.zip

DisplayMagic stops responding to the system tray menu following the crash, so for the rest of the tests I quit it with task manager and restarted it.

x-x

Children of Morta is a game I own on GOG. The desktop shortcut and systray launch work fine for it.

Hades I own through Epic, it also works fine with shortcut and systray.

Note that I didn't let DM swap display profiles for these, as that is a function that always works anyway.

Log file included for all four launches.
Morta and Hades.zip

Conclusion: the problem with game shortcuts not working from systray or desktop seems limited to Steam on my machine. And I know I am an outlier in the size of my library.

I think the long game name crash is an actual bug since it references a fixed size, and it does not happen for shorter games but does happen for Deathtrap Dungeon as well as another game (demo), "Dr. Langeskov, The Tiger, and The Terribly Cursed Emerald: A Whirlwind Heist" -- specifically chosen since it's the longest name I know of.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

@erbkaiser So I've found and fixed the long character issue. You were indeed correct, as there was a logic bug which meant the notify icon took more than the maximum allowable 63 characters. I've fixed that in the codebase, and I'll shortly look at how I can update the shortcuts/profiles in the system tray as soon as they are made.

Then after that I'll look at the rest of the many bugs you're finding. This is all excellent news, as I'd rather have them found and fixed before I do a wide release to lots of people. It's much better to have a select group of testers using early release builds and then ironing out any issues before they hit mainstream. SO THANK YOU! 👍

Once I've fixed the next round, I'll make a new test release up for you to install, and then you can check to see what's fixed, and what I need to repair.

Oh - I was trying to figure out how to speed up the loading with so many games are involved, but I have to parse through them all on start up in order to figure out which ones are installed. I'm already doing that in a thread per game, so I was wondering if it was just worth providing a pop up window mentioning something like 'DisplayMagician is loading your games, and if you have lots this may take a while' or something like that? What do you think?

Thanks
Terry

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

@erbkaiser So here is a new build that will hopefully fix some of the issues you've got. Please install using the included setup exe.

For the steam related games not showing up, I wonder if you've got so many games in the steam library database that we parse, that the thread it's running in is timing out? I'll have to delve into your logs that you provided. At this stage I've been fixing the issues that you've described as I've found them when running the same tests myself.

I've fixed the following:

  • Shortcuts/profiles now update as soon as they are saved
  • Long named games now don't crash DisplayMagician :)
  • There is now a splashscreen on startup to tell users that DisplayMagician has started and is loading games, and that it may take ages if you have lots of games (user can turn off in the settings form).

Here is a new build with those fixes in it. Can you please the issues you've found in the past, and list the bits that are still broken? I'll then spend some time tomorrow fixing those as well!

DisplayMagicianSetup-v2.1.0.62.zip

Thanks
Terry

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

Thank you for putting so much time in trying to fix all the weird issues I'm finding!

Uninstalled DisplayMagician, deleted the folder in program files, then installed the new build.

A lot of improvements :)
The long game name crash is fixed, as is the systray behaviour (mostly, see issue 2)

x -x

Remaining issues I've found:

  1. The splash screen disappears quickly, but Steam game profiles are still greyed out in the systray. If I open the DisplayMagician Game Shortcut Library immediately after, sometimes the Steam games still show a red error and this fixes itself the moment I close that window. Other times it's fixed by the time I open the window. Once it does, both library and systray are working for Steam games.
    I tried waiting it out but this does not seem to allow the systray to update -- but swapping display profiles or launching a non-Steam game shortcut do.

  2. Display Profile switching from the systray is still unreliable. One option is greyed out, usually the active profile but if I switch profiles using a game shortcut the one the game shortcut switched TO is greyed out, even after returning.
    Example: I start in 'Three Screens' and launch a game with 'Surround', then after closing the game 'Surround' is greyed out.
    If I manually switch from TS to Surround, before the switch TS is greyed out and after, Surround is (functional, is this expected behaviour?)

  3. Steam game DisplayMagician desktop shortcuts still don't work. There is also a usability quirk with the error and the splash, it appears overlapped at first
    image
    This is what it reads:
    image
    After dismissing the "can't be launched" error, the "DisplayMagician is loading..." splash screen remains active. I have to close it with task manager.
    Disabling the splash in settings does not allow the games to launch.

  4. The splash screen appears if I switch display profiles from a desktop shortcut and doesn't go away until I close it with task manager. Even if DM is running already.

  5. The game profile for American Truck Simulator (Steam) should (still) launch two additional programs, it doesn't. Additionally, DisplayMagician still crashes after closing it if these programs were not started manually before I launched the DM shortcut for the game.
    ats after closing.txt

This crash also causes DM to not return to the previous display profile, exhibiting issue number 2 here.
Log for this session included. I start in Three Screens and the game goes to Surround, and does not switch back:
DisplayMagician.zip

It's not all Steam games with extras as I've set 112 Operator to open Notepad++ before launching, and that works fine. Notepad++ launches as the game does and is properly closed after. Log for this session included. I start in Surround, the game goes to Three Screens, and I return to Surround. 112 operator.zip

The same ATS game with two different programs on prelaunch (Notepad++ and cmd.exe) also works fine.

After some more testing I found it has to be these specific extra programs I'm launching. if I apply either Local Radio Server or TrackIR v5 to any other game I get the same errors there, where the apps won't launch. I can only guess to the cause -- it's not that Local Radio Server requires elevation as any other program that needs this will work.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

I'm happy to keep testing for as long as you want to :)

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

OK @erbkaiser,

I've made a lot of changes to the code to try and remove most of the issues you've highlighted. I'll go through them one by one.

  1. I think the greyed out steam icons might actually be due to the fact I made the game loading parallelised. My focus was on trying to get to the main screen as quickly as possible, but that in turn meant that if there were a lot of games, then they may not be loaded in time for the MainForm to open. The MainForm also didn't have any logic to actually get notified of the games finishing getting loaded, so it wouldn't update itself to get the full list. The simplest fix (and the one I've implemented) is to just wait until all the games are loaded. Now that we have a splash screen that becomes an option.

I'm still not 100% confident that this is the final fix, but hopefully it allows enough time for parsing your massive list of games :). I'd really like to know how long it takes now for DisplayMagician to load i.e. how long does the splash screen show on startup?

  1. To make things clearer, I've now changed the profiles part of the notification right-click menu to show the currently active profile in bold. This should make it a lot clearer what is happening.

Additionally, I've moved where the right-click update logic is, so it now sits in each of the buttons on the DisplayProfile page and the Shortcut library page. This means that things are only updated when you click on the buttons that result in them being updated. This again should make the whole update process more reliable.

  1. The splash screen sets itself as topmost now when it starts, but then straight away turns that off again. This should have the effect of putting the window in the front, but then allowing other windows (like error messages to go over the top of the splash screen.

The second part of that error hasn't been fixed yet, as I wanted to clear up the rest of the errors first, and then see what is left. There is a change that the Steam game loading issues will have an impact on this error and may fix it... that's what I'd like you to test next :).

  1. Should be fixed now. I think it was related to the error messages stopping execution, which didn't allow the splash screen removal logic to work. I reversed the order of the logic so that the splash screen should hide before the error messages show now.

  2. There was some new process monitoring logic introduced in v2.0.1 which tried to be much smarter in how DisplayMagician handles monitoring programs. Some applications run from a single exe. Others have a 'loader' that actually loads something else then exits. DisplayMagician now tries to figure out what is happening, and tries to close things the right way when a game exits. But I expect there to be bugs in this process as it is just so darn complicated to do!

One thing I did notice is that the start program closing logic didn't have any 'safety nets' around it, so when an exception occurred then the rest of the profile reversing wouldn't take place. I've now added those safety nets to that bit of code so hopefully even if a program can't be stopped then DisplayMagician will still change back to the original display profile.


So, as you can see, lots of changes, and hopefully it clears away most of them so I can fix the last few remaining ones!

Please install this new build, and do the same awesome testing you've been doing! It's REALLY helping me out, so thank you.

DisplayMagicianSetup-v2.1.0.71.zip

Thanks
Terry

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024
  1. I have DisplayMagician set to launch with Windows and it now takes a while before the tray icon appears. Once it does, everything seems to be there including Steam games. I can see it's running in task manager but there is no splash screen during initial load after logging into Windows -- I don't mind this.

  2. The bold for active profile is a nice touch, much clearer than greying it out. Adding a new display profile or game shortcut is now immediately reflected in the systray menu as well.

  3. Steam desktop shortcuts are now working!

4 and 5 I could not test as the errors are fixed and simply don't re-appear. The ATS profile with two apps that should launch with it and don't now starts the game properly and switches back to the other display profile on closing, it ignores the other apps.

I did find one new issue/reversion: DisplayMagic no longer pulls the game icons for games in launchers (Steam, Epic, Uplay, GoG -- I don't have EA installed). Instead, it shows the launcher icon.
image
Existing game shortcuts kept their icons until I updated them. Non-DRM games where I can directly call the exe also keep their icon.

It does show icons for some games in the window where I add a new shortcut, but even for those where it does, it won't appear on the final profile.
image
That it lists some games double or triple is something that I think is caused by GoG Galaxy mirroring my other libraries, as I am pretty sure I didn't see it when I had uninstalled Galaxy a while back. I didn't think to mention this before.

Desktop game icons never really worked reliable, in DisplayMagician 1.0 it showed the screen profile icon for me, with 2.0 builds up until this one it sometimes showed a greyscale icon, and now it shows the launcher, so I consider this a very minor issue and am just reporting it since it is a change.

All in all a major step forwards. At this stage the only remaining issue I can find is the problem with the two programs that will not launch with the game ATS -- easily worked around.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

ok @erbkaiser, So I basically rewrote the bitmap and icon handling routines tonight to smooth them out and hopefully make them more robust. I think they're faster too actually.... but I also added manual icon overriding! What this means is that you can choose an icon file or an exe that has better icons in it, and that's the icon DisplayMagician will use for the shortcut library and the desktop shortcut. Works quite well IMHO. But I'd love you to test.

DisplayMagicianSetup-v2.1.0.91.zip

There should be a splash screen now on startup. It is possible that the splash screen is behind another window on start up and so it won't be shown. It does have a splashscreen on my machine, so if it doesn't on yours then we'll need to do a bit more testing.

The two programs that won't launch as start programs is really puzzling me! Can you please create a screen shot showing the start programs screen in DisplayMagician for ATS? I might be able to see something that will give me an indication of what is wrong.

In any case, please test DisplayMagician 2.1.0.91, and then we'll see what bugs are left after this!

Thanks
Terry

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

Thanks for the new build.

The splash screen now works as expected, when it disappears DisplayMagician is ready to load.

Automatic icon selection for games is also fixed -- I had to edit existing profiles.

I have a request for the icon override - can you make it possible to select a specific icon inside a DLL or exe? With the truck games, the exe has 25 icons in it, of four different sizes. Three of these sets are identical and in colour but the first set is in greyscale and that is what DM ends up using.

In trying to extract one of these icon files myself I managed to catastrophically break DisplayMagician:
image
Opening the game shortcuts window causes the error to appear. This is unrecoverable within the program itself.
What I did was extract the raw image data for one of the colour icons from the exe, save it as JPG, and rename that to ICO. DM would not let me select it by default so I tried to force it by changing the selector to all file types. Bad idea :D

Here's the crash log
incorrect icon crash.txt
And the shortcuts file from Local Appdata
Shortcuts_2.0.zip
I fixed it by removing the ATS shortcut section from that file. Just editing the UserChoseOwnIcon/UserIconPath did not work.
Here's the broken icon file I tried to make ats.zip - setting it as the icon for any game will cause the window to break catastrophically.

Re-created the profile in a normal state and here it is with both programs listed:
image
It will launch the main amtrucks.exe fine through Steam but refused to launch these two addons. So far, every other program I tested launches fine. The error is not related to the game as any other game, including a non DRM one, will also never launch either of these two.

Edit: this is another minor issue. The selector looks like this by default so will only show .exe, not .exe, .dll, and .ico:
image
Even for proper .ico files, the alternative icon selection does not work. Unless the new icon file chosen is an exe DM will ignore new icon (or lead to a crash for an invalid file, as above).

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

@erbkaiser So the icon picker idea piqued my interest, so I started implementing it tonight. It's coming along really well, but as mentioned earlier it's a bit of work. I reckon I'll get it done by the end of the week, and I think it's a much better solution that I had before. It's WAAAAAY easier to get the images you want to use as the game bitmap/icons.

Hopefully this all works out, but it's looking good at the moment.

Terry

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

Excellent, looking forward to it!

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

@erbkaiser Great news. I've finished the shortcut image selector updates. Can you please take a look and make sure the image selection stuff is working for you. Please note I split the graphics loading bits into two parts in an effort to make the loading process faster for when running games, and traded that off with having the editing/creating shortcut window loading slightly slower. I'm just about to add another 'please wait' message to the shortcutForm to warn people such as yourselves with massive game libraries that it will take a little while to load the shortcut editing form.

Anyway - can you please test, and note any issues you find (as you have been doing). You should be able to install this test version 2.1.0.160 over the top of your last install.

DisplayMagicianSetup-v2.1.0.160.zip

Thanks!
Terry

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

I did some testing: this version is great.

Shortcut creation/editing is a bit slower, it takes me about 4 seconds before the Configure Game Shortcut window pops up after clicking edit.

The icon selection works: creating a new shortcut seems to default to a better image now in some cases and for the rest I can freely select from any images included.
Selecting an image file or a different exe to add images to the list also works. I tried with exe, JPG, and PNG - great to being able to set correct images for those few games where the default icon selection still fails.

I encountered no errors in launching game shortcuts, swapping profiles, creating new profiles and shortcuts.

The only remaining issue is the weird one with the two apps not launching which is a minor one for me.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

ETS Local Radio can be downloaded here https://koenvh.nl/projects/ets2-local-radio

TrackIR v5 on https://www.naturalpoint.com/trackir/downloads/ -- it won't do much without a head tracker, but it should launch.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

@erbkaiser so after checking in detail how the start programs are being started, I'm actually surprised that it's working for any start programs. It's not very robust code, so I'm going to rewrite it and improve it greatly. There are a few robustness things I want to do to make sure it can cope with the many different ways that programs can be started, so it is likely to take quite a few days before I have it the way that I want it.

But, this should be the last few changes I need to make before it's ready to ship!

Terry

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

@erbkaiser As seems to commonly be the case, I'm a faster programmer than I thought I was! ;D

I've now got a version of DisplayMagician that I think is pretty robust. I've been able to find some amazing example code that I've tweaked, modified and extended to completely rebuild the process starting library. The new process library does a few cool things:

  • It tries to launch programs with the correct process priority, meaning that you can select a higher priority than default if you want just a few more frames per second
  • It tries to catch launcher processes, and then automatically finds their child processes and monitors them instead.
  • It handles multiple child processes if needed
  • If it can't use some of the lower-level win32 library calls, it falls back to the standard C# process library calls, so the programs at least get started (even though they may not have a custom process priority)

I'm pretty darn happy with the code that came out of the rewrite process now, and I feel like your help pointing out all the broken bits really helped pull DisplayMagician forwards. It feels like it's nearly ready to ship (though I might need some more tweaks to support NVIDIA Display Config extraction...that's another story).

Anyway, can you please test this latest version, and see if there is anything that doesn't work. I'd love to get all the issues fixed if I can :D.

DisplayMagicianSetup-v2.1.0.197.zip

Thanks
Terry

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

The new splash screen before editing game profiles is a good addition.

I haven't found any issues at all. Even TrackIR5 and Local Radio now launch before the game does. I've thrown a few programs at it including Modern UI apps, and everything just works.

Excellent work, thank you so much!

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

I indeed still have many Steam games listed twice in the game shortcut window. It doesn't duplicate all of them but maybe more than half.

Launching an nVidia Surround profile works for me, I did recreate display profiles and set the game shortcuts to the new profiles a few builds back.
I get the splash screen that DM is loading (even if it already is), displays are swapped, the game (and associated programs) launch. And when I close the game the original display profile (three separate screens in my case) is restored.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

Hi @erbkaiser,

We've recently found and fixed an error with the Windows Library and NVIDIA Library that I made. It would come up with an error when it was validating a config, and that would stop the windows portion of the display config being applied. This is now fixed.

Additionally, we had an issue with the NVIDIA Library not correctly applying colour information and failing if a screen with colour information was turned off in a profile. This too has been fixed.

And lastly, the doubled Steam information is fixed. I was accidentally adding the base steam library to the config twice, so all games in the base game library were being scanned twice (doh!). This has been fixed too.

Could you please update your DisplayMagician and test this version? DisplayMagicianSetup-v2.1.0.215.zip. I think most of the bugs are now squashed, so I'm sending this copy to my faithful testers to doublecheck the reliability on their own computers.

IMPORTANT: I strongly recommend deleting all your existing Display Profiles and recreating them again. This will ensure that your Display Profiles have all the latest fixes applied to them. Once you recreate the Display Profiles you can then go through your shortcuts and update them to use the new profiles.

Thanks
Terry

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

After installing the new build and starting it, DisplayMagician would crash on load with a 'Fatal Error. Value cannot be null.'
I had to rename (or remove) the DM folder in %LocalAppData% to get it to work. I saved the folder so if the log file can help, here it is:
DisplayMagician.log

-x-x-

In a clean profile, creating display profiles works fine but there is an issue with shortcuts. I can create one game shortcut fine, but trying to create a second seems to open the properties of the existing one again. Editing this to a new game corrupts the existing shortcut and makes it a clone, with a broken icon.
When I tried to delete one, DisplayMagician crashed with 'Exception of type 'DisplayMagician.ShortcutRepositoryException' was thrown.'

This does not APPEAR to happen if I exit the Game Shortcut Library and re-open it before creating additional shortcuts, but even then shortcuts will be broken.
It is reproducible by these steps:
-Open the Game Shortcut Library and add a new shortcut, or edit an existing one.
-Save the shortcut
-Add a second shortcut, or edit a second existing one
-Notice that the properties of the first opened shortcut are shown.
-If the second shortcut is saved, both shortcuts appear corrupted.

If the GSL is closed after creating the first shortcut and before creating the second one, the bug re-appears the first time I try to edit either of the two existing shortcuts.

There is only one shortcut icon file saved in the %LocalAppdata%\DisplayMagician\Shortcuts folder.

Game shortcuts saved to desktop will all take the icon of the first profile in the list, but will take the name of the game they were created for. They will also launch the first game.

x-x

When I replaced the new Shortcuts folder contents with the old one, existing shortcuts work fine including desktop shortcuts, but any NEW shortcuts exhibit the same broken behaviour.

In this case, only one new (broken) shortcut icon file would be saved to the Shortcuts folder with the old ones working still.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

OK - Fixed! Had to change way more than I thought I would, but it the UI should work now. Can you please test DisplayMagician v2.1.0.239 and see what happens.

DisplayMagicianSetup-v2.1.0.239.zip

I am very interested in whether you can successfully swap to a triple screen profile after swapping to a surround screen profile. Some other testers have a problem with that, but I don't on my test system. I'd like to know if you do.

Thanks for all your help @erbkaiser!

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

Hi Terry,

thanks for the new build. This fixes the game shortcuts issue.

Switching from triple screen to surround and back works, I can switch between all display profiles without problems.

I didn't notice any issues in my tests of the program.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

Hi @erbkaiser ,

So domenic and I found some errors in the Windows CCD WinLibrary which would affect you as an NVIDIA user (see #41). We worked over the last week and a half to get the bugs squashed, and I've released them in a new test build of DisplayMagician here: DisplayMagicianSetup-v2.1.0.254.zip

This is very nearly production ready as I've run out of any more bugs to squash. So can you please test this pre-release version to make sure it's fit for release?

IMPORTANT: If you have moved to WIndows 11, please delete all your DisplayProfiles as you need to recreate them if you moved to Windows 11 (each DisplayProfile is specific to the operating system it was made on). Then change all your game shortcuts to use the new DisplayProfiles.

I'm hoping that once you've recreated your DisplayProfiles and updated your Game Shortcuts then everything will work as it should 🤞

Good luck!

Thanks
Terry

from displaymagician.

erbkaiser avatar erbkaiser commented on May 20, 2024

Hi Terry,

No bugs found! I've been trying to break DisplayMagician today but it withstood all tests.

I was already on Windows 11 since I first contacted you, but either way I recreated my display profiles and game shortcuts from scratch and have been trying everything I normally do, as well as some things I have never tested before like launching a program afterwards. DisplayMagician works perfectly. No crashes, no strange things. Steam, Gog Galaxy, Epic, Ubisoft Connect shortcuts are all detected by the program, no doubling, and launch as expected.

Thanks for all the work on this program!

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.