Skip to content

Commit

Permalink
VESA BIOS extensions: Do not list a linear framebuffer address if the…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
joncampbell123 committed Jan 12, 2025
1 parent c082b29 commit f9c17c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ints/int10_vesa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f9c17c0

Please sign in to comment.