Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMPR: Makes the autodetect not hook on the EasyAntiCheat-window. #56

Closed
wants to merge 2 commits into from
Closed

IMPR: Makes the autodetect not hook on the EasyAntiCheat-window. #56

wants to merge 2 commits into from

Conversation

Segergren
Copy link
Contributor

Automatically reject EAC-windows. This allows the real game to be autodetected.
This makes it possible for some EAC-applications to use GameCapture instead of DisplayCapture, for example Squad

@Segergren
Copy link
Contributor Author

This might be related to issue #39 .

@Segergren Segergren changed the title Makes the autodetect not hook on the EasyAntiCheat-window. IMPR: Makes the autodetect not hook on the EasyAntiCheat-window. Oct 16, 2022
@lulzsun
Copy link
Owner

lulzsun commented Oct 16, 2022

Yep, this is related to #39. We already have a slight implementation of this in BaseRecorder.cs (#40) to handle most splash screen windows.

The issue with this is that the EAC window handle name that you are checking for is not guaranteed to match other games. I noticed for the game Marauders, they use an unusual name for the EAC window handle. Which does not use "EACLauncherWnd" but instead "SDL_app"

Could you maybe look to implementing this in BaseRecorder instead?

@sonicv6
Copy link
Contributor

sonicv6 commented Oct 16, 2022

I was going to suggest we create a file with blacklisted class/window names and load from it that way adding new ones is very simple

@Segergren
Copy link
Contributor Author

Okay. @lulzsun Do you want to merge the PR or not? It should at least help improve capturing for some of the EAC games.

@lulzsun
Copy link
Owner

lulzsun commented Oct 18, 2022

I don't think I'll be merging this as it currently is. I think we should either go by @sonicv6's suggestion or extend the current implementation in BaseRecorder.cs like so:

@@ -27,7 +27,7 @@ public abstract class BaseRecorder {
                // This detection is very primative and only covers specific cases, in the future we should find another way
                // to approach this issue. (possibily fetch to see if the window size ratio is not standard?)
-               var className = GetClassName(handle);
+               var className = GetClassName(handle).Replace(" ", "").ToLower();
-               if (className.Replace(" ", "").ToLower().Contains("splashscreen")) throw new Exception($"Window handle is a possible splash screen [{className}]");
+               if (className.Contains("splashscreen") || className.Equals("eaclauncherwnd")) throw new Exception($"Window handle is a possible splash screen [{className}]");
            }

This should do the same thing that you were initially trying to do. I think we should keep it simple and just reuse this part of the code instead of trying to handle the same issue elsewhere. We can decide on a proper implementation later.

@lulzsun
Copy link
Owner

lulzsun commented Oct 22, 2022

Closing this since #61 took care of it.

@lulzsun lulzsun closed this Oct 22, 2022
@Segergren Segergren deleted the No-EAC-hook branch March 7, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants