Skip to content

Commit 6b1db8e

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

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

checks/windows.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,17 @@ 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+
def checkGCAdmin(lines):
353+
error_lines = search("could not open process:", lines)
354+
gc_error_lines = search("game-capture", error_lines) # Makes sure the error comes from a game capture, in case.
355+
if gc_error_lines:
356+
exe_list = set([gc_admin_re.search(line).group("executable").strip() for line in gc_error_lines])
357+
return [LEVEL_INFO, "Game Capture permissions",
358+
"The following games might need OBS to be run as Administrator to properly capture the following games with game capture : <br>\n<ul>\n<li>" + "</li>\n<li>".join(exe_list) + "</li>\n</ul>"]
359+
360+
350361
def check32bitOn64bit(lines):
351362
winVersion = search('Windows Version', lines)
352363
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)