Skip to content

Commit

Permalink
Fix performance regression
Browse files Browse the repository at this point in the history
  • Loading branch information
thekovic committed Feb 11, 2023
1 parent 5b5821e commit d61ea3c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Source/Plugins/ImageDrawingExample/obj
Build/*.exe
Build/*.pdb
Build/Plugins
Build/Builder.xml
2 changes: 1 addition & 1 deletion Source/Core/Rendering/Renderer3D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ public void SetFogMode(bool usefog)
graphics.Device.SetRenderState(RenderState.FogEnable, usefog);
}

// This siwtches crosshair busy icon on and off
// This switches crosshair busy icon on and off
public void SetCrosshairBusy(bool busy)
{
crosshairbusy = busy;
Expand Down
9 changes: 5 additions & 4 deletions Source/Core/Windows/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -908,10 +908,6 @@ public void RedrawDisplay()
{
if ((General.Map != null) && (General.Editing.Mode != null))
{
foreach (Sector s in General.Map.Map.Sectors)
s.UpdateNeeded = true;

General.Map.Map.Update();
General.Editing.Mode.OnRedrawDisplay();
}
else
Expand Down Expand Up @@ -2004,6 +2000,11 @@ public void ToggleFullBrightness()
General.Interface.DisplayStatus(StatusType.Action, "Full Brightness is now " + (Renderer.FullBrightness ? "ON" : "OFF"));

// Redraw display to show changes
foreach (Sector s in General.Map.Map.Sectors)
{
s.UpdateNeeded = true;
}
General.Map.Map.Update();
General.Interface.RedrawDisplay();
}

Expand Down

0 comments on commit d61ea3c

Please sign in to comment.