mirror of
https://github.com/Caraxi/mare.client.git
synced 2026-02-15 16:07:41 +01:00
rework cache creation conditions
This commit is contained in:
parent
3a481f606b
commit
17ae9633e8
11 changed files with 264 additions and 271 deletions
|
|
@ -461,15 +461,18 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
|||
{
|
||||
if (!_clientState.IsLoggedIn) return;
|
||||
|
||||
if (ct == null)
|
||||
ct = CancellationToken.None;
|
||||
|
||||
const int tick = 250;
|
||||
int curWaitTime = 0;
|
||||
try
|
||||
{
|
||||
logger.LogTrace("[{redrawId}] Starting wait for {handler} to draw", redrawId, handler);
|
||||
await Task.Delay(tick).ConfigureAwait(true);
|
||||
await Task.Delay(tick, ct.Value).ConfigureAwait(true);
|
||||
curWaitTime += tick;
|
||||
|
||||
while ((!ct?.IsCancellationRequested ?? true)
|
||||
while ((!ct.Value.IsCancellationRequested)
|
||||
&& curWaitTime < timeOut
|
||||
&& await handler.IsBeingDrawnRunOnFrameworkAsync().ConfigureAwait(false)) // 0b100000000000 is "still rendering" or something
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue