Skip to content

Commit

Permalink
Including the MSWINDOWS directive to make this unit Windows only - #30
Browse files Browse the repository at this point in the history
  • Loading branch information
lmbelo committed Jul 4, 2022
1 parent e7fc545 commit 3af6852
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Source/WrapDelphiWindows.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@

interface

{$IFDEF MSWINDOWS}
uses
Windows, Classes, SysUtils, PythonEngine, WrapDelphi, WrapDelphiClasses;
{$ENDIF MSWINDOWS}

implementation

{$IFDEF MSWINDOWS}

{$IFDEF DELPHI11_OR_HIGHER}
uses
System.Win.HighDpi, Winapi.ShellScaling;
Expand Down Expand Up @@ -185,13 +189,13 @@ class function TWindowsRegistration.SetProcessDpiAwareness_Wrapper(PySelf,
{$ENDIF DELPHI11_OR_HIGHER}

initialization
RegisteredUnits.Add( TWindowsRegistration.Create );
RegisteredUnits.Add(TWindowsRegistration.Create);

{$IFDEF MSWINDOWS}
{$IFDEF DELPHI11_OR_HIGHER}
SetHighDpiAware();
{$ENDIF DELPHI11_OR_HIGHER}
{$ENDIF MSWINDOWS}
{$IFDEF DELPHI11_OR_HIGHER}
SetHighDpiAware();
{$ENDIF DELPHI11_OR_HIGHER}

{$ENDIF MSWINDOWS}

end.

0 comments on commit 3af6852

Please sign in to comment.