Changeset 82098 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Nov 22, 2019 8:27:57 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp
r82095 r82098 28 28 #include <iprt/assert.h> 29 29 #include <iprt/mem.h> 30 #include <iprt/path.h> 30 31 31 32 #include <VBox/vmm/pgm.h> /* required by DevVGA.h */ … … 1798 1799 #endif /* VMSVGA3D_DIRECT3D */ 1799 1800 1801 #ifndef RT_OS_WINDOWS 1802 typedef uint16_t WORD; 1803 typedef uint32_t DWORD; 1804 typedef int32_t LONG; 1805 1806 #pragma pack(2) 1807 typedef struct 1808 { 1809 WORD bfType; 1810 DWORD bfSize; 1811 WORD bfReserved1; 1812 WORD bfReserved2; 1813 DWORD bfOffBits; 1814 } BITMAPFILEHEADER, *PBITMAPFILEHEADER, *LPBITMAPFILEHEADER; 1815 1816 typedef struct 1817 { 1818 DWORD biSize; 1819 LONG biWidth; 1820 LONG biHeight; 1821 WORD biPlanes; 1822 WORD biBitCount; 1823 DWORD biCompression; 1824 DWORD biSizeImage; 1825 LONG biXPelsPerMeter; 1826 LONG biYPelsPerMeter; 1827 DWORD biClrUsed; 1828 DWORD biClrImportant; 1829 } BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER; 1830 #pragma pack() 1831 #endif 1800 1832 1801 1833 static int vmsvga3dInfoBmpWrite(const char *pszFilename, const void *pvBits, int w, int h, uint32_t cbPixel, uint32_t u32Mask) 1802 1834 { 1803 #ifdef RT_OS_WINDOWS1804 1835 if ( cbPixel != 4 1805 1836 && cbPixel != 2 … … 1814 1845 return VERR_FILE_NOT_FOUND; 1815 1846 1847 #ifdef RT_OS_WINDOWS 1816 1848 if (cbPixel == 4) 1817 1849 { … … 1850 1882 } 1851 1883 else 1884 #endif 1852 1885 { 1853 1886 BITMAPFILEHEADER bf; 1854 bf.bfType = 'MB';1887 bf.bfType = 0x4D42; //'MB' 1855 1888 bf.bfSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + cbBitmap; 1856 1889 bf.bfReserved1 = 0; … … 1914 1947 1915 1948 return VINF_SUCCESS; 1916 #else /* !RT_OS_WINDOWS */1917 RT_NOREF6(pszFilename, pvBits, w, h, cbPixel, u32Mask);1918 return VERR_NOT_SUPPORTED;1919 #endif1920 1949 } 1921 1950 … … 1933 1962 char szFilepath[4096]; 1934 1963 RTStrPrintf(szFilepath, sizeof(szFilepath), 1935 "%s \\%s-%u-sid%u-%u%s.bmp",1964 "%s" RTPATH_SLASH_STR "%s-%u-sid%u-%u%s.bmp", 1936 1965 pszPath, pszNamePrefix, u32Seq, pSurface->id, i, pszNameSuffix); 1937 1966
Note:
See TracChangeset
for help on using the changeset viewer.