hedgewars/hwengine.pas
changeset 14220 3c36a4e66c82
parent 13843 cf7626f46bb2
child 14389 c2a3d15df7d3
equal deleted inserted replaced
14219:73c5ba3aac45 14220:3c36a4e66c82
    16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    17  *)
    17  *)
    18 
    18 
    19 {$INCLUDE "options.inc"}
    19 {$INCLUDE "options.inc"}
    20 
    20 
    21 {$IFDEF WIN32}
    21 {$IFDEF WINDOWS}
    22 {$R res/hwengine.rc}
    22 {$R res/hwengine.rc}
    23 {$ENDIF}
    23 {$ENDIF}
    24 
    24 
    25 {$IFDEF HWLIBRARY}
    25 {$IFDEF HWLIBRARY}
    26 unit hwengine;
    26 unit hwengine;
    34      , SysUtils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted
    34      , SysUtils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted
    35      , uPhysFSLayer, uCursor, uRandom, ArgParsers, uVisualGearsHandlers, uTextures, uRender
    35      , uPhysFSLayer, uCursor, uRandom, ArgParsers, uVisualGearsHandlers, uTextures, uRender
    36      {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF}
    36      {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF}
    37      {$IFDEF USE_TOUCH_INTERFACE}, uTouch {$ENDIF}
    37      {$IFDEF USE_TOUCH_INTERFACE}, uTouch {$ENDIF}
    38      {$IFDEF ANDROID}, GLUnit{$ENDIF}
    38      {$IFDEF ANDROID}, GLUnit{$ENDIF}
    39      {$IFDEF WIN32}, dynlibs{$ENDIF}
    39      {$IFDEF WINDOWS}, dynlibs{$ENDIF}
    40      ;
    40      ;
    41 
    41 
    42 {$IFDEF HWLIBRARY}
    42 {$IFDEF HWLIBRARY}
    43 function RunEngine(argc: LongInt; argv: PPChar): LongInt; cdecl; export;
    43 function RunEngine(argc: LongInt; argv: PPChar): LongInt; cdecl; export;
    44 
    44 
    57 {$IFNDEF PAS2C}
    57 {$IFNDEF PAS2C}
    58 procedure catchUnhandledException(Obj: TObject; Addr: Pointer; FrameCount: Longint; Frames: PPointer); forward;
    58 procedure catchUnhandledException(Obj: TObject; Addr: Pointer; FrameCount: Longint; Frames: PPointer); forward;
    59 {$ENDIF}
    59 {$ENDIF}
    60 {$ENDIF}
    60 {$ENDIF}
    61 
    61 
    62 {$IFDEF WIN32}
    62 {$IFDEF WINDOWS}
    63 type TSetProcessDpiAwareness = function(value: Integer): Integer; stdcall;
    63 type TSetProcessDpiAwareness = function(value: Integer): Integer; stdcall;
    64 var SetProcessDpiAwareness: TSetProcessDpiAwareness;
    64 var SetProcessDpiAwareness: TSetProcessDpiAwareness;
    65 var ShcoreLibHandle: TLibHandle;
    65 var ShcoreLibHandle: TLibHandle;
    66 {$ENDIF}
    66 {$ENDIF}
    67 
    67 
   635     operatingsystem_parameter_argv:= argv;
   635     operatingsystem_parameter_argv:= argv;
   636 {$ELSE}
   636 {$ELSE}
   637 begin
   637 begin
   638 {$ENDIF}
   638 {$ENDIF}
   639 
   639 
   640 {$IFDEF WIN32}
   640 {$IFDEF WINDOWS}
   641     ShcoreLibHandle := LoadLibrary('Shcore.dll');
   641     ShcoreLibHandle := LoadLibrary('Shcore.dll');
   642     if (ShcoreLibHandle <> 0) then
   642     if (ShcoreLibHandle <> 0) then
   643     begin
   643     begin
   644         SetProcessDpiAwareness :=
   644         SetProcessDpiAwareness :=
   645             TSetProcessDpiAwareness(GetProcedureAddress(ShcoreLibHandle, 'SetProcessDpiAwareness'));
   645             TSetProcessDpiAwareness(GetProcedureAddress(ShcoreLibHandle, 'SetProcessDpiAwareness'));