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 authored and RytoEX committed Jan 16, 2025
1 parent 7ff24d3 commit 99940bc
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(adapterString):
return adapterString.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 99940bc

Please sign in to comment.