Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2017-06-02 13:47:50 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2017-06-02 13:51:28 +0300
commitbc701463916df8f3afad4df75b335dd1fec3465e (patch)
tree83246e3ee050195a71a1bec8908c6e7bdf3336f1
parent7e74cbd28778b9f786ede607741a421595f94f4d (diff)
Check for SSE2 in the installer
-rw-r--r--LAVFilters.iss14
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;