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
December 2009
----- 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
3 participants
1233 discussions
Start a n
N
ew thread
Stefan Dösinger : wined3d: Rename conversion_count to something more appropriate.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: f90b8b63520462681f308633882212e8a9308897 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f90b8b63520462681f3086338…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Dec 23 15:37:42 2009 +0100 wined3d: Rename conversion_count to something more appropriate. --- dlls/wined3d/buffer.c | 6 +++--- dlls/wined3d/wined3d_private.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index b26f37d..20b40cb 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -735,10 +735,10 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) */ if (decl_changed) { - ++This->conversion_count; + ++This->decl_change_count; This->draw_count = 0; - if (This->conversion_count > VB_MAXDECLCHANGES) + if (This->decl_change_count > VB_MAXDECLCHANGES) { FIXME("Too many declaration changes, stopping converting\n"); @@ -763,7 +763,7 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) * decl changes and reset the decl change count after a specific number of them */ ++This->draw_count; - if (This->draw_count > VB_RESETDECLCHANGE) This->conversion_count = 0; + if (This->draw_count > VB_RESETDECLCHANGE) This->decl_change_count = 0; } if (decl_changed) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 489137c..386aea5 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2373,7 +2373,7 @@ struct wined3d_buffer LONG lock_count; /* conversion stuff */ - UINT conversion_count; + UINT decl_change_count; UINT draw_count; UINT stride; /* 0 if no conversion */ UINT conversion_stride; /* 0 if no shifted conversion */
1
0
0
0
Stefan Dösinger : wined3d: Remove the d3d7 do-not-convert code.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: d6b9732497ed7dd2d1d15da604490460562ce874 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d6b9732497ed7dd2d1d15da60…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Dec 23 14:23:27 2009 +0100 wined3d: Remove the d3d7 do-not-convert code. --- dlls/d3d8/vertexbuffer.c | 2 +- dlls/d3d9/vertexbuffer.c | 2 +- dlls/wined3d/device.c | 12 ------------ include/wine/wined3d.idl | 3 +-- 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/dlls/d3d8/vertexbuffer.c b/dlls/d3d8/vertexbuffer.c index 9a984f2..18cc7b3 100644 --- a/dlls/d3d8/vertexbuffer.c +++ b/dlls/d3d8/vertexbuffer.c @@ -272,7 +272,7 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer8Impl *buffer, IDirect3DDevice8Im wined3d_mutex_lock(); hr = IWineD3DDevice_CreateVertexBuffer(device->WineD3DDevice, size, - (usage & WINED3DUSAGE_MASK) | WINED3DUSAGE_OPTIMIZE, 0, + usage & WINED3DUSAGE_MASK, 0, (WINED3DPOOL)pool, &buffer->wineD3DVertexBuffer, (IUnknown *)buffer, &d3d8_vertexbuffer_wined3d_parent_ops); wined3d_mutex_unlock(); diff --git a/dlls/d3d9/vertexbuffer.c b/dlls/d3d9/vertexbuffer.c index 7ea394c..4eeb5c1 100644 --- a/dlls/d3d9/vertexbuffer.c +++ b/dlls/d3d9/vertexbuffer.c @@ -273,7 +273,7 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer9Impl *buffer, IDirect3DDevice9Im wined3d_mutex_lock(); hr = IWineD3DDevice_CreateVertexBuffer(device->WineD3DDevice, size, - (usage & WINED3DUSAGE_MASK) | WINED3DUSAGE_OPTIMIZE, 0, + usage & WINED3DUSAGE_MASK, 0, (WINED3DPOOL)pool, &buffer->wineD3DVertexBuffer, (IUnknown *)buffer, &d3d9_vertexbuffer_wined3d_parent_ops); wined3d_mutex_unlock(); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 31b3187..edc2409 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -486,7 +486,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *ifac IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; struct wined3d_buffer *object; HRESULT hr; - BOOL conv; if (Pool == WINED3DPOOL_SCRATCH) { @@ -525,16 +524,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *ifac * Basically converting the vertices in the buffer is quite expensive, and observations * show that drawStridedSlow is faster than converting + uploading + drawStridedFast. * Therefore do not create a VBO for WINED3DUSAGE_DYNAMIC buffers. - * - * Direct3D7 has another problem: Its vertexbuffer api doesn't offer a way to specify - * the range of vertices being locked, so each lock will require the whole buffer to be transformed. - * Moreover geometry data in dx7 is quite simple, so drawStridedSlow isn't a big hit. A plus - * is that the vertex buffers fvf can be trusted in dx7. So only create non-converted vbos for - * dx7 apps. - * There is a IDirect3DVertexBuffer7::Optimize call after which the buffer can't be locked any - * more. In this call we can convert dx7 buffers too. */ - conv = ((FVF & WINED3DFVF_POSITION_MASK) == WINED3DFVF_XYZRHW ) || (FVF & (WINED3DFVF_DIFFUSE | WINED3DFVF_SPECULAR)); if (!This->adapter->gl_info.supported[ARB_VERTEX_BUFFER_OBJECT]) { TRACE("Not creating a vbo because GL_ARB_vertex_buffer is not supported\n"); @@ -542,8 +532,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *ifac TRACE("Not creating a vbo because the vertex buffer is in system memory\n"); } else if(Usage & WINED3DUSAGE_DYNAMIC) { TRACE("Not creating a vbo because the buffer has dynamic usage\n"); - } else if(!(Usage & WINED3DUSAGE_OPTIMIZE) && conv) { - TRACE("Not creating a vbo because the fvf needs conversion, but VB optimization is disabled\n"); } else { object->flags |= WINED3D_BUFFER_CREATEBO; } diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl index 7196a98..ec69655 100644 --- a/include/wine/wined3d.idl +++ b/include/wine/wined3d.idl @@ -904,8 +904,7 @@ const UINT WINED3DUSAGE_DYNAMIC = 0x00000200; const UINT WINED3DUSAGE_AUTOGENMIPMAP = 0x00000400; const UINT WINED3DUSAGE_DMAP = 0x00004000; const UINT WINED3DUSAGE_MASK = 0x00004fff; -const UINT WINED3DUSAGE_STATICDECL = 0x20000000; -const UINT WINED3DUSAGE_OPTIMIZE = 0x40000000; +const UINT WINED3DUSAGE_STATICDECL = 0x40000000; const UINT WINED3DUSAGE_OVERLAY = 0x80000000; const UINT WINED3DUSAGE_QUERY_LEGACYBUMPMAP = 0x00008000;
1
0
0
0
Stefan Dösinger : wined3d: Use unload instead of duplicating buffer remove code.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: 1d37ae6f619a762b24d17475ac420f071241899d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1d37ae6f619a762b24d17475a…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Dec 17 18:32:41 2009 +0100 wined3d: Use unload instead of duplicating buffer remove code. --- dlls/wined3d/buffer.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index e24546c..b26f37d 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -742,12 +742,8 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface) { FIXME("Too many declaration changes, stopping converting\n"); - ENTER_GL(); - GL_EXTCALL(glDeleteBuffersARB(1, &This->buffer_object)); - checkGLcall("glDeleteBuffersARB"); - LEAVE_GL(); - This->buffer_object = 0; - HeapFree(GetProcessHeap(), 0, This->conversion_shift); + IWineD3DBuffer_UnLoad(iface); + This->flags &= ~WINED3D_BUFFER_CREATEBO; /* The stream source state handler might have read the memory of the vertex buffer already * and got the memory in the vbo which is not valid any longer. Dirtify the stream source
1
0
0
0
Stefan Dösinger : wined3d: Free buffer conversion info when freeing the buffer.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: 4590dc4806a3e74f1c2cfab6ed72d31282bd6168 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4590dc4806a3e74f1c2cfab6e…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Dec 23 14:15:49 2009 +0100 wined3d: Free buffer conversion info when freeing the buffer. --- dlls/wined3d/buffer.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index ff1ebd7..e24546c 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -622,6 +622,14 @@ static void STDMETHODCALLTYPE buffer_UnLoad(IWineD3DBuffer *iface) This->flags |= WINED3D_BUFFER_CREATEBO; /* Recreate the buffer object next load */ context_release(context); + + HeapFree(GetProcessHeap(), 0, This->conversion_shift); + This->conversion_shift = NULL; + HeapFree(GetProcessHeap(), 0, This->conversion_map); + This->conversion_map = NULL; + This->stride = 0; + This->conversion_stride = 0; + This->flags &= ~WINED3D_BUFFER_HASDESC; } }
1
0
0
0
Alexandre Julliard : version: Get rid of the 16-bit library loading code for builtins.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: b4679dc8fd6da339d732945dab86ef731559e688 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b4679dc8fd6da339d732945da…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 29 00:02:23 2009 +0100 version: Get rid of the 16-bit library loading code for builtins. We have fake dlls for everything now. --- dlls/version/info.c | 366 +++++++++++--------------------------------------- 1 files changed, 81 insertions(+), 285 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=b4679dc8fd6da339d7329…
1
0
0
0
Alexandre Julliard : user.exe: Reimplement CopyImage16 for cursors and icons.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: 593b97350168f0ad78c1963e77c6e4ccafb8190f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=593b97350168f0ad78c1963e7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 28 20:26:37 2009 +0100 user.exe: Reimplement CopyImage16 for cursors and icons. --- dlls/user.exe16/user.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/user.exe16/user.c b/dlls/user.exe16/user.c index b4a3b24..6b0f09a 100644 --- a/dlls/user.exe16/user.c +++ b/dlls/user.exe16/user.c @@ -2076,8 +2076,18 @@ HANDLE16 WINAPI LoadImage16(HINSTANCE16 hinst, LPCSTR name, UINT16 type, INT16 c HICON16 WINAPI CopyImage16(HANDLE16 hnd, UINT16 type, INT16 desiredx, INT16 desiredy, UINT16 flags) { - return HICON_16(CopyImage(HANDLE_32(hnd), (UINT)type, (INT)desiredx, - (INT)desiredy, (UINT)flags)); + if (flags & LR_COPYFROMRESOURCE) FIXME( "LR_COPYFROMRESOURCE not supported\n" ); + + switch (type) + { + case IMAGE_BITMAP: + return HBITMAP_16( CopyImage( HBITMAP_32(hnd), type, desiredx, desiredy, flags )); + case IMAGE_ICON: + case IMAGE_CURSOR: + return CopyIcon16( FarGetOwner16(hnd), hnd ); + default: + return 0; + } } /**********************************************************************
1
0
0
0
Alexandre Julliard : user.exe: Reimplement LoadImage16 for bitmaps instead of calling LoadImageA directly .
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: 2ced4102d4adf981fda0f084ebaa1c830e1405b4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2ced4102d4adf981fda0f084e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 28 20:18:30 2009 +0100 user.exe: Reimplement LoadImage16 for bitmaps instead of calling LoadImageA directly. --- dlls/user.exe16/user.c | 38 ++++++++++++++++++++++++++++++++------ 1 files changed, 32 insertions(+), 6 deletions(-) diff --git a/dlls/user.exe16/user.c b/dlls/user.exe16/user.c index 6c7ec7e..b4a3b24 100644 --- a/dlls/user.exe16/user.c +++ b/dlls/user.exe16/user.c @@ -43,7 +43,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(user); /* handle16 to handle conversions */ #define HANDLE_32(h16) ((HANDLE)(ULONG_PTR)(h16)) #define HGDIOBJ_32(h16) ((HGDIOBJ)(ULONG_PTR)(h16)) -#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16)) #define IS_MENU_STRING_ITEM(flags) \ (((flags) & (MF_STRING | MF_BITMAP | MF_OWNERDRAW | MF_SEPARATOR)) == MF_STRING) @@ -1063,7 +1062,7 @@ HICON16 WINAPI LoadIcon16(HINSTANCE16 hInstance, LPCSTR name) */ HBITMAP16 WINAPI LoadBitmap16(HINSTANCE16 hInstance, LPCSTR name) { - return HBITMAP_16(LoadBitmapA(HINSTANCE_32(hInstance), name)); + return LoadImage16( hInstance, name, IMAGE_BITMAP, 0, 0, 0 ); } /********************************************************************** @@ -1978,10 +1977,12 @@ DWORD WINAPI GetMenuContextHelpId16( HMENU16 hMenu ) /*********************************************************************** * LoadImage (USER.389) - * */ HANDLE16 WINAPI LoadImage16(HINSTANCE16 hinst, LPCSTR name, UINT16 type, INT16 cx, INT16 cy, UINT16 flags) { + HGLOBAL16 handle; + HRSRC16 hRsrc, hGroupRsrc; + if (!hinst || (flags & LR_LOADFROMFILE)) return HICON_16( LoadImageA( 0, name, type, cx, cy, flags )); @@ -2004,14 +2005,39 @@ HANDLE16 WINAPI LoadImage16(HINSTANCE16 hinst, LPCSTR name, UINT16 type, INT16 c switch (type) { case IMAGE_BITMAP: - return HBITMAP_16( LoadImageA( HINSTANCE_32(hinst), name, type, cx, cy, flags )); + { + HBITMAP ret = 0; + char *ptr; + static const WCHAR prefixW[] = {'b','m','p',0}; + WCHAR path[MAX_PATH], filename[MAX_PATH]; + HANDLE file; + + filename[0] = 0; + if (!(hRsrc = FindResource16( hinst, name, (LPCSTR)RT_BITMAP ))) return 0; + if (!(handle = LoadResource16( hinst, hRsrc ))) return 0; + if (!(ptr = LockResource16( handle ))) goto done; + + if (!GetTempPathW( MAX_PATH, path )) goto done; + if (!GetTempFileNameW( path, prefixW, 0, filename )) goto done; + + file = CreateFileW( filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0 ); + if (file != INVALID_HANDLE_VALUE) + { + DWORD written, size = SizeofResource16( hinst, hRsrc ); + BOOL ok = WriteFile( file, ptr, size, &written, NULL ) && (written == size); + CloseHandle( file ); + if (ok) ret = LoadImageW( 0, filename, IMAGE_BITMAP, cx, cy, flags | LR_LOADFROMFILE ); + } + done: + if (filename[0]) DeleteFileW( filename ); + FreeResource16( handle ); + return HBITMAP_16( ret ); + } case IMAGE_ICON: case IMAGE_CURSOR: { - HANDLE16 handle; HICON16 hIcon = 0; - HRSRC16 hRsrc, hGroupRsrc; BYTE *dir, *bits; INT id = 0;
1
0
0
0
Alexandre Julliard : user32: Move loading of static icons for 16-bit windows to the 16-bit wrapper.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: b96ab35cadc5c79825b65ca2c3e6f6a763388fb5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b96ab35cadc5c79825b65ca2c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 28 19:53:12 2009 +0100 user32: Move loading of static icons for 16-bit windows to the 16-bit wrapper. --- dlls/user.exe16/message.c | 27 +++++++++++ dlls/user32/static.c | 113 ++++++++++++++++---------------------------- 2 files changed, 68 insertions(+), 72 deletions(-) diff --git a/dlls/user.exe16/message.c b/dlls/user.exe16/message.c index b8a5190..7dccc5f 100644 --- a/dlls/user.exe16/message.c +++ b/dlls/user.exe16/message.c @@ -2594,6 +2594,33 @@ static LRESULT static_proc16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, { switch (msg) { + case WM_NCCREATE: + { + CREATESTRUCTA *cs = (CREATESTRUCTA *)lParam; + LRESULT ret = wow_handlers32.static_proc( hwnd, msg, wParam, lParam, unicode ); + + if (!ret) return 0; + if (((ULONG_PTR)cs->hInstance >> 16)) return ret; /* 32-bit instance, nothing to do */ + switch (cs->style & SS_TYPEMASK) + { + case SS_ICON: + { + HICON16 icon = LoadIcon16( HINSTANCE_16(cs->hInstance), cs->lpszName ); + if (!icon) icon = LoadCursor16( HINSTANCE_16(cs->hInstance), cs->lpszName ); + if (icon) wow_handlers32.static_proc( hwnd, STM_SETIMAGE, IMAGE_ICON, + (LPARAM)HICON_32(icon), FALSE ); + break; + } + case SS_BITMAP: + { + HBITMAP16 bitmap = LoadBitmap16( HINSTANCE_16(cs->hInstance), cs->lpszName ); + if (bitmap) wow_handlers32.static_proc( hwnd, STM_SETIMAGE, IMAGE_BITMAP, + (LPARAM)HBITMAP_32(bitmap), FALSE ); + break; + } + } + return ret; + } case STM_SETICON16: wParam = (WPARAM)HICON_32( (HICON16)wParam ); return wow_handlers32.static_proc( hwnd, STM_SETICON, wParam, lParam, FALSE ); diff --git a/dlls/user32/static.c b/dlls/user32/static.c index 2ed3b75..5386c84 100644 --- a/dlls/user32/static.c +++ b/dlls/user32/static.c @@ -256,23 +256,25 @@ static HANDLE STATIC_GetImage( HWND hwnd, WPARAM wParam, DWORD style ) * * Load the icon for an SS_ICON control. */ -static HICON STATIC_LoadIconA( HWND hwnd, LPCSTR name, DWORD style ) +static HICON STATIC_LoadIconA( HINSTANCE hInstance, LPCSTR name, DWORD style ) { - HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE ); - if ((style & SS_REALSIZEIMAGE) != 0) - { - return LoadImageA(hInstance, name, IMAGE_ICON, 0, 0, LR_SHARED); - } - else + HICON hicon; + + if (hInstance && ((ULONG_PTR)hInstance >> 16)) { - HICON hicon = LoadIconA( hInstance, name ); - if (!hicon) hicon = LoadCursorA( hInstance, name ); - if (!hicon) hicon = LoadIconA( 0, name ); - /* Windows doesn't try to load a standard cursor, - probably because most IDs for standard cursors conflict - with the IDs for standard icons anyway */ - return hicon; + if ((style & SS_REALSIZEIMAGE) != 0) + hicon = LoadImageA(hInstance, name, IMAGE_ICON, 0, 0, LR_SHARED); + else + { + hicon = LoadIconA( hInstance, name ); + if (!hicon) hicon = LoadCursorA( hInstance, name ); + } } + if (!hicon) hicon = LoadIconA( 0, name ); + /* Windows doesn't try to load a standard cursor, + probably because most IDs for standard cursors conflict + with the IDs for standard icons anyway */ + return hicon; } /*********************************************************************** @@ -280,47 +282,25 @@ static HICON STATIC_LoadIconA( HWND hwnd, LPCSTR name, DWORD style ) * * Load the icon for an SS_ICON control. */ -static HICON STATIC_LoadIconW( HWND hwnd, LPCWSTR name, DWORD style ) +static HICON STATIC_LoadIconW( HINSTANCE hInstance, LPCWSTR name, DWORD style ) { - HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE ); - if ((style & SS_REALSIZEIMAGE) != 0) - { - return LoadImageW(hInstance, name, IMAGE_ICON, 0, 0, LR_SHARED); - } - else + HICON hicon; + + if (hInstance && ((ULONG_PTR)hInstance >> 16)) { - HICON hicon = LoadIconW( hInstance, name ); - if (!hicon) hicon = LoadCursorW( hInstance, name ); - if (!hicon) hicon = LoadIconW( 0, name ); - /* Windows doesn't try to load a standard cursor, - probably because most IDs for standard cursors conflict - with the IDs for standard icons anyway */ - return hicon; + if ((style & SS_REALSIZEIMAGE) != 0) + hicon = LoadImageW(hInstance, name, IMAGE_ICON, 0, 0, LR_SHARED); + else + { + hicon = LoadIconW( hInstance, name ); + if (!hicon) hicon = LoadCursorW( hInstance, name ); + } } -} - -/*********************************************************************** - * STATIC_LoadBitmapA - * - * Load the bitmap for an SS_BITMAP control. - */ -static HBITMAP STATIC_LoadBitmapA( HWND hwnd, LPCSTR name ) -{ - HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE ); - /* Windows doesn't try to load OEM Bitmaps (hInstance == NULL) */ - return LoadBitmapA( hInstance, name ); -} - -/*********************************************************************** - * STATIC_LoadBitmapW - * - * Load the bitmap for an SS_BITMAP control. - */ -static HBITMAP STATIC_LoadBitmapW( HWND hwnd, LPCWSTR name ) -{ - HINSTANCE hInstance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE ); - /* Windows doesn't try to load OEM Bitmaps (hInstance == NULL) */ - return LoadBitmapW( hInstance, name ); + if (!hicon) hicon = LoadIconW( 0, name ); + /* Windows doesn't try to load a standard cursor, + probably because most IDs for standard cursors conflict + with the IDs for standard icons anyway */ + return hicon; } /*********************************************************************** @@ -471,42 +451,31 @@ LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam case WM_NCCREATE: { - LPCSTR textA; - LPCWSTR textW; - + CREATESTRUCTW *cs = (CREATESTRUCTW *)lParam; + if (full_style & SS_SUNKEN) SetWindowLongW( hwnd, GWL_EXSTYLE, GetWindowLongW( hwnd, GWL_EXSTYLE ) | WS_EX_STATICEDGE ); - if(unicode) - { - textA = NULL; - textW = ((LPCREATESTRUCTW)lParam)->lpszName; - } - else - { - textA = ((LPCREATESTRUCTA)lParam)->lpszName; - textW = NULL; - } - switch (style) { case SS_ICON: { HICON hIcon; - if(unicode) - hIcon = STATIC_LoadIconW(hwnd, textW, full_style); + if (unicode || IS_INTRESOURCE(cs->lpszName)) + hIcon = STATIC_LoadIconW(cs->hInstance, cs->lpszName, full_style); else - hIcon = STATIC_LoadIconA(hwnd, textA, full_style); + hIcon = STATIC_LoadIconA(cs->hInstance, (LPCSTR)cs->lpszName, full_style); STATIC_SetIcon(hwnd, hIcon, full_style); } break; case SS_BITMAP: + if ((ULONG_PTR)cs->hInstance >> 16) { HBITMAP hBitmap; - if(unicode) - hBitmap = STATIC_LoadBitmapW(hwnd, textW); + if (unicode || IS_INTRESOURCE(cs->lpszName)) + hBitmap = LoadBitmapW(cs->hInstance, cs->lpszName); else - hBitmap = STATIC_LoadBitmapA(hwnd, textA); + hBitmap = LoadBitmapA(cs->hInstance, (LPCSTR)cs->lpszName); STATIC_SetBitmap(hwnd, hBitmap, full_style); } break;
1
0
0
0
Alexandre Julliard : gdi32: Load the 32-bit gdi. exe module wrapper from the 32-bit side.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: fadc2cda1c107d41dd59d8f8215780e31c691f85 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fadc2cda1c107d41dd59d8f82…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 28 16:27:26 2009 +0100 gdi32: Load the 32-bit gdi.exe module wrapper from the 32-bit side. Get rid of the empty gdi_main.c file. --- dlls/gdi.exe16/gdi.c | 11 +++++++++++ dlls/gdi32/Makefile.in | 1 - dlls/gdi32/gdi_main.c | 38 -------------------------------------- dlls/gdi32/gdi_private.h | 1 - dlls/gdi32/gdiobj.c | 9 +++++++-- 5 files changed, 18 insertions(+), 42 deletions(-) diff --git a/dlls/gdi.exe16/gdi.c b/dlls/gdi.exe16/gdi.c index e62b711..59cec0f 100644 --- a/dlls/gdi.exe16/gdi.c +++ b/dlls/gdi.exe16/gdi.c @@ -428,6 +428,17 @@ static void free_segptr_bits( HBITMAP16 bmp ) } } + +/********************************************************************** + * DllMain + */ +BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) +{ + if (reason == DLL_PROCESS_ATTACH) LoadLibrary16( "gdi.exe" ); + return TRUE; +} + + /*********************************************************************** * SetBkColor (GDI.1) */ diff --git a/dlls/gdi32/Makefile.in b/dlls/gdi32/Makefile.in index 16ea5b4..18dbdef 100644 --- a/dlls/gdi32/Makefile.in +++ b/dlls/gdi32/Makefile.in @@ -27,7 +27,6 @@ C_SRCS = \ enhmfdrv/objects.c \ font.c \ freetype.c \ - gdi_main.c \ gdiobj.c \ icm.c \ mapping.c \ diff --git a/dlls/gdi32/gdi_main.c b/dlls/gdi32/gdi_main.c deleted file mode 100644 index b757ac0..0000000 --- a/dlls/gdi32/gdi_main.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * GDI initialization code - * - * Copyright 2000 Alexandre Julliard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include <stdarg.h> -#include <string.h> -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "wine/winbase16.h" -#include "gdi_private.h" - -/*********************************************************************** - * GDI initialisation routine - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID lpvReserved) -{ - if (reason != DLL_PROCESS_ATTACH) return TRUE; - DisableThreadLibraryCalls(hinstDLL); - LoadLibrary16( "gdi.exe" ); - return GDI_Init(); -} diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index d5f9112..de00eb4 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -438,7 +438,6 @@ extern BOOL WineEngRealizationInfo(GdiFont*, realization_info_t*) DECLSPEC_HIDDE extern BOOL WineEngRemoveFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN; /* gdiobj.c */ -extern BOOL GDI_Init(void) DECLSPEC_HIDDEN; extern HGDIOBJ alloc_gdi_handle( GDIOBJHDR *obj, WORD type, const struct gdi_obj_funcs *funcs ) DECLSPEC_HIDDEN; extern void *free_gdi_handle( HGDIOBJ handle ) DECLSPEC_HIDDEN; extern void *GDI_GetObjPtr( HGDIOBJ, WORD ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/gdiobj.c b/dlls/gdi32/gdiobj.c index d32450a..7d03792 100644 --- a/dlls/gdi32/gdiobj.c +++ b/dlls/gdi32/gdiobj.c @@ -565,16 +565,21 @@ BOOL GDI_dec_ref_count( HGDIOBJ handle ) /*********************************************************************** - * GDI_Init + * DllMain * * GDI initialization. */ -BOOL GDI_Init(void) +BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) { LOGFONTW default_gui_font; const struct DefaultFontInfo* deffonts; int i; + if (reason != DLL_PROCESS_ATTACH) return TRUE; + + DisableThreadLibraryCalls( inst ); + LoadLibraryA( "gdi.exe16" ); + WineEngInit(); /* create stock objects */
1
0
0
0
Alexandre Julliard : user32: Load the 32-bit user. exe module wrapper from the 32-bit side.
by Alexandre Julliard
29 Dec '09
29 Dec '09
Module: wine Branch: master Commit: 9ceda48337b15f017bc84707ef3250015e4b9459 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9ceda48337b15f017bc84707e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 28 16:24:54 2009 +0100 user32: Load the 32-bit user.exe module wrapper from the 32-bit side. --- dlls/user.exe16/user.c | 11 +++++++++++ dlls/user32/user_main.c | 5 ++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/dlls/user.exe16/user.c b/dlls/user.exe16/user.c index 6889088..6c7ec7e 100644 --- a/dlls/user.exe16/user.c +++ b/dlls/user.exe16/user.c @@ -387,6 +387,17 @@ static void free_clipboard_formats(void) } } + +/********************************************************************** + * DllMain + */ +BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) +{ + if (reason == DLL_PROCESS_ATTACH) LoadLibrary16( "user.exe" ); + return TRUE; +} + + /********************************************************************** * InitApp (USER.5) */ diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index 9440934..d076e67 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -29,7 +29,6 @@ #include "controls.h" #include "user_private.h" #include "win.h" -#include "wine/winbase16.h" #include "wine/unicode.h" #include "wine/debug.h" @@ -271,8 +270,6 @@ static void winstation_init(void) */ static BOOL process_attach(void) { - LoadLibrary16( "user.exe" ); - winstation_init(); /* Initialize system colors and metrics */ @@ -281,6 +278,8 @@ static BOOL process_attach(void) /* Setup palette function pointers */ palette_init(); + LoadLibraryA( "user.exe16" ); + /* Initialize built-in window classes */ CLASS_RegisterBuiltinClasses();
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
...
124
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
Results per page:
10
25
50
100
200