Skip to content

Commit

Permalink
checks: Check for game captures needing admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Penwy committed Jul 27, 2024
1 parent 077c1a4 commit 6b1db8e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions checks/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,17 @@ 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<executable>.*)$")

def checkGCAdmin(lines):

Check warning on line 352 in checks/windows.py

View workflow job for this annotation

GitHub Actions / 02 - Code Format Check

expected 2 blank lines, found 1
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",
"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>"]


def check32bitOn64bit(lines):
winVersion = search('Windows Version', lines)
obsVersion = getOBSVersionLine(lines)
Expand Down
1 change: 1 addition & 0 deletions loganalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def doAnalysis(url=None, filename=None):
checkWindowsARM64(logLines),
checkMacVer(logLines),
checkAdmin(logLines),
checkGCAdmin(logLines),
checkImports(logLines),
check32bitOn64bit(logLines),
checkWindowsARM64EmulationStatus(logLines),
Expand Down

0 comments on commit 6b1db8e

Please sign in to comment.