Skip to content

Commit

Permalink
Update auto-generated program files
Browse files Browse the repository at this point in the history
  • Loading branch information
michaliskambi committed Jul 22, 2024
1 parent 784dc9c commit 81e4548
Show file tree
Hide file tree
Showing 3 changed files with 6,072 additions and 35 deletions.
43 changes: 39 additions & 4 deletions darkest_before_dawn_standalone.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
or the command-line: "castle-engine generate-program".
Along with this file, we also generate CastleAutoGenerated unit. }

{ Do not specify program name below.
It is not used anyway, and this way allows developer
to change standalone_source in CastleEngineManifest.xml easier. }
// program darkest_before_dawn_standalone;
{ Note: The "program" declaration is optional in Pascal.
But we keep using it, otherwise Delphi IDE breaks the "uses" clause when
adding units to the project. }
program darkest_before_dawn_standalone;

{$ifdef MSWINDOWS} {$apptype GUI} {$endif}

Expand All @@ -30,6 +30,41 @@ uses
{$endif}
CastleAutoGenerated, CastleWindow, Game;

{ Forces using a dedicated (faster) GPU on laptops with multiple GPUs.
See https://castle-engine.io/dedicated_gpu }
{$if (not defined(CASTLE_NO_FORCE_DEDICATED_GPU)) and
(defined(CPU386) or defined(CPUX64) or defined(CPUAMD64)) and
(defined(MSWINDOWS) or (defined(LINUX) and defined(FPC)))
}
{$ifdef FPC}
{$asmmode intel}
{$endif}

procedure NvOptimusEnablement; {$ifdef FPC}assembler; nostackframe;{$endif}
asm
{$ifdef CPU64}
{$ifndef FPC}
.NOFRAME
{$endif}
{$endif}
dd 1
end;

procedure AmdPowerXpressRequestHighPerformance; {$ifdef FPC}assembler; nostackframe;{$endif}
asm
{$ifdef CPU64}
{$ifndef FPC}
.NOFRAME
{$endif}
{$endif}
dd 1
end;

exports
NvOptimusEnablement,
AmdPowerXpressRequestHighPerformance;
{$ifend}

begin
Application.MainWindow.OpenAndRun;
end.
Loading

0 comments on commit 81e4548

Please sign in to comment.