diff --git a/src/FarCry2MFL_FormOptions.dfm b/src/FarCry2MFL_FormOptions.dfm index 0dad159..9aae308 100644 --- a/src/FarCry2MFL_FormOptions.dfm +++ b/src/FarCry2MFL_FormOptions.dfm @@ -4,7 +4,7 @@ object FormOptions: TFormOptions BorderIcons = [biSystemMenu, biMinimize] BorderStyle = bsSingle Caption = 'Options' - ClientHeight = 270 + ClientHeight = 282 ClientWidth = 513 Color = clBtnFace Font.Charset = DEFAULT_CHARSET @@ -18,14 +18,14 @@ object FormOptions: TFormOptions OnCreate = FormCreate DesignSize = ( 513 - 270) + 282) PixelsPerInch = 96 TextHeight = 13 object CheckListBox1: TCheckListBox Left = 4 Top = 4 Width = 161 - Height = 230 + Height = 242 OnClickCheck = CheckListBox1ClickCheck Anchors = [akLeft, akTop, akBottom] ItemHeight = 13 @@ -34,7 +34,7 @@ object FormOptions: TFormOptions end object ButtonOK: TButton Left = 152 - Top = 241 + Top = 253 Width = 101 Height = 25 Anchors = [akLeft, akBottom] @@ -52,7 +52,7 @@ object FormOptions: TFormOptions end object ButtonCancel: TButton Left = 260 - Top = 241 + Top = 253 Width = 101 Height = 25 Anchors = [akLeft, akBottom] @@ -65,7 +65,7 @@ object FormOptions: TFormOptions Left = 168 Top = 4 Width = 341 - Height = 230 + Height = 242 TabStop = False Anchors = [akLeft, akTop, akBottom] ReadOnly = True diff --git a/src/FarCry2MFL_FormOptions.res b/src/FarCry2MFL_FormOptions.res index a3f6829..cd88cd7 100644 Binary files a/src/FarCry2MFL_FormOptions.res and b/src/FarCry2MFL_FormOptions.res differ diff --git a/src/FarCry2MFL_FormOptions.xml b/src/FarCry2MFL_FormOptions.xml index 459d1dd..e85771d 100644 --- a/src/FarCry2MFL_FormOptions.xml +++ b/src/FarCry2MFL_FormOptions.xml @@ -20,9 +20,9 @@ https://farcry.fandom.com/wiki/Machete" default="1"/>
- - + @@ -39,5 +39,16 @@ Runs a console command 'batchfile'. This text file can contain list of console c 'C:\Users\USERNAME\Documents\My Games\Far Cry 2'" default="0"> + + +
\ No newline at end of file diff --git a/src/FarCry2MFL_FormProgress.pas b/src/FarCry2MFL_FormProgress.pas index 338fc01..303e247 100644 --- a/src/FarCry2MFL_FormProgress.pas +++ b/src/FarCry2MFL_FormProgress.pas @@ -41,7 +41,7 @@ implementation procedure TFormProgress.StartTimer(TimeOut: Integer); begin - ProgressBar1.Max := TimeOut * 1000 div Timer1.Interval; + ProgressBar1.Max := TimeOut * 1000 div Integer(Timer1.Interval); Timer1.Enabled := True; end; diff --git a/src/FarCry2MFL_Proc.pas b/src/FarCry2MFL_Proc.pas index 135a53e..802a94f 100644 --- a/src/FarCry2MFL_Proc.pas +++ b/src/FarCry2MFL_Proc.pas @@ -43,6 +43,8 @@ TCommandLineOptions = record bZombieAI: Boolean; bExec: Boolean; sExec: string; + bAffinity: Boolean; + iAffinity: Integer; end; TGameFilesInfo = record @@ -426,6 +428,9 @@ function LaunchGame(): TProcessInformation; ZeroMemory(@ProcessInformation, SizeOf(ProcessInformation)); if not CreateProcess(PAnsiChar(FileName), PAnsiChar(CommandLine), nil, nil, False, CREATE_SUSPENDED, nil, PAnsiChar(Path), StartupInfo, ProcessInformation) then raise Exception.Create('CreateProcess: ' + IntToStr(GetLastError())); + if CommandLineOptions.bAffinity then + if not SetProcessAffinityMask(ProcessInformation.hProcess, CommandLineOptions.iAffinity) then + raise Exception.Create('SetProcessAffinityMask: ' + IntToStr(GetLastError())); EntryPointAddress := $004014EC; ZeroMemory(@Inject, SizeOf(Inject)); Inject.PushCommand := $68; @@ -881,6 +886,10 @@ function GetOptionByKey(Key: string): Variant; Result := CommandLineOptions.bExec; if Key = 'sExec' then Result := CommandLineOptions.sExec; + if Key = 'bAffinity' then + Result := CommandLineOptions.bAffinity; + if Key = 'iAffinity' then + Result := CommandLineOptions.iAffinity; end; procedure SetOptionByKey(Key: string; Value: Variant); @@ -917,6 +926,10 @@ procedure SetOptionByKey(Key: string; Value: Variant); CommandLineOptions.bExec := Value; if Key = 'sExec' then CommandLineOptions.sExec := Value; + if Key = 'bAffinity' then + CommandLineOptions.bAffinity := Value; + if Key = 'iAffinity' then + CommandLineOptions.iAffinity := Value; end; end. diff --git a/src/FarCry2MFLauncher.dof b/src/FarCry2MFLauncher.dof index a0bc297..2ee3336 100644 --- a/src/FarCry2MFLauncher.dof +++ b/src/FarCry2MFLauncher.dof @@ -113,9 +113,9 @@ RootDir= IncludeVerInfo=1 AutoIncBuild=1 MajorVer=1 -MinorVer=9 +MinorVer=10 Release=0 -Build=50 +Build=73 Debug=0 PreRelease=0 Special=0 @@ -126,7 +126,7 @@ CodePage=1252 [Version Info Keys] CompanyName= FileDescription= -FileVersion=1.9.0.50 +FileVersion=1.10.0.73 InternalName= LegalCopyright= LegalTrademarks= diff --git a/src/FarCry2MFLauncher.res b/src/FarCry2MFLauncher.res index a0fb5ed..bed1b0e 100644 Binary files a/src/FarCry2MFLauncher.res and b/src/FarCry2MFLauncher.res differ