- Timestamp:
- Dec 24, 2020 10:09:55 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 142004
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r87105 r87118 824 824 } 825 825 826 # ifdef SOME_UNUSED_FUNCTION827 /* Calculate line width in pixels based on bit depth and pitch. */828 static uint32_t calc_line_width(uint16_t bpp, uint32_t pitch)829 {830 uint32_t width;831 832 if (bpp <= 4)833 width = pitch << 1;834 else835 width = pitch / ((bpp + 7) >> 3);836 837 return width;838 }839 # endif840 841 826 static void recalculate_data(PVGASTATE pThis) 842 827 { … … 849 834 if (!cbLinePitch) 850 835 cbLinePitch = calc_line_pitch(cBPP, cX); 851 Assert(cbLinePitch != 0); 836 if (!cbLinePitch) 837 return; 852 838 uint32_t cVirtHeight = pThis->vram_size / cbLinePitch; 853 839 uint16_t offX = pThis->vbe_regs[VBE_DISPI_INDEX_X_OFFSET]; … … 6863 6849 if (reqSize >= pThis->vram_size) 6864 6850 continue; 6851 if (!reqSize) 6852 continue; 6865 6853 if ( mode_info_list[i].info.XResolution > maxBiosXRes 6866 6854 || mode_info_list[i].info.YResolution > maxBiosYRes) … … 6924 6912 { 6925 6913 AssertMsgFailed(("Configuration error: Invalid mode data '%s' for '%s'! cBits=%d\n", pszExtraData, szExtraDataKey, cBits)); 6914 return VERR_VGA_INVALID_CUSTOM_MODE; 6915 } 6916 if (!cx || !cy) 6917 { 6918 AssertMsgFailed(("Configuration error: Invalid mode data '%s' for '%s'! cx=%u, cy=%u\n", pszExtraData, szExtraDataKey, cx, cy)); 6926 6919 return VERR_VGA_INVALID_CUSTOM_MODE; 6927 6920 }
Note:
See TracChangeset
for help on using the changeset viewer.