Skip to content

Commit

Permalink
windows: Ignore duplicate adapter names
Browse files Browse the repository at this point in the history
Prevent the "Wrong GPU" message when both adapters are the same.
  • Loading branch information
prgmitchell committed Jul 7, 2024
1 parent 077c1a4 commit 64528b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions checks/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@


def checkGPU(lines):
def getAdapterName(adapter_string):
return adapter_string.split(': ')[-1].strip()
adapters = []
for i in range(3):
try:
Expand All @@ -20,9 +22,13 @@ def checkGPU(lines):
d3dAdapter = search('Loading up D3D11', lines)
if (len(d3dAdapter) > 0):
if (len(adapters) == 2 and ('Intel' in d3dAdapter[0]) and ('Arc' not in d3dAdapter[0])):
if getAdapterName(adapters[0]) == getAdapterName(adapters[1]):
return None
return [LEVEL_CRITICAL, "Wrong GPU",
"""Your Laptop has two GPUs. OBS is running on the weak integrated Intel GPU. For better performance as well as game capture being available you should run OBS on the dedicated GPU. Check the <a href="https://obsproject.com/wiki/Laptop-Troubleshooting">Laptop Troubleshooting Guide</a>."""]
if (len(adapters) == 2 and ('Vega' in d3dAdapter[0])):
if getAdapterName(adapters[0]) == getAdapterName(adapters[1]):
return None
return [LEVEL_CRITICAL, "Wrong GPU",
"""Your Laptop has two GPUs. OBS is running on the weak integrated AMD Vega GPU. For better performance as well as game capture being available you should run OBS on the dedicated GPU. Check the <a href="https://obsproject.com/wiki/Laptop-Troubleshooting">Laptop Troubleshooting Guide</a>."""]
elif (len(adapters) == 1 and ('Intel' in adapters[0]) and ('Arc' not in adapters[0])):
Expand Down

0 comments on commit 64528b8

Please sign in to comment.