Skip to content

Commit

Permalink
Merge pull request #173 from RiddleTime/dev
Browse files Browse the repository at this point in the history
1.0.7.0
- hotfix for fuel info hud, drawing things were disposed when they shouldn't have been.
  • Loading branch information
RiddleTime authored Apr 30, 2024
2 parents a244ff3 + 5fedb3d commit 991ad2d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ public sealed override bool ShouldRender()

public sealed override void Render(Graphics g)
{
using Brush fuelBarBrush = GetFuelBarBrush();
Brush fuelTimeBrush = null;
Brush fuelBarBrush = GetFuelBarBrush();
_infoPanel.AddProgressBarWithCenteredText($"{pagePhysics.Fuel:F2} L", 0, pageStatic.MaxFuel, pagePhysics.Fuel, fuelBarBrush);
// Some global variants
double lapBufferVar = pageGraphics.FuelXLap * this._config.InfoPanel.FuelBufferLaps;
Expand Down Expand Up @@ -130,7 +129,7 @@ public sealed override void Render(Graphics g)
string fuelTime = $"{TimeSpan.FromMilliseconds(fuelTimeLeft):hh\\:mm\\:ss}";
string stintTime = $"{TimeSpan.FromMilliseconds(stintDebug):hh\\:mm\\:ss}";
//**********************
fuelTimeBrush = GetFuelTimeBrush(fuelTimeLeft, stintDebug);
Brush fuelTimeBrush = GetFuelTimeBrush(fuelTimeLeft, stintDebug);
//Start (Basic)
_infoPanel.AddLine("Laps Left", $"{pageGraphics.FuelEstimatedLaps:F1} @ {pageGraphics.FuelXLap:F2}L");
_infoPanel.AddLine("Fuel-End", $"{fuelToEnd + lapBufferVar:F1} : Add {fuelToAdd:F0}");
Expand All @@ -151,7 +150,7 @@ public sealed override void Render(Graphics g)
//Magic End (Advanced)
drawPanel:
_infoPanel.Draw(g);
fuelTimeBrush?.Dispose();
//fuelTimeBrush?.Dispose();
}

private double FuelToAdd(double lapBufferVar, double stintDebug, double stintFuel, double fuelToEnd)
Expand Down
1 change: 1 addition & 0 deletions Race_Element/Controls/Info/ReleaseNotes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public static class ReleaseNotes
{
internal readonly static Dictionary<string, string> Notes = new()
{
{"1.0.7.0", "- hotfix for fuel info hud, drawing things were disposed when they shouldn't have been." },
{"1.0.6.8", "- Fuel Info HUD:" +
"\n - Now calculates laptimes above 3 minutes. It will also use your last lap as laptime if you don't haven't set a valid best lap yet." +
"\n - No data will be shown if there are no known laptimes(best or last)."+
Expand Down
6 changes: 3 additions & 3 deletions Race_Element/Race Element.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
<SuiteName>Race Element</SuiteName>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<DisallowUrlActivation>true</DisallowUrlActivation>
<ApplicationVersion>1.0.6.8</ApplicationVersion>
<AssemblyVersion>1.0.6.8</AssemblyVersion>
<Version>1.0.6.8</Version>
<ApplicationVersion>1.0.7.0</ApplicationVersion>
<AssemblyVersion>1.0.7.0</AssemblyVersion>
<Version>1.0.7.0</Version>
<UseApplicationTrust>true</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
Expand Down

0 comments on commit 991ad2d

Please sign in to comment.