Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rcmaehl committed Jul 8, 2021
1 parent d4e01f8 commit 9d2a58c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
29 changes: 27 additions & 2 deletions WhyNotWin11.au3
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,10 @@ Func Main()
Next
_GDIPlus_Shutdown()

#cs
Local $hDXFile = _TempFile(@TempDir, "dxdiag")
Local $hDXPID = Run(@SystemDir & "\dxdiag.exe /whql:off /t " & $hDXFile)
#ce

Switch _ArchCheck()
Case True
Expand Down Expand Up @@ -590,7 +592,7 @@ Func Main()
ProgressOff()
GUISetState(@SW_SHOW, $hGUI)

Local $hMsg, $sDXFile
Local $hMsg
While 1
$hMsg = GUIGetMsg()

Expand All @@ -606,7 +608,29 @@ Func Main()
#ce

; DirectX 12 takes a while. Grab the result once done
Case _GetDirectXCheck($aDirectX)
Case IsArray($aDirectX) And (Not ProcessExists($aDirectX[1])) And FileExists($aDirectX[0])
Switch _GetDirectXCheck($aDirectX)
Case 2
_GUICtrlSetState($hCheck[5][0], $iPass)
GUICtrlSetData($hCheck[5][2], "DirectX 12 && WDDM 3") ; <== No translation, "DirectX 12 and WDDM 3" in LANG-file
Case 1
_GUICtrlSetState($hCheck[5][0], $iPass)
GUICtrlSetData($hCheck[5][2], "DirectX 12 && WDDM 2") ; <== No translation, "DirectX 12 and WDDM 2" in LANG-file
Case Else
Switch @error
Case 1
_GUICtrlSetState($hCheck[5][0], $iPass)
GUICtrlSetData($hCheck[5][2], _Translate($iMUI, "No DirectX 12, but WDDM2"))
Case 2
_GUICtrlSetState($hCheck[5][0], $iFail)
GUICtrlSetData($hCheck[5][2], _Translate($iMUI, "DirectX 12, but no WDDM2"))
Case Else
_GUICtrlSetState($hCheck[5][0], $iFail)
GUICtrlSetData($hCheck[5][2], _Translate($iMUI, "No DirectX 12 or WDDM2"))
EndSwitch
EndSwitch
$aDirectX = Null
#cs
Case (Not ProcessExists($hDXPID)) And FileExists($hDXFile)
$sDXFile = StringStripWS(StringStripCR(FileRead($hDXFile)), $STR_STRIPALL)
Select
Expand Down Expand Up @@ -635,6 +659,7 @@ Func Main()
GUICtrlSetData($hCheck[5][2], _Translate($iMUI, "No DirectX 12 or WDDM2"))
EndSelect
FileDelete($hDXFile)
#ce

Case $hMsg = $hDumpLang
FileDelete(@LocalAppDataDir & "\WhyNotWin11\langs\")
Expand Down
2 changes: 1 addition & 1 deletion includes/_Checks.au3
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Func _GetDirectXCheck($aArray)
Case Not StringInStr($sDXFile, "FeatureLevels:12") Or Not StringInStr($sDXFile, "DDIVersion:12") And StringInStr($sDXFile, "DriverModel:WDDM2")
SetError(1, 0, False)
Case StringInStr($sDXFile, "DDIVersion:12") And Not StringInStr($sDXFile, "DriverModel:WDDM2")
SetError(1, 0, False)
SetError(2, 0, False)
Case Else
Return False
EndSelect
Expand Down

0 comments on commit 9d2a58c

Please sign in to comment.