Declare variable at the beginning of routine
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
parent
9e264e5327
commit
757ab280f7
@ -54,6 +54,8 @@ HlDrawPixel(IN ULONG PositionX,
|
|||||||
IN ULONG PositionY,
|
IN ULONG PositionY,
|
||||||
IN ULONG Color)
|
IN ULONG Color)
|
||||||
{
|
{
|
||||||
|
SIZE_T FrameBufferIndex;
|
||||||
|
|
||||||
/* Make sure frame buffer is already initialized */
|
/* Make sure frame buffer is already initialized */
|
||||||
if(HlpFrameBufferData.Initialized == FALSE)
|
if(HlpFrameBufferData.Initialized == FALSE)
|
||||||
{
|
{
|
||||||
@ -69,7 +71,7 @@ HlDrawPixel(IN ULONG PositionX,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Calculate the index of the pixel in the frame buffer memory using the provided x and y coordinates */
|
/* Calculate the index of the pixel in the frame buffer memory using the provided x and y coordinates */
|
||||||
SIZE_T FrameBufferIndex = PositionY * HlpFrameBufferData.PixelsPerScanLine + PositionX;
|
FrameBufferIndex = PositionY * HlpFrameBufferData.PixelsPerScanLine + PositionX;
|
||||||
|
|
||||||
/* Set the color of the pixel by writing to the corresponding memory location */
|
/* Set the color of the pixel by writing to the corresponding memory location */
|
||||||
HlpFrameBufferData.Address[FrameBufferIndex] = Color;
|
HlpFrameBufferData.Address[FrameBufferIndex] = Color;
|
||||||
|
Loading…
Reference in New Issue
Block a user