glsorre / amethystwindows

[ARCHIVED] Automatic tiling window manager for Windows 10/11
https://amethystwindows.com
MIT License
410 stars 24 forks source link

Not Tiling Some Windowed Games #75

Closed Stobz closed 2 years ago

Stobz commented 2 years ago

I have tested Amethyst with windowed versions of the games Age of Empires II Definitive Edition and Jackbox Party Pack 7 and both of these Steam games work normally with Amethyst window tiling. However, Ecosystem Steam simulation game is not recognized by Amethyst under any of the tabs. This is the main game I am interested in tiling. How do I go about controlling this game window? Game Info- https://store.steampowered.com/app/1133120/Ecosystem Thank you.

glsorre commented 2 years ago

Hello @Stobz0, you can use v2 additions to force some windows to be considered.

Stobz commented 2 years ago

The Ecosystem game window does not display in any of the Amethyst tabs including Managed Windows/Excluded Windows/Filters/Additions, so I cannot try to select or add it. After investigating the Amethyst code more, it looks like game window might not be displaying because for Ecosystem desktopWindow.AppName == ""

I think I've narrowed it down to this. In DesktopWindow.cs, function GetAppName(), line 208

if (name == null)
    {
        name = fileName.Split(new string[] { "\\" }, StringSplitOptions.None).Last();
    }
    AppName = name;

When comparing (name == null), it never processes the final name assignment option and the function would end with AppName == "" I changed it to if (name == "") Now Ecosystem and other apps that fail the initial naming options should display in the list. It now displays Ecosystem.exe as a UnityWndClass under the Excluded Windows tab, and I can select it from there and use the Add App button. This allows the game to function normally and have Amethyst control it.

glsorre commented 2 years ago

Hello @Stobz0 could you open a PR?