LR_CREATEDIBSECTION breaks modern.bmp so we must disallow TopDown CheckBitmaps
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7085 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
40451b29d7
commit
7a6c9e52b0
2 changed files with 2 additions and 2 deletions
|
@ -1342,7 +1342,7 @@ static INT_PTR CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
||||||
|
|
||||||
hTreeItems=(HTREEITEM*)GlobalAlloc(GPTR,sizeof(HTREEITEM)*num_sections);
|
hTreeItems=(HTREEITEM*)GlobalAlloc(GPTR,sizeof(HTREEITEM)*num_sections);
|
||||||
|
|
||||||
hBMcheck1=LoadImage(g_hInstance, MAKEINTRESOURCE(IDB_BITMAP1), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION); // LR_CREATEDIBSECTION required to load TopDown bitmaps
|
hBMcheck1=LoadImage(g_hInstance, MAKEINTRESOURCE(IDB_BITMAP1), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); // LR_CREATEDIBSECTION required to load TopDown bitmaps but that breaks modern.bmp
|
||||||
|
|
||||||
last_selected_tree_item=-1;
|
last_selected_tree_item=-1;
|
||||||
oldTreeWndProc=(WNDPROC)SetWindowLongPtr(hwndTree1,GWLP_WNDPROC,(LONG_PTR)newTreeWndProc);
|
oldTreeWndProc=(WNDPROC)SetWindowLongPtr(hwndTree1,GWLP_WNDPROC,(LONG_PTR)newTreeWndProc);
|
||||||
|
|
|
@ -146,7 +146,7 @@ int update_bitmap(CResourceEditor* re, WORD id, const TCHAR* filename, int width
|
||||||
signed char hdr[14+124], retval = -2;
|
signed char hdr[14+124], retval = -2;
|
||||||
size_t size = fread(hdr, 1, sizeof(hdr), f);
|
size_t size = fread(hdr, 1, sizeof(hdr), f);
|
||||||
GENERICIMAGEINFO info;
|
GENERICIMAGEINFO info;
|
||||||
if (IsBMPFile(hdr, size, &info) && 0 == fseek(f, 0, SEEK_SET))
|
if (IsBMPFile(hdr, size, &info) && 0 == fseek(f, 0, SEEK_SET) && info.Height == info.RawHeight)
|
||||||
{
|
{
|
||||||
if ((width && width != (int) info.Width) || (height && height != (int) info.Height))
|
if ((width && width != (int) info.Width) || (height && height != (int) info.Height))
|
||||||
retval = -3;
|
retval = -3;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue