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 66c0d05
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions checks/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,18 @@ 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):
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 66c0d05

Please sign in to comment.