From 1d4c82315785aa0d61216483bae4a2511d303bea Mon Sep 17 00:00:00 2001 From: mataes2007 Date: Thu, 2 Jun 2011 12:56:17 +0000 Subject: fixed sounds playing fixed random splash cosmetic fix git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@136 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- splashscreen/src/bitmap_funcs.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'splashscreen/src/bitmap_funcs.cpp') diff --git a/splashscreen/src/bitmap_funcs.cpp b/splashscreen/src/bitmap_funcs.cpp index 20a1427..09ded3a 100644 --- a/splashscreen/src/bitmap_funcs.cpp +++ b/splashscreen/src/bitmap_funcs.cpp @@ -203,7 +203,7 @@ bool MyBitmap::loadFromFile(TCHAR *fn, TCHAR *fnAlpha) if (!png2dibConvertor) { return false; } - + if ((hFile = CreateFile(fn, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL)) != INVALID_HANDLE_VALUE) if ((hMap = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL)) != NULL) if ((ppMap = (BYTE*)MapViewOfFile( hMap, FILE_MAP_READ, 0, 0, 0 )) != NULL) @@ -214,7 +214,7 @@ bool MyBitmap::loadFromFile(TCHAR *fn, TCHAR *fnAlpha) param.pSource = ppMap; param.cbSourceSize = cbFileSize; param.pResult = &pDib; - + if (png2dibConvertor((char*)param.pSource, param.cbSourceSize, param.pResult)) pDibBits = (BYTE*)(pDib+1); else @@ -303,7 +303,7 @@ bool MyBitmap::loadFromFile(TCHAR *fn, TCHAR *fnAlpha) MyBitmap alpha; if (fnAlpha && alpha.loadFromFile(fnAlpha) && - (alpha.getWidth() == width) && + (alpha.getWidth() == width) && (alpha.getHeight() == height) ) { for (int i = 0; i < width*height; i++) @@ -326,12 +326,12 @@ void MyBitmap::allocate(int w, int h) BITMAPINFO bi; - bi.bmiHeader.biSize = sizeof(bi.bmiHeader); - bi.bmiHeader.biWidth = w; - bi.bmiHeader.biHeight = -h; - bi.bmiHeader.biPlanes = 1; - bi.bmiHeader.biBitCount = 32; - bi.bmiHeader.biCompression = BI_RGB; + bi.bmiHeader.biSize = sizeof(bi.bmiHeader); + bi.bmiHeader.biWidth = w; + bi.bmiHeader.biHeight = -h; + bi.bmiHeader.biPlanes = 1; + bi.bmiHeader.biBitCount = 32; + bi.bmiHeader.biCompression = BI_RGB; if (dcBmp) { @@ -339,9 +339,9 @@ void MyBitmap::allocate(int w, int h) DeleteDC(dcBmp); } - hBmp = (HBITMAP)CreateDIBSection(0, &bi, DIB_RGB_COLORS, (void **)&bits, 0, 0); - dcBmp = CreateCompatibleDC(0); - hBmpSave = (HBITMAP)SelectObject(dcBmp, hBmp); + hBmp = (HBITMAP)CreateDIBSection(0, &bi, DIB_RGB_COLORS, (void **)&bits, 0, 0); + dcBmp = CreateCompatibleDC(0); + hBmpSave = (HBITMAP)SelectObject(dcBmp, hBmp); } void MyBitmap::free() -- cgit v1.2.3