mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-29 04:18:49 -04:00
Triforce v0.8.5
A Randomizer page in the launcher, a new title screen with Mods and Save Select tabs, scaling changes applied in game, the Jabu-Jabu bars fixed, renderer frame-time work and the brightness-flash fix, and fixes from the 0.8.4 reports.
This commit is contained in:
@@ -60,20 +60,32 @@ public sealed partial class Backend
|
||||
"bench.go", new[] { ("no", "Not now", false), ("helpers", "With the helper-thread test", false), ("go", "Start", true) });
|
||||
}
|
||||
|
||||
// ((Triforce, 11-26) 1 while a run is on its way: two clicks on Start ran two, and the second backed up the options the
|
||||
// first had already changed, so the player's own settings were not put back)
|
||||
int benchBusy;
|
||||
|
||||
async Task RunBench(bool compare, bool helperTest = false)
|
||||
{
|
||||
var g = GameDir;
|
||||
if (g == null || benchCts != null) return;
|
||||
if (g == null) return;
|
||||
if (compare && benchRun == null) return;
|
||||
using var cts = benchCts = new CancellationTokenSource();
|
||||
var pic = new Saves(ctx).Newest(g) is { } newest ? SavePicUrl(newest) : null;
|
||||
if (Interlocked.CompareExchange(ref benchBusy, 1, 0) != 0) return;
|
||||
try { await RunBenchOne(g, compare, helperTest); }
|
||||
finally { Interlocked.Exchange(ref benchBusy, 0); }
|
||||
}
|
||||
|
||||
async Task RunBenchOne(string g, bool compare, bool helperTest)
|
||||
{
|
||||
var bm = new Benchmark(ctx);
|
||||
(int, string)? second = null;
|
||||
// (before the run is marked as running: a refusal here left benchCts set, and the page showed an empty run for good)
|
||||
if (compare)
|
||||
{
|
||||
second = benchSecond ?? bm.SecondPass(g, BenchIni.Read(Path.Combine(g, GameOptionsSchema.FileName)));
|
||||
if (second == null) { Toast("You already use an upscaler: there is nothing to compare it with.", "error"); return; }
|
||||
}
|
||||
using var cts = benchCts = new CancellationTokenSource();
|
||||
var pic = new Saves(ctx).Newest(g) is { } newest ? SavePicUrl(newest) : null;
|
||||
var t0 = DateTime.UtcNow;
|
||||
void Running(string line) => Send(new JsonObject
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user