Skip to content

Commit

Permalink
Add: additional entry with summary of video-info brand (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueBrain authored Feb 12, 2024
1 parent 380c1ba commit 0681e80
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions analysis/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def summarize_setting(summary, version, seconds, path, data):
if path == "info.configuration.video_info":
if "(" not in data or data.startswith("sdl "):
data = "(no hardware acceleration)"
summarize_setting(summary, version, seconds, f"{path}.brand", data)
else:
driver = data.split("(")[0].strip()

Expand All @@ -106,6 +107,19 @@ def summarize_setting(summary, version, seconds, path, data):
data = data.split(",")[0].split("(")[0].strip()
data = data.replace("@TM@", "(TM)").replace("@R@", "(R)").replace("@C@", "(C)")

if "nvidia" in data.lower() or "geforce" in data.lower() or "quadro" in data.lower():
brand = "NVIDIA"
elif "intel" in data.lower():
brand = "Intel"
elif "amd " in data.lower() or "radeon" in data.lower():
brand = "AMD"
elif "apple" in data.lower():
brand = "Apple"
else:
brand = "(other)"

summarize_setting(summary, version, seconds, f"{path}.brand", brand)

if path == "game.settings.resolution":
width, _, height = data.partition(",")
if width and height and width.isdigit() and height.isdigit():
Expand Down

0 comments on commit 0681e80

Please sign in to comment.