From f9c17c092c5fbd5967decb91bfb5f456c39ab873 Mon Sep 17 00:00:00 2001 From: Jonathan Campbell Date: Sun, 12 Jan 2025 12:00:44 -0800 Subject: [PATCH] VESA BIOS extensions: Do not list a linear framebuffer address if the ModeAttributes does not say there is an LFB. Specifically, do not indicate a LFB for 4bpp planar modes and do not list a linear framebuffer address for 4bpp modes --- src/ints/int10_vesa.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ints/int10_vesa.cpp b/src/ints/int10_vesa.cpp index 71356fa4922..517a2c8a34e 100644 --- a/src/ints/int10_vesa.cpp +++ b/src/ints/int10_vesa.cpp @@ -504,7 +504,8 @@ uint8_t VESA_GetSVGAModeInformation(uint16_t mode,uint16_t seg,uint16_t off) { } } - if (!int10.vesa_nolfb && !int10.vesa_oldvbe) var_write(&minfo.PhysBasePtr,S3_LFB_BASE + adj + (hack_lfb_yadjust*(long)host_readw((HostPt)(&minfo.BytesPerScanLine)))); + if (!int10.vesa_nolfb && !int10.vesa_oldvbe && (modeAttributes&0x80)/*ModeAttributes indicates an LFB*/) + var_write(&minfo.PhysBasePtr,S3_LFB_BASE + adj + (hack_lfb_yadjust*(long)host_readw((HostPt)(&minfo.BytesPerScanLine)))); MEM_BlockWrite(buf,&minfo,sizeof(MODE_INFO)); return VESA_SUCCESS;