Allow queue of a redraw after gpose.

This commit is contained in:
Ottermandias 2021-08-19 17:40:58 +02:00
parent 3b12791ac8
commit bcc68d6684
2 changed files with 17 additions and 0 deletions

View file

@ -8,5 +8,7 @@ namespace Penumbra.Api
Unload, Unload,
RedrawWithoutSettings, RedrawWithoutSettings,
RedrawWithSettings, RedrawWithSettings,
AfterGPoseWithSettings,
AfterGPoseWithoutSettings,
} }
} }

View file

@ -246,6 +246,21 @@ namespace Penumbra.Interop
WriteInvisible( actor, idx ); WriteInvisible( actor, idx );
++_currentFrame; ++_currentFrame;
break;
case RedrawType.AfterGPoseWithSettings:
case RedrawType.AfterGPoseWithoutSettings:
if( _inGPose )
{
_actorIds.Enqueue( ( _currentActorId, _currentActorName!, _currentActorRedrawType ) );
_currentFrame = 0;
}
else
{
_currentActorRedrawType = _currentActorRedrawType == RedrawType.AfterGPoseWithSettings
? RedrawType.WithSettings
: RedrawType.WithoutSettings;
}
break; break;
default: throw new InvalidEnumArgumentException(); default: throw new InvalidEnumArgumentException();
} }