1
0
mirror of synced 2024-11-22 01:53:50 +00:00

Fixed: no longer causes full-screen FSX to lose focus

This commit is contained in:
Mark van Renswoude 2015-06-24 19:36:56 +00:00
parent dfc9255585
commit 717d2a0724
3 changed files with 8 additions and 1 deletions

View File

@ -8,6 +8,7 @@ object MainForm: TMainForm
ClientHeight = 548 ClientHeight = 548
ClientWidth = 466 ClientWidth = 466
Color = clBtnFace Color = clBtnFace
DefaultMonitor = dmDesktop
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11

View File

@ -827,7 +827,7 @@ end;
procedure TMainForm.CMRestart(var Msg: TMessage); procedure TMainForm.CMRestart(var Msg: TMessage);
begin begin
ShellExecute(0, 'open', PChar(App.FileName), '/restart', PChar(App.Path), SW_SHOWMINNOACTIVE); ShellExecute(0, 'open', PChar(App.FileName), '/restart', PChar(App.Path), SW_SHOWNOACTIVATE);
Close; Close;
end; end;

View File

@ -3,6 +3,7 @@ program G940LEDControl;
uses uses
Forms, Forms,
SysUtils, SysUtils,
Windows,
X2UtSingleInstance, X2UtSingleInstance,
MainFrm in 'Forms\MainFrm.pas' {MainForm}, MainFrm in 'Forms\MainFrm.pas' {MainForm},
LogiJoystickDLL in '..\Shared\LogiJoystickDLL.pas', LogiJoystickDLL in '..\Shared\LogiJoystickDLL.pas',
@ -61,7 +62,12 @@ begin
Application.Initialize; Application.Initialize;
Application.MainFormOnTaskbar := True; Application.MainFormOnTaskbar := True;
Application.ShowMainForm := not isRestarting;
Application.Title := 'G940 LED Control'; Application.Title := 'G940 LED Control';
Application.CreateForm(TMainForm, MainForm); Application.CreateForm(TMainForm, MainForm);
if isRestarting then
MainForm.Visible := True;
Application.Run; Application.Run;
end. end.