I have a strange problem. My program uses one
TProcess instance to run an external program (here: the
FCEUX emulator). In addition to specifying the application path and the ROM file to open in the emulator, it also sets the priority to the highest possible, i.e.
ppRealTime (it is required):
procedure TEmulator.InitProcess();
begin
FProcess := TProcess.Create(nil);
{$IFDEF REGION_PAL}
FProcess.Executable := 'emulator\pal\fceux64.exe';
FProcess.Parameters.Add('emulator\pal\games\Tetris (Europe).nes');
{$ELSE}
FProcess.Executable := 'emulator\ntsc\fceux64.exe';
FProcess.Parameters.Add('emulator\ntsc\games\Tetris (USA).nes');
{$ENDIF}
FProcess.Priority := ppRealTime;
FProcess.Execute();
end;
The emulator boots up correctly, but its process priority is set to
High instead of
Realtime (see attachment). My program (the one running the emulator) works with basic permissions, so does the emulator. System info and Lazarus version in signature.
Does anyone know why this is happening and how to fix it?