From 1df8991f7c704d0a8c74de170ce93db3bb7d8fe1 Mon Sep 17 00:00:00 2001 From: Penwywern Date: Sat, 27 Jul 2024 17:05:13 +0200 Subject: [PATCH] checks: Check for game captures needing admin --- checks/windows.py | 14 ++++++++++++++ loganalyzer.py | 1 + 2 files changed, 15 insertions(+) diff --git a/checks/windows.py b/checks/windows.py index 2faf8a1..9029447 100644 --- a/checks/windows.py +++ b/checks/windows.py @@ -347,6 +347,20 @@ def checkAdmin(lines): "OBS is not running as Administrator. This can lead to OBS not being able to Game Capture certain games. If you are not running into issues, you can ignore this."] +gc_admin_re = re.compile(r"could not open process: (?P.*)$") + + +def checkGCAdmin(lines): + error_lines = search("could not open process:", lines) + gc_error_lines = search("game-capture", error_lines) # Makes sure the error comes from a game capture, in case. + if gc_error_lines: + exe_list = set([gc_admin_re.search(line).group("executable").strip() for line in gc_error_lines]) + return [LEVEL_INFO, "Game Capture Permissions", + "Game Capture was unable to capture the following applications. This may be solved by running OBS as an Administrator:
\n
However, further action could be required, as outlined in our Game Capture Troubleshooting guide."""] + + def check32bitOn64bit(lines): winVersion = search('Windows Version', lines) obsVersion = getOBSVersionLine(lines) diff --git a/loganalyzer.py b/loganalyzer.py index c73ad0a..4d0a1d4 100755 --- a/loganalyzer.py +++ b/loganalyzer.py @@ -148,6 +148,7 @@ def doAnalysis(url=None, filename=None): checkWindowsARM64(logLines), checkMacVer(logLines), checkAdmin(logLines), + checkGCAdmin(logLines), checkImports(logLines), check32bitOn64bit(logLines), checkWindowsARM64EmulationStatus(logLines),