mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-11 05:57:21 +01:00
add 250ms delay to wait for chara redraw
This commit is contained in:
parent
0d5e470138
commit
8d44d15c9b
1 changed files with 4 additions and 3 deletions
|
|
@ -461,12 +461,13 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||||
{
|
{
|
||||||
if (!_clientState.IsLoggedIn) return;
|
if (!_clientState.IsLoggedIn) return;
|
||||||
|
|
||||||
logger.LogTrace("[{redrawId}] Starting wait for {handler} to draw", redrawId, handler);
|
|
||||||
|
|
||||||
const int tick = 250;
|
const int tick = 250;
|
||||||
int curWaitTime = 0;
|
int curWaitTime = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
logger.LogTrace("[{redrawId}] Starting wait for {handler} to draw", redrawId, handler);
|
||||||
|
await Task.Delay(tick).ConfigureAwait(true);
|
||||||
|
|
||||||
while ((!ct?.IsCancellationRequested ?? true)
|
while ((!ct?.IsCancellationRequested ?? true)
|
||||||
&& curWaitTime < timeOut
|
&& curWaitTime < timeOut
|
||||||
&& await handler.IsBeingDrawnRunOnFrameworkAsync().ConfigureAwait(false)) // 0b100000000000 is "still rendering" or something
|
&& await handler.IsBeingDrawnRunOnFrameworkAsync().ConfigureAwait(false)) // 0b100000000000 is "still rendering" or something
|
||||||
|
|
@ -731,7 +732,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
||||||
Mediator.Publish(new DalamudLogoutMessage());
|
Mediator.Publish(new DalamudLogoutMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_gameConfig != null
|
if (_gameConfig != null
|
||||||
&& _gameConfig.TryGet(Dalamud.Game.Config.SystemConfigOption.LodType_DX11, out bool lodEnabled))
|
&& _gameConfig.TryGet(Dalamud.Game.Config.SystemConfigOption.LodType_DX11, out bool lodEnabled))
|
||||||
{
|
{
|
||||||
IsLodEnabled = lodEnabled;
|
IsLodEnabled = lodEnabled;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue