From 76565a9c5d8f65cb2b9cc791813dd904fc7839ad Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Sat, 18 Apr 2015 11:42:15 +0000 Subject: [PATCH] Compatibility with FSX - Steam Edition AutoLaunch feature --- G940LEDControl/Bin/FSX-SE-SimConnect.dll | Bin 0 -> 45056 bytes .../{SimConnect.dll => FSX-SimConnect.dll} | Bin G940LEDControl/Forms/MainFrm.dfm | 27 +++- G940LEDControl/Forms/MainFrm.pas | 30 +++- G940LEDControl/G940LEDControl.dpr | 7 +- G940LEDControl/G940LEDControl.dproj | 7 +- G940LEDControl/G940LEDControl.res | Bin 27828 -> 28540 bytes G940LEDControl/Units/FSXAutoLaunch.pas | 129 ++++++++++++++++++ G940LEDControl/Units/FSXSimConnectClient.pas | 47 ++++--- Setup/G940LEDControl.iss | 3 +- Shared/SimConnect.pas | 1 + 11 files changed, 220 insertions(+), 31 deletions(-) create mode 100644 G940LEDControl/Bin/FSX-SE-SimConnect.dll rename G940LEDControl/Bin/{SimConnect.dll => FSX-SimConnect.dll} (100%) create mode 100644 G940LEDControl/Units/FSXAutoLaunch.pas diff --git a/G940LEDControl/Bin/FSX-SE-SimConnect.dll b/G940LEDControl/Bin/FSX-SE-SimConnect.dll new file mode 100644 index 0000000000000000000000000000000000000000..a70883d307a05e3f3f91628c4adfc39ca36d04ac GIT binary patch literal 45056 zcmeIbdwf*Y)jxbDnZN)888p$TK}Q%Z%Ed`0A(xq4#$=LE2@C`h5G00VU=l+not%N7 zVuM2h<8g$xw)N>_TNGRE9bYM;A_mZmw<1-mSg_JQ)Q$#fP#z2wJ@0qzbD1-fa8dim z@A-T>u+Q0NU)El0?X}lld+mKrs&C%RC3767M-WAh+lf2 zKU}?2H|q~q&-XTWnA`on75;{m=EjD$HXm`3Jk3*}Z$WkKKEAFUNg( zRUXSS;2sZsxt_YnrBy zrt+q%IMe2v$(A6yy;f_%R(7?p6OndL*g@vR2RRh83->?N#UvpWiXR z*v$KU=2l-Dcy{Yl&UEW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dv$toT$ew1~Vtd#2x$Ppz!t$K$IR|qt z&YhThU2bk}Np5BC?A&F!UeNVu?$fz_xqm{Be`7|@4Ev1LGhUeS-i%W-lJZ97+4Fkx zo<*O(nWxXUQcJ>~!pLL>&9Ufzd@1imoYg z6x9^nQq)>>XVHeD$BJGrdavl?qAQCh6;CTJLQmHeuPk0$d{6OX#XE~%DE^;fUCE^- zncz@;8Ye=j*+a*7VZaT~$59BYAfjMx8xp2Kb=y=A_SX@=Iv}8re>XHz! zxxZv<$vf0*3;o;=y7gWOg#VZ#g9n^hkNhtdjXe`xfkh;l^1fTc=vB)>7!U OPG~er`p++(1OGp$VCL 13.4 True - Debug + Release Win32 1 Application @@ -49,7 +49,7 @@ true - 8 + 1 rtl;dbrtl;$(DCC_UsePackage) Lib Bin @@ -58,7 +58,7 @@ None G940LEDControl_Icon.ico Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;System.Win;$(DCC_Namespace) - CompanyName=X²Software;FileDescription=G940 LED Control;FileVersion=1.0.8.0;InternalName=;LegalCopyright=© 2011 - 2015 X²Software;LegalTrademarks=;OriginalFilename=G940LEDControl.exe;ProductName=G940 LED Control;ProductVersion=1.0;Comments= + CompanyName=X²Software;FileDescription=G940 LED Control;FileVersion=1.1.0.0;InternalName=;LegalCopyright=© 2011 - 2015 X²Software;LegalTrademarks=;OriginalFilename=G940LEDControl.exe;ProductName=G940 LED Control;ProductVersion=1.1;Comments= 1033 @@ -138,6 +138,7 @@ + Cfg_2 Base diff --git a/G940LEDControl/G940LEDControl.res b/G940LEDControl/G940LEDControl.res index 4ed79be010dbe416f03dd8eaf98310de00f0dc36..daf3e06811e9d9304aadf5ebf8fa7570c566527e 100644 GIT binary patch delta 730 zcmaKqu}%U(5QhIF6c8JYmE9GVO2D9rm5G2xgJ8rEJ3|za1c3lXt?m^pdND#BUZ(z(n^lvomwE|IGZmFK^!GyLayg{fOjC8V=_X4@*ia9(4w)A4#LjD(MuR z(-GF5iYnmmp?9!ty+%L2B+q^3n`LXuX~_Ubk#T@67EwU3q@FsetEn1rbv0B4x~U7b zNE&d;qop*m>GmA9w4piT8FH@FR)zdK+Nt1GU4;`pgWLk8ryJs(aeQA3oD1s&S;AeN zxdz&#);ZF20K1g4qQ3IXon^OTP1kITCT%4Zn*u9?)d6jSky1h?NhikR68U-ZYP8f) zCIGTc=Qe*$mw-!;lv?9RiqF^TkGGEX*Hi^90$d#97?%bgPHEnVmvE@jNErpw6D8>D z7O}PMXgUP2rE^`wP;Z9b5a>U4R=9OfvlzcPI&k!)D40b&2(p_B`<}c4Y1uuYWB%G* ScbTp-b6xT1Ao}D#G`<1CZ*0r} delta 13 Vcmex!k8#UQ#t90WUocI{0RS^*2DbnJ diff --git a/G940LEDControl/Units/FSXAutoLaunch.pas b/G940LEDControl/Units/FSXAutoLaunch.pas new file mode 100644 index 0000000..8f355ac --- /dev/null +++ b/G940LEDControl/Units/FSXAutoLaunch.pas @@ -0,0 +1,129 @@ +unit FSXAutoLaunch; + +interface +type + TFSXVersion = (fsxStandard, fsxSteamEdition); + + TFSXAutoLaunch = class(TObject) + protected + class function GetLaunchFileName(AVersion: TFSXVersion): string; + public + class function IsEnabled(AVersion: TFSXVersion): Boolean; + class function SetEnabled(AVersion: TFSXVersion; AValue: Boolean): Boolean; + end; + + +implementation +uses + System.SysUtils, + Xml.XMLIntf, + + X2UtApp, + + SimBaseDocumentXMLBinding; + + +const + FSXEXELaunchFileName = 'exe.xml'; + AddonName = 'G940LEDControl'; + + + +{ TFSXAutoLaunch } +class function TFSXAutoLaunch.GetLaunchFileName(AVersion: TFSXVersion): string; +const + VersionPath: array[TFSXVersion] of string = ('FSX', 'FSX-SE'); + +begin + Result := App.UserPath + 'Microsoft\' + VersionPath[AVersion] + '\' + FSXEXELaunchFileName; +end; + + +class function TFSXAutoLaunch.IsEnabled(AVersion: TFSXVersion): Boolean; +var + launch: IXMLSimBaseDocument; + addon: IXMLLaunchAddon; + +begin + Result := False; + if not FileExists(GetLaunchFileName(AVersion)) then + exit; + + try + launch := LoadSimBaseDocument(GetLaunchFileName(AVersion)); + + for addon in launch do + begin + if addon.Name = AddonName then + begin + Result := True; + break; + end; + end; + except + Result := False; + end; +end; + + +class function TFSXAutoLaunch.SetEnabled(AVersion: TFSXVersion; AValue: Boolean): Boolean; +var + launch: IXMLSimBaseDocument; + findAddon: IXMLLaunchAddon; + addon: IXMLLaunchAddon; + +begin + if not FileExists(GetLaunchFileName(AVersion)) then + begin + launch := NewSimBaseDocument; + launch.OwnerDocument.Encoding := 'Windows-1252'; + launch.OwnerDocument.Options := launch.OwnerDocument.Options + [doNodeAutoIndent]; + + launch._Type := 'Launch'; + launch.version := '1,0'; + + launch.Descr := 'Launch'; + launch.Filename := FSXEXELaunchFileName; + launch.Disabled := SimBaseBoolean_False; + launch.LaunchManualLoad := SimBaseBoolean_False; + end else + begin + launch := LoadSimBaseDocument(GetLaunchFileName(AVersion)); + launch.OwnerDocument.Options := launch.OwnerDocument.Options + [doNodeAutoIndent]; + end; + + addon := nil; + for findAddon in launch do + begin + if findAddon.Name = AddonName then + begin + addon := findAddon; + break; + end; + end; + + if AValue then + begin + if not Assigned(addon) then + begin + addon := launch.Add; + addon.Name := AddonName; + end; + + addon.Disabled := SimBaseBoolean_False; + addon.ManualLoad := SimBaseBoolean_False; + addon.Path := App.FileName; + launch.OwnerDocument.SaveToFile(GetLaunchFileName(AVersion)); + end else + begin + if Assigned(addon) then + begin + launch.Remove(addon); + launch.OwnerDocument.SaveToFile(GetLaunchFileName(AVersion)); + end; + end; + + Result := AValue; +end; + +end. diff --git a/G940LEDControl/Units/FSXSimConnectClient.pas b/G940LEDControl/Units/FSXSimConnectClient.pas index f39d183..6a209aa 100644 --- a/G940LEDControl/Units/FSXSimConnectClient.pas +++ b/G940LEDControl/Units/FSXSimConnectClient.pas @@ -59,6 +59,7 @@ uses OtlComm, OtlCommon, SimConnect, + X2UtApp, FSXResources, FSXSimConnectStateMonitor; @@ -137,7 +138,8 @@ type function Initialize: Boolean; override; procedure Cleanup; override; - procedure TrySimConnect; + procedure TrySimConnect; overload; + procedure TrySimConnect(const ALibraryName: string); overload; procedure RegisterDefinitions; procedure RegisterDefinition(ADefinitionID: Cardinal; ADefinition: IFSXSimConnectDefinitionAccess); @@ -427,16 +429,35 @@ end; procedure TFSXSimConnectClient.TrySimConnect; -var - eventHandle: THandle; - begin if SimConnectHandle <> 0 then exit; - Log.Info('Attempting to connect to SimConnect'); + TrySimConnect('FSX-SimConnect.dll'); + if SimConnectHandle = 0 then + TrySimConnect('FSX-SE-SimConnect.dll'); - if InitSimConnect then + if SimConnectHandle = 0 then + begin + Log.Info(Format('FSX SimConnect: Connection failed, trying again in %d seconds', [INTERVAL_TRYSIMCONNECT div 1000])); + TFSXSimConnectStateMonitor.SetCurrentState(scsFailed); + + Task.SetTimer(TIMER_TRYSIMCONNECT, INTERVAL_TRYSIMCONNECT, TM_TRYSIMCONNECT); + {$IFNDEF SCUSEEVENT} + Task.ClearTimer(TIMER_PROCESSMESSAGES); + {$ENDIF} + end; +end; + + +procedure TFSXSimConnectClient.TrySimConnect(const ALibraryName: string); +var + eventHandle: THandle; + +begin + Log.Info('Attempting to connect to SimConnect using ' + ALibraryName); + + if InitSimConnectFromLibrary(App.Path + ALibraryName) then begin {$IFDEF SCUSEEVENT} eventHandle := SimConnectDataEvent.Handle; @@ -456,18 +477,8 @@ begin {$IFNDEF SCUSEEVENT} Task.SetTimer(TIMER_PROCESSMESSAGES, INTERVAL_PROCESSMESSAGES, TM_PROCESSMESSAGES); {$ENDIF} - end; - end; - - if SimConnectHandle = 0 then - begin - Log.Info(Format('FSX SimConnect: Connection failed, trying again in %d seconds', [INTERVAL_TRYSIMCONNECT div 1000])); - TFSXSimConnectStateMonitor.SetCurrentState(scsFailed); - - Task.SetTimer(TIMER_TRYSIMCONNECT, INTERVAL_TRYSIMCONNECT, TM_TRYSIMCONNECT); - {$IFNDEF SCUSEEVENT} - Task.ClearTimer(TIMER_PROCESSMESSAGES); - {$ENDIF} + end else + FSimConnectHandle := 0; end; end; diff --git a/Setup/G940LEDControl.iss b/Setup/G940LEDControl.iss index 57d5b1b..fe9f7c4 100644 --- a/Setup/G940LEDControl.iss +++ b/Setup/G940LEDControl.iss @@ -30,7 +30,8 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{ [Files] Source: "..\G940LEDControl\Bin\{#AppExeName}"; DestDir: "{app}"; Flags: ignoreversion Source: "..\G940LEDControl\Bin\LogiJoystickDLL.dll"; DestDir: "{app}"; Flags: ignoreversion -Source: "..\G940LEDControl\Bin\SimConnect.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\G940LEDControl\Bin\FSX-SimConnect.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\G940LEDControl\Bin\FSX-SE-SimConnect.dll"; DestDir: "{app}"; Flags: ignoreversion [Icons] Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}" diff --git a/Shared/SimConnect.pas b/Shared/SimConnect.pas index bb3498e..6156562 100644 --- a/Shared/SimConnect.pas +++ b/Shared/SimConnect.pas @@ -662,6 +662,7 @@ type // Additional procedures to support dynamic loading function InitSimConnect: boolean; +function InitSimConnectFromLibrary(Name: string): boolean; procedure CloseSimConnect; function IsSimConnectInitialized: Boolean;