Changeset 76244 in vbox for trunk/src/VBox
- Timestamp:
- Dec 15, 2018 6:16:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp
r75811 r76244 1827 1827 return VERR_FILE_NOT_FOUND; 1828 1828 1829 BITMAPFILEHEADER bf; 1830 bf.bfType = 'MB'; 1831 bf.bfSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + cbBitmap; 1832 bf.bfReserved1 = 0; 1833 bf.bfReserved2 = 0; 1834 bf.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER); 1835 1836 BITMAPINFOHEADER bi; 1837 bi.biSize = sizeof(bi); 1838 bi.biWidth = w; 1839 bi.biHeight = -h; 1840 bi.biPlanes = 1; 1841 bi.biBitCount = 32; 1842 bi.biCompression = 0; 1843 bi.biSizeImage = cbBitmap; 1844 bi.biXPelsPerMeter = 0; 1845 bi.biYPelsPerMeter = 0; 1846 bi.biClrUsed = 0; 1847 bi.biClrImportant = 0; 1848 1849 fwrite(&bf, 1, sizeof(bf), f); 1850 fwrite(&bi, 1, sizeof(bi), f); 1829 if (cbPixel == 4) 1830 { 1831 BITMAPV4HEADER bh; 1832 RT_ZERO(bh); 1833 bh.bV4Size = sizeof(bh); 1834 bh.bV4Width = w; 1835 bh.bV4Height = -h; 1836 bh.bV4Planes = 1; 1837 bh.bV4BitCount = 32; 1838 bh.bV4V4Compression = BI_BITFIELDS; 1839 bh.bV4SizeImage = cbBitmap; 1840 bh.bV4XPelsPerMeter = 2835; 1841 bh.bV4YPelsPerMeter = 2835; 1842 // bh.bV4ClrUsed = 0; 1843 // bh.bV4ClrImportant = 0; 1844 bh.bV4RedMask = 0x00ff0000; 1845 bh.bV4GreenMask = 0x0000ff00; 1846 bh.bV4BlueMask = 0x000000ff; 1847 bh.bV4AlphaMask = 0xff000000; 1848 bh.bV4CSType = LCS_WINDOWS_COLOR_SPACE; 1849 // bh.bV4Endpoints = {0}; 1850 // bh.bV4GammaRed = 0; 1851 // bh.bV4GammaGreen = 0; 1852 // bh.bV4GammaBlue = 0; 1853 1854 BITMAPFILEHEADER bf; 1855 bf.bfType = 'MB'; 1856 bf.bfSize = sizeof(bf) + sizeof(bh) + cbBitmap; 1857 bf.bfReserved1 = 0; 1858 bf.bfReserved2 = 0; 1859 bf.bfOffBits = sizeof(bf) + sizeof(bh); 1860 1861 fwrite(&bf, 1, sizeof(bf), f); 1862 fwrite(&bh, 1, sizeof(bh), f); 1863 } 1864 else 1865 { 1866 BITMAPFILEHEADER bf; 1867 bf.bfType = 'MB'; 1868 bf.bfSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + cbBitmap; 1869 bf.bfReserved1 = 0; 1870 bf.bfReserved2 = 0; 1871 bf.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER); 1872 1873 BITMAPINFOHEADER bi; 1874 bi.biSize = sizeof(bi); 1875 bi.biWidth = w; 1876 bi.biHeight = -h; 1877 bi.biPlanes = 1; 1878 bi.biBitCount = 32; 1879 bi.biCompression = 0; 1880 bi.biSizeImage = cbBitmap; 1881 bi.biXPelsPerMeter = 0; 1882 bi.biYPelsPerMeter = 0; 1883 bi.biClrUsed = 0; 1884 bi.biClrImportant = 0; 1885 1886 fwrite(&bf, 1, sizeof(bf), f); 1887 fwrite(&bi, 1, sizeof(bi), f); 1888 } 1851 1889 1852 1890 if (cbPixel == 4)
Note:
See TracChangeset
for help on using the changeset viewer.