Skip to content

Commit 6072c1e

Browse files
committed
checks: Check for game captures needing admin
1 parent 077c1a4 commit 6072c1e

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

checks/windows.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,20 @@ def checkAdmin(lines):
347347
"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."]
348348

349349

350+
gc_admin_re = re.compile(r"could not open process: (?P<executable>.*)$")
351+
352+
353+
def checkGCAdmin(lines):
354+
error_lines = search("could not open process:", lines)
355+
gc_error_lines = search("game-capture", error_lines) # Makes sure the error comes from a game capture, in case.
356+
if gc_error_lines:
357+
exe_list = set([gc_admin_re.search(line).group("executable").strip() for line in gc_error_lines])
358+
return [LEVEL_INFO, "Game Capture Permissions",
359+
"The following games will require OBS to be run as administrator to be captured with game capture, though more might also be needed :<br>\n<ul>\n<li>"
360+
+ "</li>\n<li>".join(exe_list)
361+
+ """</li>\n</ul> <br> For more info and additional troubleshooting, see the <a href="https://obsproject.com/kb/game-capture-troubleshooting">Game Capture Troubleshooting</a> guide."""]
362+
363+
350364
def check32bitOn64bit(lines):
351365
winVersion = search('Windows Version', lines)
352366
obsVersion = getOBSVersionLine(lines)

loganalyzer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ def doAnalysis(url=None, filename=None):
148148
checkWindowsARM64(logLines),
149149
checkMacVer(logLines),
150150
checkAdmin(logLines),
151+
checkGCAdmin(logLines),
151152
checkImports(logLines),
152153
check32bitOn64bit(logLines),
153154
checkWindowsARM64EmulationStatus(logLines),

0 commit comments

Comments
 (0)