Changeset 14


Ignore:
Timestamp:
Dec 27, 2017, 7:41:26 PM (7 years ago)
Author:
chronos
Message:
  • Fixed: Terminate correctly running apps before scheduler stopped.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChronOS.lpi

    r12 r14  
    1414      <EnableI18N LFM="False"/>
    1515    </i18n>
    16     <VersionInfo>
    17       <StringTable ProductVersion=""/>
    18     </VersionInfo>
    1916    <BuildModes Count="2">
    2017      <Item1 Name="Debug" Default="True"/>
  • trunk/Forms/UFormMain.lfm

    r13 r14  
    55  Width = 932
    66  Caption = 'Screen 1 - ChronOS'
    7   ClientHeight = 662
     7  ClientHeight = 656
    88  ClientWidth = 932
    99  Menu = MainMenu1
     10  OnClose = FormClose
    1011  OnCreate = FormCreate
    1112  OnDestroy = FormDestroy
    1213  OnKeyDown = FormKeyDown
    1314  OnShow = FormShow
    14   LCLVersion = '1.6.4.0'
     15  LCLVersion = '1.8.0.4'
    1516  object PaintBox1: TPaintBox
    1617    Left = 0
    17     Height = 662
     18    Height = 656
    1819    Top = 0
    1920    Width = 932
  • trunk/Forms/UFormMain.pas

    r13 r14  
    2929    procedure AFullscreenExecute(Sender: TObject);
    3030    procedure AShowTerminalExecute(Sender: TObject);
     31    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    3132    procedure FormCreate(Sender: TObject);
    3233    procedure FormDestroy(Sender: TObject);
     
    124125end;
    125126
     127procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction);
     128begin
     129  Kernel.Terminate;
     130end;
     131
    126132procedure TFormMain.SwitchFullScreen;
    127133begin
  • trunk/Platform/Base/UPlatformBase.pas

    r13 r14  
    263263begin
    264264  inherited Stop;
    265   for I := 0 to Tasks.Count - 1 do
     265  for I := 0 to Tasks.Count - 1 do begin
    266266    TBaseTask(Tasks[I]).Terminated := True;
     267    TBaseTask(Tasks[I]).Thread.WaitFor;
     268  end;
    267269end;
    268270
Note: See TracChangeset for help on using the changeset viewer.