Changeset 17 for trunk/ScreenTools.pas


Ignore:
Timestamp:
Jan 8, 2017, 11:21:02 AM (8 years ago)
Author:
chronos
Message:
  • Fixed: Build under Linux.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ScreenTools.pas

    r15 r17  
    55
    66uses
    7   Windows, StringTables,
     7  StringTables,
    88  LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls,
    99  Forms, Menus;
     
    1616  end;
    1717
     18{$IFDEF WINDOWS}
    1819function ChangeResolution(x, y, bpp, freq: integer): boolean;
     20{$ENDIF}
    1921procedure RestoreResolution;
    2022function Play(Item: string; Index: integer = -1): boolean;
     
    192194
    193195var
     196  {$IFDEF WINDOWS}
    194197  StartResolution: TDeviceMode;
     198  {$ENDIF}
    195199  ResolutionChanged: boolean;
    196200
     
    198202  GammaLUT: array [0 .. 255] of Byte;
    199203
     204{$IFDEF WINDOWS}
    200205function ChangeResolution(x, y, bpp, freq: integer): boolean;
    201206var
     
    213218    ResolutionChanged := true;
    214219end;
     220{$ENDIF}
    215221
    216222procedure RestoreResolution;
    217223begin
     224  {$IFDEF WINDOWS}
    218225  if ResolutionChanged then
    219226    ChangeDisplaySettings(StartResolution, 0);
     227  {$ENDIF}
    220228  ResolutionChanged := false;
    221229end;
     
    14761484end;
    14771485
     1486{$IFDEF WINDOWS}
    14781487EnumDisplaySettings(nil, $FFFFFFFF, StartResolution);
     1488{$ENDIF}
    14791489ResolutionChanged := false;
    14801490
Note: See TracChangeset for help on using the changeset viewer.