Skip to content

Commit

Permalink
im done lol
Browse files Browse the repository at this point in the history
  • Loading branch information
Szymekk44 committed May 5, 2024
1 parent a2b5825 commit 6f6317e
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions source/Cosmos.HAL2/Drivers/Video/SVGAII/VMWareSVGAII.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,31 +157,27 @@ public void Update(uint x, uint y, uint width, uint height)

/// <summary>
/// Update video memory.
/// </summary>
/// </summary>S
public void DoubleBufferUpdate()
{
videoMemory.MoveDown(FrameOffset, FrameSize, FrameSize);
Update(0, 0, width, height);
}

public void PartUpdate(uint x, uint y, uint Width, uint Height)
public void PartUpdate(uint x, uint y, uint UpdateWidth, uint UpdateHeight)
{
videoMemory.MoveDown(FrameOffset, FrameSize, FrameSize);
uint Offset = y * Width + x;
for (int i = 0; i < height; i++)
uint Offset = y * width + x;
for (uint i = 0; i < UpdateHeight; i++)
{
//videoMemory.MoveDown(FrameOffset, FrameSize, FrameSize);
// videoMemory.Copy(Offset, videoMemory, i * (int)width, (int)width);
// byte* xDest = (byte*)(Base + aDest);
// byte* xSrc = (byte*)(Base + aSrc);
// MemoryOperations.Copy(xDest, xSrc, (int)aCount);
videoMemory.MoveDown(FrameOffset + Offset, FrameSize + Offset, UpdateWidth);
Offset += UpdateHeight;

videoMemory.Copy((uint)(i * Width) + Offset, videoMemory.ToArray(), i * (int)width, (int)width);
}

Update(x, y, Width, Height);
Update(x, y, UpdateWidth*2, UpdateHeight);
}


/// <summary>
/// Set pixel.
/// </summary>
Expand Down

0 comments on commit 6f6317e

Please sign in to comment.