Skip to content

Commit

Permalink
Small optimisations
Browse files Browse the repository at this point in the history
  • Loading branch information
VolcanicArts committed Nov 15, 2024
1 parent c761184 commit c5147de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions VRCOSC.App/Actions/CompositeProgressAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using VRCOSC.App.Utils;

namespace VRCOSC.App.Actions;

Expand Down Expand Up @@ -33,6 +32,6 @@ protected override async Task Perform()
public override float GetProgress()
{
var multiplier = 1f / children.Count;
return children.Sum(child => child.IsComplete ? multiplier : (float)Interpolation.Map(child.GetProgress(), 0f, 1f, 0f, multiplier));
return children.Sum(child => child.IsComplete ? multiplier : child.GetProgress() * multiplier);
}
}
4 changes: 2 additions & 2 deletions VRCOSC.App/UI/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public DispatcherOperation CloseChildren() => Dispatcher.InvokeAsync(() =>
}
});

private async void load()
private void load()
{
var loadingAction = new CompositeProgressAction();

Expand Down Expand Up @@ -177,7 +177,7 @@ private async void load()
});
};

await ShowLoadingOverlay("Welcome to VRCOSC", loadingAction);
_ = ShowLoadingOverlay("Welcome to VRCOSC", loadingAction);
}

private void copyOpenVrFiles()
Expand Down

0 comments on commit c5147de

Please sign in to comment.