diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-06-02 13:47:50 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-06-02 13:51:28 +0300 |
commit | bc701463916df8f3afad4df75b335dd1fec3465e (patch) | |
tree | 83246e3ee050195a71a1bec8908c6e7bdf3336f1 | |
parent | 7e74cbd28778b9f786ede607741a421595f94f4d (diff) |
Check for SSE2 in the installer
-rw-r--r-- | LAVFilters.iss | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/LAVFilters.iss b/LAVFilters.iss index d89b8410..04300c62 100644 --- a/LAVFilters.iss +++ b/LAVFilters.iss @@ -159,6 +159,15 @@ var SplitterPage: TInputOptionWizardPage; SplitterFormats: Array [0..NumFormatsMinusOne] of Format; +function IsProcessorFeaturePresent(Feature: Integer): Boolean; +external 'IsProcessorFeaturePresent@kernel32.dll stdcall'; + +function Is_SSE2_Supported(): Boolean; +begin + // PF_XMMI64_INSTRUCTIONS_AVAILABLE + Result := IsProcessorFeaturePresent(10); +end; + function SettingsExistCheck(): Boolean; begin if RegKeyExists(HKCU, 'Software\LAV') then @@ -498,6 +507,11 @@ function InitializeSetup(): Boolean; begin InitFormats; Result := True; + + if not Is_SSE2_Supported() then begin + SuppressibleMsgBox('LAV Filters requires a CPU with SSE2 instruction support.'#10'Your CPU does not have these capabilities.', mbCriticalError, MB_OK, MB_OK); + Result := False; + end; end; function InitializeUninstall(): Boolean; |