winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
770 discussions
Start a n
N
ew thread
Jörg Höhle : winmm: Fix memory leak in msacm error path.
by Alexandre Julliard
05 Aug '11
05 Aug '11
Module: wine Branch: master Commit: 961683704bd13194b22e34147fcdad885bdf241f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=961683704bd13194b22e34147…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Wed Jul 27 23:44:09 2011 +0200 winmm: Fix memory leak in msacm error path. --- dlls/winmm/waveform.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c index 72eec27..160395c 100644 --- a/dlls/winmm/waveform.c +++ b/dlls/winmm/waveform.c @@ -1195,6 +1195,7 @@ static LRESULT WINMM_PrepareHeader(HWAVE hwave, WAVEHDR *header) mr = acmStreamPrepareHeader(device->acm_handle, ash, 0); if(mr != MMSYSERR_NOERROR){ + HeapFree(GetProcessHeap(), 0, ash); LeaveCriticalSection(&device->lock); return mr; }
1
0
0
0
Jörg Höhle : winmm: Assign to structs instead of using memcpy.
by Alexandre Julliard
05 Aug '11
05 Aug '11
Module: wine Branch: master Commit: 7fed738353c201c59e4befa0b891e72c6340956f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7fed738353c201c59e4befa0b…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Wed Jul 27 23:44:09 2011 +0200 winmm: Assign to structs instead of using memcpy. --- dlls/winmm/waveform.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c index d1c685e..72eec27 100644 --- a/dlls/winmm/waveform.c +++ b/dlls/winmm/waveform.c @@ -1445,7 +1445,7 @@ static void WOD_PushData(WINMM_Device *device) device->played_frames += avail_frames; exit: - memcpy(&cb_info, &device->cb_info, sizeof(cb_info)); + cb_info = device->cb_info; LeaveCriticalSection(&device->lock); @@ -1625,7 +1625,7 @@ static void WID_PullData(WINMM_Device *device) } exit: - memcpy(&cb_info, &device->cb_info, sizeof(cb_info)); + cb_info = device->cb_info; LeaveCriticalSection(&device->lock); @@ -1718,7 +1718,7 @@ static LRESULT WINMM_Reset(HWAVE hwave) device->loop_counter = 0; device->last_clock_pos = 0; - memcpy(&cb_info, &device->cb_info, sizeof(cb_info)); + cb_info = device->cb_info; LeaveCriticalSection(&device->lock); @@ -2367,7 +2367,7 @@ UINT WINAPI waveOutClose(HWAVEOUT hWaveOut) if(!WINMM_ValidateAndLock(device)) return MMSYSERR_INVALHANDLE; - memcpy(&cb_info, &device->cb_info, sizeof(cb_info)); + cb_info = device->cb_info; LeaveCriticalSection(&device->lock); @@ -3015,7 +3015,7 @@ UINT WINAPI waveInClose(HWAVEIN hWaveIn) if(!WINMM_ValidateAndLock(device)) return MMSYSERR_INVALHANDLE; - memcpy(&cb_info, &device->cb_info, sizeof(cb_info)); + cb_info = device->cb_info; LeaveCriticalSection(&device->lock); @@ -3169,7 +3169,7 @@ UINT WINAPI waveInStop(HWAVEIN hWaveIn) }else buf = NULL; - memcpy(&cb_info, &device->cb_info, sizeof(cb_info)); + cb_info = device->cb_info; LeaveCriticalSection(&device->lock);
1
0
0
0
Jörg Höhle : winmm: Replace one HeapAlloc with stack allocation.
by Alexandre Julliard
05 Aug '11
05 Aug '11
Module: wine Branch: master Commit: 710d2004274deecba33b85c6bb4651006f1c54c1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=710d2004274deecba33b85c6b…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Wed Jul 27 23:44:09 2011 +0200 winmm: Replace one HeapAlloc with stack allocation. --- dlls/winmm/waveform.c | 12 ++---------- 1 files changed, 2 insertions(+), 10 deletions(-) diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c index 918364b..d1c685e 100644 --- a/dlls/winmm/waveform.c +++ b/dlls/winmm/waveform.c @@ -820,7 +820,7 @@ static MMRESULT WINMM_MapDevice(WINMM_OpenInfo *info, BOOL is_out) static LRESULT WINMM_OpenDevice(WINMM_Device *device, WINMM_MMDevice *mmdevice, WINMM_OpenInfo *info) { - WAVEFORMATEX *closer_fmt = NULL, *passed_fmt; + WAVEFORMATEX *closer_fmt = NULL, fmt, *passed_fmt; LRESULT ret = MMSYSERR_ERROR; HRESULT hr; @@ -843,7 +843,7 @@ static LRESULT WINMM_OpenDevice(WINMM_Device *device, WINMM_MMDevice *mmdevice, if(info->format->wFormatTag == WAVE_FORMAT_PCM){ /* we aren't guaranteed that the struct in lpFormat is a full * WAVEFORMATEX struct, which IAC::IsFormatSupported requires */ - passed_fmt = HeapAlloc(GetProcessHeap(), 0, sizeof(WAVEFORMATEX)); + passed_fmt = &fmt; memcpy(passed_fmt, info->format, sizeof(PCMWAVEFORMAT)); passed_fmt->cbSize = 0; }else @@ -854,20 +854,14 @@ static LRESULT WINMM_OpenDevice(WINMM_Device *device, WINMM_MMDevice *mmdevice, if(closer_fmt) CoTaskMemFree(closer_fmt); if(FAILED(hr) && hr != AUDCLNT_E_UNSUPPORTED_FORMAT){ - if(info->format->wFormatTag == WAVE_FORMAT_PCM) - HeapFree(GetProcessHeap(), 0, passed_fmt); ERR("IsFormatSupported failed: %08x\n", hr); goto error; } if(hr == S_FALSE || hr == AUDCLNT_E_UNSUPPORTED_FORMAT){ - if(info->format->wFormatTag == WAVE_FORMAT_PCM) - HeapFree(GetProcessHeap(), 0, passed_fmt); ret = WAVERR_BADFORMAT; goto error; } if(info->flags & WAVE_FORMAT_QUERY){ - if(info->format->wFormatTag == WAVE_FORMAT_PCM) - HeapFree(GetProcessHeap(), 0, passed_fmt); ret = MMSYSERR_NOERROR; goto error; } @@ -876,8 +870,6 @@ static LRESULT WINMM_OpenDevice(WINMM_Device *device, WINMM_MMDevice *mmdevice, hr = IAudioClient_Initialize(device->client, AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST, 10 * 100000, 50000, passed_fmt, &device->parent->session); - if(info->format->wFormatTag == WAVE_FORMAT_PCM) - HeapFree(GetProcessHeap(), 0, passed_fmt); if(FAILED(hr)){ ERR("Initialize failed: %08x\n", hr); goto error;
1
0
0
0
Jacek Caban : mshtml: Fixed nsAString handling in navigate_anchor.
by Alexandre Julliard
05 Aug '11
05 Aug '11
Module: wine Branch: master Commit: 88f9fcf1f42c2c03dbf3e5ea9c71ed9ed3f7ea5d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=88f9fcf1f42c2c03dbf3e5ea9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Aug 5 10:20:08 2011 +0200 mshtml: Fixed nsAString handling in navigate_anchor. --- dlls/mshtml/htmlanchor.c | 43 ++++++++++++++++++++++--------------------- 1 files changed, 22 insertions(+), 21 deletions(-) diff --git a/dlls/mshtml/htmlanchor.c b/dlls/mshtml/htmlanchor.c index 9bf74b2..c369ed5 100644 --- a/dlls/mshtml/htmlanchor.c +++ b/dlls/mshtml/htmlanchor.c @@ -44,36 +44,37 @@ typedef struct { static HRESULT navigate_anchor(HTMLAnchorElement *This) { nsAString href_str, target_str; - const PRUnichar *href, *target; nsresult nsres; HRESULT hres; + nsAString_Init(&target_str, NULL); nsres = nsIDOMHTMLAnchorElement_GetTarget(This->nsanchor, &target_str); - if(NS_FAILED(nsres)) - return E_FAIL; - - nsAString_GetData(&target_str, &target); - if(*target) { - FIXME("Navigating to target %s is not implemented\n", debugstr_w(target)); - nsAString_Finish(&target_str); - return S_OK; + if(NS_SUCCEEDED(nsres)) { + const PRUnichar *target; + + nsAString_GetData(&target_str, &target); + if(*target) { + FIXME("Navigating to target %s is not implemented\n", debugstr_w(target)); + nsAString_Finish(&target_str); + return S_OK; + } } - nsAString_Finish(&target_str); + nsAString_Init(&href_str, NULL); nsres = nsIDOMHTMLAnchorElement_GetHref(This->nsanchor, &href_str); - if(NS_FAILED(nsres)) - return E_FAIL; + if(NS_SUCCEEDED(nsres)) { + const PRUnichar *href; - nsAString_GetData(&href_str, &href); - if(*href) { - HTMLWindow *window = This->element.node.doc->basedoc.window; - hres = navigate_url(window, href, window->url); - }else { - TRACE("empty href\n"); - hres = S_OK; + nsAString_GetData(&href_str, &href); + if(*href) { + HTMLWindow *window = This->element.node.doc->basedoc.window; + hres = navigate_url(window, href, window->url); + }else { + TRACE("empty href\n"); + hres = S_OK; + } } - nsAString_Finish(&href_str); return hres; }
1
0
0
0
Francois Gouget : shell32: Make SHELL_CreateContextMenu() static.
by Alexandre Julliard
05 Aug '11
05 Aug '11
Module: wine Branch: master Commit: a61145f2849857571367dab0359449fe80c09e77 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a61145f2849857571367dab03…
Author: Francois Gouget <fgouget(a)free.fr> Date: Fri Aug 5 09:56:41 2011 +0200 shell32: Make SHELL_CreateContextMenu() static. --- dlls/shell32/shlmenu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/shell32/shlmenu.c b/dlls/shell32/shlmenu.c index b37d526..4006807 100644 --- a/dlls/shell32/shlmenu.c +++ b/dlls/shell32/shlmenu.c @@ -1246,7 +1246,7 @@ static const IContextMenu3Vtbl CompositeCMenuVtbl= CompositeCMenu_HandleMenuMsg2 }; -HRESULT SHELL_CreateContextMenu(HWND hwnd, IContextMenu* system_menu, +static HRESULT SHELL_CreateContextMenu(HWND hwnd, IContextMenu* system_menu, IShellFolder *folder, LPCITEMIDLIST folder_pidl, LPCITEMIDLIST *apidl, UINT cidl, const HKEY *aKeys, UINT cKeys,REFIID riid, void** ppv)
1
0
0
0
Francois Gouget : shell32: Remove WINAPI on static functions where not needed.
by Alexandre Julliard
05 Aug '11
05 Aug '11
Module: wine Branch: master Commit: 319f3b7d6d74fb3c1922ab7efb3614b0edf53956 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=319f3b7d6d74fb3c1922ab7ef…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Aug 5 09:56:34 2011 +0200 shell32: Remove WINAPI on static functions where not needed. --- dlls/shell32/shlmenu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/shell32/shlmenu.c b/dlls/shell32/shlmenu.c index eb68939..b37d526 100644 --- a/dlls/shell32/shlmenu.c +++ b/dlls/shell32/shlmenu.c @@ -1088,7 +1088,7 @@ static ULONG WINAPI CompositeCMenu_Release(IContextMenu3 *iface) return 0; } -static UINT WINAPI CompositeCMenu_GetIndexForCommandId(CompositeCMenu *This,UINT id) +static UINT CompositeCMenu_GetIndexForCommandId(CompositeCMenu *This,UINT id) { UINT low=0; UINT high=This->menu_count;
1
0
0
0
Francois Gouget : kernel32: Implement K32GetProcessImageFileNameA().
by Alexandre Julliard
05 Aug '11
05 Aug '11
Module: wine Branch: master Commit: 3b239dbc62b6bb73126c987ccd080a8911df064a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3b239dbc62b6bb73126c987cc…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Aug 5 09:56:26 2011 +0200 kernel32: Implement K32GetProcessImageFileNameA(). --- dlls/kernel32/process.c | 3 +-- dlls/psapi/tests/psapi_main.c | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 9bc5070..b0eba7c 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -3479,8 +3479,7 @@ cleanup: */ DWORD WINAPI K32GetProcessImageFileNameA( HANDLE process, LPSTR file, DWORD size ) { - FIXME("(%p, %p, %d) stub\n", process, file, size ); - return 0; + return QueryFullProcessImageNameA(process, PROCESS_NAME_NATIVE, file, &size) ? size : 0; } /*********************************************************************** diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c index b855250..c4c129b 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c @@ -222,15 +222,15 @@ static void test_GetProcessImageFileName(void) SetLastError(0xdeadbeef); pGetProcessImageFileNameA(NULL, szImgPath, sizeof(szImgPath)); - todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError()); SetLastError(0xdeadbeef); pGetProcessImageFileNameA(hpSR, szImgPath, sizeof(szImgPath)); - todo_wine ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError()); SetLastError(0xdeadbeef); pGetProcessImageFileNameA(hpQI, szImgPath, 0); - todo_wine ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %d\n", GetLastError()); ret = pGetProcessImageFileNameA(hpQI, szImgPath, sizeof(szImgPath)); ret1 = pGetMappedFileNameA(hpQV, hMod, szMapPath, sizeof(szMapPath));
1
0
0
0
Alexandre Julliard : gdi32: Always use BI_BITFIELDS for 16-bpp in GetImage.
by Alexandre Julliard
05 Aug '11
05 Aug '11
Module: wine Branch: master Commit: 3a1194edd7f3c289a2b901bf5ddee65d1119dca3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3a1194edd7f3c289a2b901bf5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Aug 5 12:33:58 2011 +0200 gdi32: Always use BI_BITFIELDS for 16-bpp in GetImage. --- dlls/gdi32/bitmap.c | 8 ++++++++ dlls/gdi32/dibdrv/dc.c | 23 ++++++++--------------- dlls/winex11.drv/bitblt.c | 3 +-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dlls/gdi32/bitmap.c b/dlls/gdi32/bitmap.c index 69b09ad..8117d6d 100644 --- a/dlls/gdi32/bitmap.c +++ b/dlls/gdi32/bitmap.c @@ -67,6 +67,14 @@ DWORD nulldrv_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, info->bmiHeader.biYPelsPerMeter = 0; info->bmiHeader.biClrUsed = 0; info->bmiHeader.biClrImportant = 0; + if (bmp->bitmap.bmBitsPixel == 16) + { + DWORD *masks = (DWORD *)info->bmiColors; + masks[0] = 0x7c00; + masks[1] = 0x03e0; + masks[2] = 0x001f; + info->bmiHeader.biCompression = BI_BITFIELDS; + } if (!bits) goto done; height = src->visrect.bottom - src->visrect.top; diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index 17b2966..b5f4f2b 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -339,6 +339,8 @@ static BOOL dibdrv_DeleteDC( PHYSDEV dev ) static void set_color_info( const dib_info *dib, BITMAPINFO *info ) { + DWORD *masks = (DWORD *)info->bmiColors; + info->bmiHeader.biCompression = BI_RGB; info->bmiHeader.biClrUsed = 0; @@ -355,19 +357,14 @@ static void set_color_info( const dib_info *dib, BITMAPINFO *info ) } break; case 16: - if (dib->funcs != &funcs_555) - { - DWORD *masks = (DWORD *)info->bmiColors; - masks[0] = dib->red_mask; - masks[1] = dib->green_mask; - masks[2] = dib->blue_mask; - info->bmiHeader.biCompression = BI_BITFIELDS; - } + masks[0] = dib->red_mask; + masks[1] = dib->green_mask; + masks[2] = dib->blue_mask; + info->bmiHeader.biCompression = BI_BITFIELDS; break; case 32: if (dib->funcs != &funcs_8888) { - DWORD *masks = (DWORD *)info->bmiColors; masks[0] = dib->red_mask; masks[1] = dib->green_mask; masks[2] = dib->blue_mask; @@ -417,12 +414,8 @@ static DWORD dibdrv_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, } break; case 16: - if (bmp->dib->dsBmih.biCompression == BI_BITFIELDS && - memcmp( bmp->dib->dsBitfields, bit_fields_555, sizeof(bmp->dib->dsBitfields) )) - { - info->bmiHeader.biCompression = BI_BITFIELDS; - memcpy( info->bmiColors, bmp->dib->dsBitfields, sizeof(bmp->dib->dsBitfields) ); - } + info->bmiHeader.biCompression = BI_BITFIELDS; + memcpy( info->bmiColors, bmp->dib->dsBitfields, sizeof(bmp->dib->dsBitfields) ); break; case 32: if (bmp->dib->dsBmih.biCompression == BI_BITFIELDS && diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index 8d2383a..7f314c2 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1641,8 +1641,7 @@ static void set_color_info( PHYSDEV dev, const ColorShifts *color_shifts, BITMAP colors[0] = color_shifts->logicalRed.max << color_shifts->logicalRed.shift; colors[1] = color_shifts->logicalGreen.max << color_shifts->logicalGreen.shift; colors[2] = color_shifts->logicalBlue.max << color_shifts->logicalBlue.shift; - if (colors[0] != 0x7c00 || colors[1] != 0x03e0 || colors[2] != 0x001f) - info->bmiHeader.biCompression = BI_BITFIELDS; + info->bmiHeader.biCompression = BI_BITFIELDS; break; case 32: colors[0] = color_shifts->logicalRed.max << color_shifts->logicalRed.shift;
1
0
0
0
Alexandre Julliard : gdi32: Always set compression to BI_BITFIELDS for 16-bpp DIB sections.
by Alexandre Julliard
05 Aug '11
05 Aug '11
Module: wine Branch: master Commit: c668354cc0d66f8f8a73fa1c302aad41c36eb869 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c668354cc0d66f8f8a73fa1c3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Aug 5 12:30:10 2011 +0200 gdi32: Always set compression to BI_BITFIELDS for 16-bpp DIB sections. --- dlls/gdi32/dib.c | 9 ++------- dlls/gdi32/tests/dib.c | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c index 79d339b..ebc6fe4 100644 --- a/dlls/gdi32/dib.c +++ b/dlls/gdi32/dib.c @@ -1221,15 +1221,9 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage, dib->dsBmih.biClrUsed = 1 << info->bmiHeader.biBitCount; /* set dsBitfields values */ - dib->dsBitfields[0] = dib->dsBitfields[1] = dib->dsBitfields[2] = 0; - if (info->bmiHeader.biBitCount == 16 && info->bmiHeader.biCompression == BI_RGB) { - /* In this case Windows changes biCompression to BI_BITFIELDS, - however for now we won't do this, as there are a lot - of places where BI_BITFIELDS is currently unsupported. */ - - /* dib->dsBmih.biCompression = compression = BI_BITFIELDS;*/ + dib->dsBmih.biCompression = BI_BITFIELDS; dib->dsBitfields[0] = 0x7c00; dib->dsBitfields[1] = 0x03e0; dib->dsBitfields[2] = 0x001f; @@ -1241,6 +1235,7 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage, dib->dsBitfields[2] = *((const DWORD *)bmi->bmiColors + 2); if (!dib->dsBitfields[0] || !dib->dsBitfields[1] || !dib->dsBitfields[2]) goto error; } + else dib->dsBitfields[0] = dib->dsBitfields[1] = dib->dsBitfields[2] = 0; /* get storage location for DIB bits */ diff --git a/dlls/gdi32/tests/dib.c b/dlls/gdi32/tests/dib.c index 69f241c..a1c9d27 100644 --- a/dlls/gdi32/tests/dib.c +++ b/dlls/gdi32/tests/dib.c @@ -1125,7 +1125,6 @@ static void test_simple_graphics(void) ok(ds.dsBitfields[0] == 0x7c00, "got %08x\n", ds.dsBitfields[0]); ok(ds.dsBitfields[1] == 0x03e0, "got %08x\n", ds.dsBitfields[1]); ok(ds.dsBitfields[2] == 0x001f, "got %08x\n", ds.dsBitfields[2]); -todo_wine ok(ds.dsBmih.biCompression == BI_BITFIELDS, "got %x\n", ds.dsBmih.biCompression); orig_bm = SelectObject(mem_dc, dib);
1
0
0
0
Alexandre Julliard : gdi32: Validate the DIB parameters in functions that take a BITMAPINFO.
by Alexandre Julliard
05 Aug '11
05 Aug '11
Module: wine Branch: master Commit: cf4c565fd28361475f532a169fe8b0a3c31d7e54 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cf4c565fd28361475f532a169…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Aug 5 12:12:42 2011 +0200 gdi32: Validate the DIB parameters in functions that take a BITMAPINFO. --- dlls/gdi32/dib.c | 88 +++++++++++------ dlls/gdi32/tests/bitmap.c | 236 ++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 281 insertions(+), 43 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=cf4c565fd28361475f532…
1
0
0
0
← Newer
1
...
52
53
54
55
56
57
58
...
77
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Results per page:
10
25
50
100
200