mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-06 08:12:14 +00:00
bpp is not always 4!
This commit is contained in:
parent
2f2cd626e3
commit
32ee02c6d4
1 changed files with 1 additions and 1 deletions
|
|
@ -84,7 +84,7 @@ namespace Cosmos.HAL.Drivers
|
||||||
|
|
||||||
var ModeInfo = VBE.getModeInfo();
|
var ModeInfo = VBE.getModeInfo();
|
||||||
|
|
||||||
if ((ModeInfo.pitch / 4) == ModeInfo.width) //linear framebuffer detection
|
if ((ModeInfo.pitch / (bpp / 8)) == ModeInfo.width) //linear framebuffer detection
|
||||||
{
|
{
|
||||||
IO.LinearFrameBuffer = new MemoryBlock(VBE.getLfbOffset(), (uint)xres * yres * (uint)(bpp / 8));
|
IO.LinearFrameBuffer = new MemoryBlock(VBE.getLfbOffset(), (uint)xres * yres * (uint)(bpp / 8));
|
||||||
lastbuffer = new ManagedMemoryBlock((uint)xres * yres * (uint)(bpp / 8));
|
lastbuffer = new ManagedMemoryBlock((uint)xres * yres * (uint)(bpp / 8));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue