From ab53b72bf7067feb9dede0fd76b5a3cbc13863b9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 2 Jun 2015 15:55:48 +0000 Subject: - old PNG conversion code (png2dib, dib2png) removed; - m_png.h also removed; - all calls of LoadImage replaced with CallService(MS_IMG_LOAD); - four invalid CloseHandle() calls removed; - massive code cleaning for Popup, HistoryStats & SplashScreen plugins git-svn-id: http://svn.miranda-ng.org/main/trunk@13974 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Popup/src/popup_gdiplus.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'plugins/Popup/src/popup_gdiplus.cpp') diff --git a/plugins/Popup/src/popup_gdiplus.cpp b/plugins/Popup/src/popup_gdiplus.cpp index aeee9ecb03..d323654740 100644 --- a/plugins/Popup/src/popup_gdiplus.cpp +++ b/plugins/Popup/src/popup_gdiplus.cpp @@ -43,7 +43,8 @@ void LoadGDIPlus() if (g_gdiplusToken == 0) Gdiplus::GdiplusStartup(&g_gdiplusToken, &gdiplusStartupInput, NULL); } - __except (EXCEPTION_EXECUTE_HANDLER) { + __except (EXCEPTION_EXECUTE_HANDLER) + { gbGdiPlusLoaded = false; } } @@ -55,7 +56,8 @@ void UnloadGDIPlus() if (g_gdiplusToken && gbGdiPlusLoaded) Gdiplus::GdiplusShutdown(g_gdiplusToken); } - __except (EXCEPTION_EXECUTE_HANDLER) { + __except (EXCEPTION_EXECUTE_HANDLER) + { // do nothing } gbGdiPlusLoaded = true; @@ -87,12 +89,10 @@ HBITMAP SkinEngine_CreateDIB32(int cx, int cy) UINT *ptPixels; HBITMAP DirectBitmap = CreateDIBSection(NULL, &RGB32BitsBITMAPINFO, DIB_RGB_COLORS, (void **)&ptPixels, NULL, 0); - if ((DirectBitmap == NULL || ptPixels == NULL) && cx != 0 && cy != 0) - { + if ((DirectBitmap == NULL || ptPixels == NULL) && cx != 0 && cy != 0) { ; } - else - { + else { memset(ptPixels, 0, cx*cy * 4); } return DirectBitmap; @@ -172,9 +172,8 @@ void GDIPlus_ExtractAnimatedGIF(TCHAR *szName, int width, int height, HBITMAP &p int * delays = (int*)mir_alloc(nFrameCount*sizeof(int)); memset(delays, 0, nFrameCount*sizeof(int)); - for (int i = 1; i < nFrameCount + 1; i++) - { - GUID pageGuid = FrameDimensionTime; + for (int i = 1; i < nFrameCount + 1; i++) { + GUID pageGuid = FrameDimensionTime; RectF rect((float)(i - 1)*clipWidth, (float)0, (float)clipWidth, (float)clipHeight); graphics.DrawImage(&image, rect, (float)0, (float)0, (float)imWidth, (float)imHeight, UnitPixel, &attr, NULL, NULL); image.SelectActiveFrame(&pageGuid, i); -- cgit v1.2.3