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')); |