BitsPerPixel = pFbInfo->BitsPerPixel;\r
HorizontalResolution = pFbInfo->HorizontalResolution;\r
VerticalResolution = pFbInfo->VerticalResolution;\r
- BytesPerScanLine = HorizontalResolution * (BitsPerPixel / 8);\r
+ BytesPerScanLine = pFbInfo->BytesPerScanLine;\r
\r
ModeBuffer = (FB_VIDEO_MODE_DATA *) AllocatePool (\r
ModeNumber * sizeof (FB_VIDEO_MODE_DATA)\r