Changeset 328 for trunk/Core.pas


Ignore:
Timestamp:
Jul 19, 2024, 8:40:00 PM (4 months ago)
Author:
chronos
Message:
  • Fixed: Full screen switching on Windows.
  • Fixed: Main form was not visible on Windows task bar.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Core.pas

    r327 r328  
    77  Game, ApplicationInfo, PersistentForm, ScaleDPI, Translator, DOM,
    88  RegistryEx, LastOpenedList, Theme, Registry, Menus, FormCharts, FormMain,
    9   FormClient, Player, GameServer, GameClient, Generics.Collections,
    10   ServerList, GameSystem, Graphics, &Unit;
     9  FormClient, Player, GameServer, GameClient, ServerList, GameSystem, Graphics,
     10  &Unit;
    1111
    1212type
     
    486486
    487487procedure TCore.DataModuleCreate(Sender: TObject);
     488{$IFDEF Linux}
    488489const
    489490  LinuxGameFilesDir = '/usr/share/xtactics';
    490491  LinuxLanguagesDir = LinuxGameFilesDir + '/Languages';
     492{$ENDIF}
    491493begin
    492494  GameFilesDir := '';
     
    526528  TFormEx.PersistentForm := PersistentForm1;
    527529
    528   FormMain := TFormMain.Create(nil);
     530  Application.CreateForm(TFormMain, FormMain);
    529531  FormMain.Show;
    530532end;
     
    533535begin
    534536  FreeAndNil(ServerList);
    535   if Assigned(FormMain.FormPlayersStats) then FreeAndNil(FormMain.FormPlayersStats);
    536   if Assigned(FormMain.FormUnitMoves) then FreeAndNil(FormMain.FormUnitMoves);
    537   if Assigned(FormMain.FormCharts) then FreeAndNil(FormMain.FormCharts);
    538   if Assigned(FormMain.FormKeyShortcuts) then FreeAndNil(FormMain.FormKeyShortcuts);
    539537  FreeAndNil(FormClients);
    540538  FreeAndNil(StoredDimension);
     
    544542  FreeAndNil(GameSettings);
    545543  FreeAndNil(GameSystems);
    546   FreeAndNil(FormMain);
    547544end;
    548545
Note: See TracChangeset for help on using the changeset viewer.