Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Present() [2/3]

unsafe void Microsoft.Xna.Framework.Graphics.GraphicsDevice.Present ( Rectangle? sourceRectangle,
Rectangle? destinationRectangle,
IntPtr overrideWindowHandle )
inline

Definition at line 761 of file GraphicsDevice.cs.

762 {
763 tagRECT* ptr = null;
764 tagRECT* ptr2 = null;
765 Rectangle rectangle = default(Rectangle);
766 Rectangle rectangle2 = default(Rectangle);
767 if (sourceRectangle.HasValue)
768 {
769 rectangle = sourceRectangle.Value;
770 ptr = (tagRECT*)(int)(ref rectangle);
771 if (ptr != null)
772 {
773 *(int*)((byte*)ptr + 8) += *(int*)ptr;
774 *(int*)((byte*)ptr + 12) += *(int*)((byte*)ptr + 4);
775 }
776 }
777 if (destinationRectangle.HasValue)
778 {
779 rectangle2 = destinationRectangle.Value;
780 ptr2 = (tagRECT*)(int)(ref rectangle2);
781 if (ptr2 != null)
782 {
783 *(int*)((byte*)ptr2 + 8) += *(int*)ptr2;
784 *(int*)((byte*)ptr2 + 12) += *(int*)((byte*)ptr2 + 4);
785 }
786 }
787 Present(ptr, ptr2, (HWND__*)overrideWindowHandle.ToPointer());
788 }
unsafe void * ToPointer()
Definition IntPtr.cs:210

References Microsoft.Xna.Framework.Graphics.GraphicsDevice.Present(), and System.IntPtr.ToPointer().