Commit c61bc9f4 authored by Rafaël Carré's avatar Rafaël Carré

atmo: revert rename of BITMAPFILEHEADER

vlc headers don't declare it
This should perhaps be changed but that requires special look to atmo
code since this plugins mixes cross-platform and windows code, and vlc
and undocumented standalone compilation
parent a67afb66
......@@ -59,8 +59,8 @@ typedef unsigned long DWORD;
#define BI_RGB 0L
#if !defined(_VLC_BITMAPFILEHEADER_)
#define _VLC_BITMAPFILEHEADER_
#if !defined(_BITMAPFILEHEADER_)
#define _BITMAPFILEHEADER_
typedef struct
#ifdef HAVE_ATTRIBUTE_PACKED
__attribute__((__packed__))
......@@ -71,7 +71,7 @@ typedef struct
uint16_t bfReserved1;
uint16_t bfReserved2;
uint32_t bfOffBits;
} VLC_BITMAPFILEHEADER, *VLC_LPBITMAPFILEHEADER, *VLC_PBITMAPFILEHEADER;
} BITMAPFILEHEADER, *LPBITMAPFILEHEADER, *PBITMAPFILEHEADER;
#endif
#endif
......
......@@ -192,7 +192,7 @@ int CAtmoZoneDefinition::LoadGradientFromBitmap(char *pszBitmap)
// into m_basicWeight or use the GREEN value of a 24bit image!
// channel of a true color bitmap!
VLC_BITMAPINFO bmpInfo;
VLC_BITMAPFILEHEADER bmpFileHeader;
BITMAPFILEHEADER bmpFileHeader;
/*
ATMO_LOAD_GRADIENT_FILENOTFOND
......@@ -206,7 +206,7 @@ int CAtmoZoneDefinition::LoadGradientFromBitmap(char *pszBitmap)
if(!bmp)
return ATMO_LOAD_GRADIENT_FILENOTFOND;
if(fread(&bmpFileHeader, sizeof(VLC_BITMAPFILEHEADER), 1, bmp) != 1)
if(fread(&bmpFileHeader, sizeof(BITMAPFILEHEADER), 1, bmp) != 1)
{
fclose(bmp);
return ATMO_LOAD_GRADIENT_FAILED_SIZE;
......
......@@ -2193,7 +2193,7 @@ void SaveBitmap(filter_sys_t *p_sys, uint8_t *p_pixels, char *psz_filename)
{
/* for debug out only used*/
VLC_BITMAPINFO bmp_info;
VLC_BITMAPFILEHEADER bmp_fileheader;
BITMAPFILEHEADER bmp_fileheader;
FILE *fp_bitmap;
memset(&bmp_info, 0, sizeof(VLC_BITMAPINFO));
......@@ -2208,17 +2208,17 @@ void SaveBitmap(filter_sys_t *p_sys, uint8_t *p_pixels, char *psz_filename)
bmp_fileheader.bfReserved1 = 0;
bmp_fileheader.bfReserved2 = 0;
bmp_fileheader.bfSize = sizeof(VLC_BITMAPFILEHEADER) +
bmp_fileheader.bfSize = sizeof(BITMAPFILEHEADER) +
sizeof(VLC_BITMAPINFOHEADER) +
bmp_info.bmiHeader.biSizeImage;
bmp_fileheader.bfType = VLC_TWOCC('B','M');
bmp_fileheader.bfOffBits = sizeof(VLC_BITMAPFILEHEADER) +
bmp_fileheader.bfOffBits = sizeof(BITMAPFILEHEADER) +
sizeof(VLC_BITMAPINFOHEADER);
fp_bitmap = fopen(psz_filename,"wb");
if( fp_bitmap != NULL)
{
fwrite(&bmp_fileheader, sizeof(VLC_BITMAPFILEHEADER), 1, fp_bitmap);
fwrite(&bmp_fileheader, sizeof(BITMAPFILEHEADER), 1, fp_bitmap);
fwrite(&bmp_info.bmiHeader, sizeof(VLC_BITMAPINFOHEADER), 1, fp_bitmap);
fwrite(p_pixels, bmp_info.bmiHeader.biSizeImage, 1, fp_bitmap);
fclose(fp_bitmap);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment