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
November 2016
----- 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
465 discussions
Start a n
N
ew thread
Józef Kucia : wined3d: Pass context to delete_gl_buffer().
by Alexandre Julliard
02 Nov '16
02 Nov '16
Module: wine Branch: master Commit: 20eb55fdefa9f0b7a0864dce3b4a12b132dba651 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=20eb55fdefa9f0b7a0864dce3…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Nov 2 10:55:34 2016 +0100 wined3d: Pass context to delete_gl_buffer(). Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/buffer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 70c718c..179f66c 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -138,9 +138,10 @@ static void buffer_bind(struct wined3d_buffer *buffer, struct wined3d_context *c GL_EXTCALL(glBindBuffer(buffer->buffer_type_hint, buffer->buffer_object)); } -/* Context activation is done by the caller */ -static void delete_gl_buffer(struct wined3d_buffer *This, const struct wined3d_gl_info *gl_info) +/* Context activation is done by the caller. */ +static void delete_gl_buffer(struct wined3d_buffer *This, const struct wined3d_context *context) { + const struct wined3d_gl_info *gl_info = context->gl_info; struct wined3d_resource *resource = &This->resource; if(!This->buffer_object) return; @@ -256,7 +257,7 @@ fail: /* Clean up all BO init, but continue because we can work without a BO :-) */ ERR("Failed to create a buffer object. Continuing, but performance issues may occur.\n"); buffer->flags &= ~WINED3D_BUFFER_USE_BO; - delete_gl_buffer(buffer, gl_info); + delete_gl_buffer(buffer, context); buffer_clear_dirty_areas(buffer); return FALSE; } @@ -662,7 +663,7 @@ static void buffer_unload(struct wined3d_resource *resource) buffer->flags &= ~WINED3D_BUFFER_DOUBLEBUFFER; wined3d_buffer_invalidate_location(buffer, WINED3D_LOCATION_BUFFER); - delete_gl_buffer(buffer, context->gl_info); + delete_gl_buffer(buffer, context); buffer_clear_dirty_areas(buffer); context_release(context); @@ -691,7 +692,7 @@ static void wined3d_buffer_destroy_object(void *object) if (buffer->buffer_object) { context = context_acquire(buffer->resource.device, NULL); - delete_gl_buffer(buffer, context->gl_info); + delete_gl_buffer(buffer, context); context_release(context); HeapFree(GetProcessHeap(), 0, buffer->conversion_map);
1
0
0
0
Józef Kucia : wined3d: Invalidate device state based on buffer bind flags when buffer is deleted.
by Alexandre Julliard
02 Nov '16
02 Nov '16
Module: wine Branch: master Commit: cc35b6c8b3896a2020dc45db3aab61673f7c7268 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cc35b6c8b3896a2020dc45db3…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Nov 2 10:55:33 2016 +0100 wined3d: Invalidate device state based on buffer bind flags when buffer is deleted. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/buffer.c | 32 +++++++++++++++++--------------- dlls/wined3d/wined3d_private.h | 1 + 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index c9493c7..70c718c 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -141,12 +141,27 @@ static void buffer_bind(struct wined3d_buffer *buffer, struct wined3d_context *c /* Context activation is done by the caller */ static void delete_gl_buffer(struct wined3d_buffer *This, const struct wined3d_gl_info *gl_info) { + struct wined3d_resource *resource = &This->resource; + if(!This->buffer_object) return; GL_EXTCALL(glDeleteBuffers(1, &This->buffer_object)); checkGLcall("glDeleteBuffers"); This->buffer_object = 0; + /* 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 to force a reload. This + * happens only once per changed vertexbuffer and should occur rather + * rarely. */ + if (resource->bind_count) + { + if (This->bind_flags & WINED3D_BIND_VERTEX_BUFFER) + device_invalidate_state(resource->device, STATE_STREAMSRC); + if (This->bind_flags & WINED3D_BIND_INDEX_BUFFER) + device_invalidate_state(resource->device, STATE_INDEXBUFFER); + } + if(This->query) { wined3d_event_query_destroy(This->query); @@ -637,10 +652,9 @@ static void buffer_unload(struct wined3d_resource *resource) if (buffer->buffer_object) { - struct wined3d_device *device = resource->device; struct wined3d_context *context; - context = context_acquire(device, NULL); + context = context_acquire(resource->device, NULL); /* Download the buffer, but don't permanently enable double buffering. */ wined3d_buffer_load_location(buffer, context, WINED3D_LOCATION_SYSMEM); @@ -658,19 +672,6 @@ static void buffer_unload(struct wined3d_resource *resource) buffer->stride = 0; buffer->conversion_stride = 0; buffer->flags &= ~WINED3D_BUFFER_HASDESC; - - /* 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 to force a reload. This - * happens only once per changed vertexbuffer and should occur rather - * rarely. */ - if (resource->bind_count) - { - device_invalidate_state(device, STATE_STREAMSRC); - - if (buffer->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER) - device_invalidate_state(device, STATE_INDEXBUFFER); - } } resource_unload(resource); @@ -1453,6 +1454,7 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device return hr; } buffer->buffer_type_hint = buffer_type_hint_from_bind_flags(bind_flags); + buffer->bind_flags = bind_flags; buffer->locations = WINED3D_LOCATION_SYSMEM; TRACE("buffer %p, size %#x, usage %#x, format %s, memory @ %p.\n", diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index c56558d..19b650e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3158,6 +3158,7 @@ struct wined3d_buffer GLuint buffer_object; GLenum buffer_object_usage; GLenum buffer_type_hint; + unsigned int bind_flags; DWORD flags; void *map_ptr;
1
0
0
0
Józef Kucia : wined3d: Compute "buffer_type_hint" from buffer bind flags.
by Alexandre Julliard
02 Nov '16
02 Nov '16
Module: wine Branch: master Commit: e3c692151f9199d7e37b2c788daa629d0c2c1b3b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e3c692151f9199d7e37b2c788…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Nov 2 10:55:32 2016 +0100 wined3d: Compute "buffer_type_hint" from buffer bind flags. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/buffer.c | 31 +++++++++++++++++++++++-------- include/wine/wined3d.h | 9 +++++++++ 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 13953c9..c9493c7 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -1410,14 +1410,28 @@ static const struct wined3d_resource_ops buffer_resource_ops = buffer_resource_sub_resource_unmap, }; +static GLenum buffer_type_hint_from_bind_flags(unsigned int bind_flags) +{ + if (bind_flags == WINED3D_BIND_INDEX_BUFFER) + return GL_ELEMENT_ARRAY_BUFFER; + + if (bind_flags & WINED3D_BIND_CONSTANT_BUFFER) + return GL_UNIFORM_BUFFER; + + if (bind_flags & ~(WINED3D_BIND_VERTEX_BUFFER | WINED3D_BIND_INDEX_BUFFER)) + FIXME("Unhandled bind flags %#x.\n", bind_flags); + + return GL_ARRAY_BUFFER; +} + static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device *device, - UINT size, DWORD usage, enum wined3d_format_id format_id, enum wined3d_pool pool, GLenum bind_hint, + UINT size, DWORD usage, enum wined3d_format_id format_id, enum wined3d_pool pool, unsigned int bind_flags, const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; const struct wined3d_format *format = wined3d_get_format(gl_info, format_id); - HRESULT hr; BOOL dynamic_buffer_ok; + HRESULT hr; if (!size) { @@ -1438,11 +1452,12 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device WARN("Failed to initialize resource, hr %#x.\n", hr); return hr; } - buffer->buffer_type_hint = bind_hint; + buffer->buffer_type_hint = buffer_type_hint_from_bind_flags(bind_flags); buffer->locations = WINED3D_LOCATION_SYSMEM; - TRACE("size %#x, usage %#x, format %s, memory @ %p, iface @ %p.\n", buffer->resource.size, buffer->resource.usage, - debug_d3dformat(buffer->resource.format->id), buffer->resource.heap_memory, buffer); + TRACE("buffer %p, size %#x, usage %#x, format %s, memory @ %p.\n", + buffer, buffer->resource.size, buffer->resource.usage, + debug_d3dformat(buffer->resource.format->id), buffer->resource.heap_memory); if (device->create_parms.flags & WINED3DCREATE_SOFTWARE_VERTEXPROCESSING || pool == WINED3D_POOL_MANAGED) { @@ -1509,7 +1524,7 @@ HRESULT CDECL wined3d_buffer_create(struct wined3d_device *device, const struct FIXME("Ignoring access flags (pool).\n"); hr = buffer_init(object, device, desc->byte_width, desc->usage, WINED3DFMT_UNKNOWN, - WINED3D_POOL_MANAGED, GL_ARRAY_BUFFER_ARB, data, parent, parent_ops); + WINED3D_POOL_MANAGED, desc->bind_flags, data, parent, parent_ops); if (FAILED(hr)) { WARN("Failed to initialize buffer, hr %#x.\n", hr); @@ -1551,7 +1566,7 @@ HRESULT CDECL wined3d_buffer_create_vb(struct wined3d_device *device, UINT size, } hr = buffer_init(object, device, size, usage, WINED3DFMT_VERTEXDATA, - pool, GL_ARRAY_BUFFER_ARB, NULL, parent, parent_ops); + pool, WINED3D_BIND_VERTEX_BUFFER, NULL, parent, parent_ops); if (FAILED(hr)) { WARN("Failed to initialize buffer, hr %#x.\n", hr); @@ -1582,7 +1597,7 @@ HRESULT CDECL wined3d_buffer_create_ib(struct wined3d_device *device, UINT size, } hr = buffer_init(object, device, size, usage | WINED3DUSAGE_STATICDECL, - WINED3DFMT_UNKNOWN, pool, GL_ELEMENT_ARRAY_BUFFER_ARB, NULL, + WINED3DFMT_UNKNOWN, pool, WINED3D_BIND_INDEX_BUFFER, NULL, parent, parent_ops); if (FAILED(hr)) { diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index e42ef77..9d234d6 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -834,6 +834,15 @@ enum wined3d_display_rotation #define WINED3DDP_MAXTEXCOORD 8 +#define WINED3D_BIND_VERTEX_BUFFER 0x00000001 +#define WINED3D_BIND_INDEX_BUFFER 0x00000002 +#define WINED3D_BIND_CONSTANT_BUFFER 0x00000004 +#define WINED3D_BIND_SHADER_RESOURCE 0x00000008 +#define WINED3D_BIND_STREAM_OUTPUT 0x00000010 +#define WINED3D_BIND_RENDER_TARGET 0x00000020 +#define WINED3D_BIND_DEPTH_STENCIL 0x00000040 +#define WINED3D_BIND_UNORDERED_ACCESS 0x00000080 + #define WINED3DUSAGE_RENDERTARGET 0x00000001 #define WINED3DUSAGE_DEPTHSTENCIL 0x00000002 #define WINED3DUSAGE_WRITEONLY 0x00000008
1
0
0
0
Carlo Bramini : wordpad: Fix syntax error in resource files ( native Windows build).
by Alexandre Julliard
01 Nov '16
01 Nov '16
Module: wine Branch: master Commit: d38c0c3b7c8e309d868ce608047448868b5ab4a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d38c0c3b7c8e309d868ce6080…
Author: Carlo Bramini <carlo.bramix(a)libero.it> Date: Tue Nov 1 18:07:55 2016 +0100 wordpad: Fix syntax error in resource files (native Windows build). Signed-off-by: Carlo Bramini <carlo_bramini(a)users.sourceforge.net> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/wordpad/wordpad.rc | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/programs/wordpad/wordpad.rc b/programs/wordpad/wordpad.rc index 368d169..10df516 100644 --- a/programs/wordpad/wordpad.rc +++ b/programs/wordpad/wordpad.rc @@ -90,8 +90,8 @@ BEGIN MENUITEM "Roman numerals - lower case", ID_LCROMAN MENUITEM "Roman numerals - upper case", ID_UCROMAN END - MENUITEM "&Paragraph...", ID_PARAFORMAT - MENUITEM "&Tabs...", ID_TABSTOPS + MENUITEM "&Paragraph...", ID_PARAFORMAT + MENUITEM "&Tabs...", ID_TABSTOPS POPUP "Backgroun&d" BEGIN MENUITEM "&System\tCtrl+1", ID_BACK_1 @@ -112,8 +112,8 @@ BEGIN MENUITEM "&Copy", ID_EDIT_COPY MENUITEM "&Paste", ID_EDIT_PASTE MENUITEM SEPARATOR - MENUITEM "&Bullet points" ID_BULLET - MENUITEM "&Paragraph..." ID_PARAFORMAT + MENUITEM "&Bullet points", ID_BULLET + MENUITEM "&Paragraph...", ID_PARAFORMAT END END @@ -124,20 +124,20 @@ BEGIN MENUITEM "Black", ID_COLOR_BLACK MENUITEM "Maroon", ID_COLOR_MAROON MENUITEM "Green", ID_COLOR_GREEN - MENUITEM "Olive" ID_COLOR_OLIVE - MENUITEM "Navy" ID_COLOR_NAVY - MENUITEM "Purple" ID_COLOR_PURPLE - MENUITEM "Teal" ID_COLOR_TEAL - MENUITEM "Gray" ID_COLOR_GRAY - MENUITEM "Silver" ID_COLOR_SILVER - MENUITEM "Red" ID_COLOR_RED - MENUITEM "Lime" ID_COLOR_LIME - MENUITEM "Yellow" ID_COLOR_YELLOW - MENUITEM "Blue" ID_COLOR_BLUE - MENUITEM "Fuchsia" ID_COLOR_FUCHSIA - MENUITEM "Aqua" ID_COLOR_AQUA - MENUITEM "White" ID_COLOR_WHITE - MENUITEM "Automatic" ID_COLOR_AUTOMATIC + MENUITEM "Olive", ID_COLOR_OLIVE + MENUITEM "Navy", ID_COLOR_NAVY + MENUITEM "Purple", ID_COLOR_PURPLE + MENUITEM "Teal", ID_COLOR_TEAL + MENUITEM "Gray", ID_COLOR_GRAY + MENUITEM "Silver", ID_COLOR_SILVER + MENUITEM "Red", ID_COLOR_RED + MENUITEM "Lime", ID_COLOR_LIME + MENUITEM "Yellow", ID_COLOR_YELLOW + MENUITEM "Blue", ID_COLOR_BLUE + MENUITEM "Fuchsia", ID_COLOR_FUCHSIA + MENUITEM "Aqua", ID_COLOR_AQUA + MENUITEM "White", ID_COLOR_WHITE + MENUITEM "Automatic", ID_COLOR_AUTOMATIC END END
1
0
0
0
Alistair Leslie-Hughes : dpnet: Implement IDirectPlay8LobbyClient Initialize.
by Alexandre Julliard
01 Nov '16
01 Nov '16
Module: wine Branch: master Commit: 5183ebd8ab31cd3d65716d76621e579d5ddd3dec URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5183ebd8ab31cd3d65716d766…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Fri Oct 28 07:07:32 2016 +0000 dpnet: Implement IDirectPlay8LobbyClient Initialize. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dpnet/client.c | 15 +++++++++++++-- dlls/dpnet/tests/client.c | 5 ++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/dlls/dpnet/client.c b/dlls/dpnet/client.c index f6f9e79..36df50d 100644 --- a/dlls/dpnet/client.c +++ b/dlls/dpnet/client.c @@ -40,6 +40,10 @@ typedef struct IDirectPlay8LobbyClientImpl { IDirectPlay8LobbyClient IDirectPlay8LobbyClient_iface; LONG ref; + + PFNDPNMESSAGEHANDLER msghandler; + DWORD flags; + void *usercontext; } IDirectPlay8LobbyClientImpl; static inline IDirectPlay8LobbyClientImpl *impl_from_IDirectPlay8LobbyClient(IDirectPlay8LobbyClient *iface) @@ -427,9 +431,16 @@ static HRESULT WINAPI lobbyclient_Initialize(IDirectPlay8LobbyClient *iface, voi { IDirectPlay8LobbyClientImpl *This = impl_from_IDirectPlay8LobbyClient(iface); - FIXME("(%p)->(%p %p 0x%08x)\n", This, context, msghandler, flags); + TRACE("(%p):(%p,%p,%x)\n", This, context, msghandler, flags); - return E_NOTIMPL; + if(!msghandler) + return E_POINTER; + + This->usercontext = context; + This->msghandler = msghandler; + This->flags = flags; + + return DPN_OK; } static HRESULT WINAPI lobbyclient_EnumLocalPrograms(IDirectPlay8LobbyClient *iface, GUID* guidapplication, diff --git a/dlls/dpnet/tests/client.c b/dlls/dpnet/tests/client.c index f7d6c53..6732034 100644 --- a/dlls/dpnet/tests/client.c +++ b/dlls/dpnet/tests/client.c @@ -220,8 +220,11 @@ static void test_lobbyclient(void) ok(hr == S_OK, "Failed to create object\n"); if(SUCCEEDED(hr)) { + hr = IDirectPlay8LobbyClient_Initialize(client, NULL, NULL, 0); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + hr = IDirectPlay8LobbyClient_Initialize(client, NULL, DirectPlayLobbyClientMessageHandler, 0); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08x\n", hr); hr = IDirectPlay8LobbyClient_Close(client, 0); todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
1
0
0
0
Alistair Leslie-Hughes : dpnet: Semi-stub IDirectPlay8Server SetServerInfo.
by Alexandre Julliard
01 Nov '16
01 Nov '16
Module: wine Branch: master Commit: 5f797e6c340bc84ad3c31b3c1920cf05191ac89a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5f797e6c340bc84ad3c31b3c1…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Fri Oct 28 07:07:21 2016 +0000 dpnet: Semi-stub IDirectPlay8Server SetServerInfo. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dpnet/server.c | 61 +++++++++++++++++++++++++++++++--- dlls/dpnet/tests/server.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+), 4 deletions(-) diff --git a/dlls/dpnet/server.c b/dlls/dpnet/server.c index 3e026fc..cd54ba4 100644 --- a/dlls/dpnet/server.c +++ b/dlls/dpnet/server.c @@ -43,6 +43,10 @@ typedef struct IDirectPlay8ServerImpl PFNDPNMESSAGEHANDLER msghandler; DWORD flags; void *usercontext; + + WCHAR *servername; + void *data; + DWORD datasize; } IDirectPlay8ServerImpl; WINE_DEFAULT_DEBUG_CHANNEL(dpnet); @@ -91,8 +95,11 @@ static ULONG WINAPI IDirectPlay8ServerImpl_Release(IDirectPlay8Server *iface) TRACE("(%p) ref=%d\n", This, ref); - if (!ref) { - HeapFree(GetProcessHeap(), 0, This); + if (!ref) + { + heap_free(This->servername); + heap_free(This->data); + heap_free(This); } return ref; @@ -151,8 +158,54 @@ static HRESULT WINAPI IDirectPlay8ServerImpl_SetServerInfo(IDirectPlay8Server *i PVOID pvAsyncContext, DPNHANDLE *phAsyncHandle, DWORD dwFlags) { IDirectPlay8ServerImpl *This = impl_from_IDirectPlay8Server(iface); - FIXME("(%p)->(%p %p %p %d)\n", This, pdpnPlayerInfo, pvAsyncContext, phAsyncHandle, dwFlags); - return E_NOTIMPL; + + FIXME("(%p)->(%p %p %p %x) Semi-stub\n", This, pdpnPlayerInfo, pvAsyncContext, phAsyncHandle, dwFlags); + + if(!pdpnPlayerInfo) + return E_POINTER; + + if(!This->msghandler) + return DPNERR_UNINITIALIZED; + + if(phAsyncHandle) + FIXME("Async handle currently not supported.\n"); + + if (pdpnPlayerInfo->dwInfoFlags & DPNINFO_NAME) + { + heap_free(This->servername); + This->servername = NULL; + + if(pdpnPlayerInfo->pwszName) + { + This->servername = heap_strdupW(pdpnPlayerInfo->pwszName); + if (!This->servername) + return E_OUTOFMEMORY; + } + } + + if (pdpnPlayerInfo->dwInfoFlags & DPNINFO_DATA) + { + heap_free(This->data); + This->data = NULL; + This->datasize = 0; + + if(!pdpnPlayerInfo->pvData && pdpnPlayerInfo->dwDataSize) + return E_POINTER; + + if(pdpnPlayerInfo->dwDataSize && pdpnPlayerInfo->pvData) + { + This->data = heap_alloc(pdpnPlayerInfo->dwDataSize); + if (!This->data) + return E_OUTOFMEMORY; + + This->datasize = pdpnPlayerInfo->dwDataSize; + + memcpy(This->data, pdpnPlayerInfo->pvData, pdpnPlayerInfo->dwDataSize); + } + } + + /* TODO: Send DPN_MSGID_SERVER_INFO message to all players. */ + return S_OK; } static HRESULT WINAPI IDirectPlay8ServerImpl_GetClientInfo(IDirectPlay8Server *iface, DPNID dpnid, DPN_PLAYER_INFO *pdpnPlayerInfo, diff --git a/dlls/dpnet/tests/server.c b/dlls/dpnet/tests/server.c index 8279666..928c6a0 100644 --- a/dlls/dpnet/tests/server.c +++ b/dlls/dpnet/tests/server.c @@ -98,6 +98,88 @@ static void create_server(void) } } +static void test_server_info(void) +{ + HRESULT hr; + DPN_PLAYER_INFO info; + WCHAR name[] = {'w','i','n','e',0}; + WCHAR name2[] = {'w','i','n','e','2',0}; + WCHAR data[] = {'X','X','X','X',0}; + IDirectPlay8Server *server = NULL; + + hr = CoCreateInstance( &CLSID_DirectPlay8Server, NULL, CLSCTX_ALL, &IID_IDirectPlay8Server, (LPVOID*)&server); + ok(hr == S_OK, "Failed to create IDirectPlay8Server object\n"); + if( SUCCEEDED(hr) ) + { + ZeroMemory( &info, sizeof(DPN_PLAYER_INFO) ); + info.dwSize = sizeof(DPN_PLAYER_INFO); + info.dwInfoFlags = DPNINFO_NAME; + + hr = IDirectPlay8Server_SetServerInfo(server, NULL, NULL, NULL, DPNSETSERVERINFO_SYNC); + ok(hr == E_POINTER, "got %x\n", hr); + + info.pwszName = name; + hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); + ok(hr == DPNERR_UNINITIALIZED, "got %x\n", hr); + + hr = IDirectPlay8Server_Initialize(server, NULL, DirectPlayMessageHandler, 0); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDirectPlay8Server_SetServerInfo(server, NULL, NULL, NULL, DPNSETSERVERINFO_SYNC); + ok(hr == E_POINTER, "got %x\n", hr); + + info.pwszName = NULL; + hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + info.pwszName = name; + hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + info.dwInfoFlags = DPNINFO_NAME; + info.pwszName = name2; + hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + info.dwInfoFlags = DPNINFO_DATA; + info.pwszName = NULL; + info.pvData = NULL; + info.dwDataSize = sizeof(data); + hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); + ok(hr == E_POINTER, "got %x\n", hr); + + info.dwInfoFlags = DPNINFO_DATA; + info.pwszName = NULL; + info.pvData = data; + info.dwDataSize = 0; + hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + info.dwInfoFlags = DPNINFO_DATA; + info.pwszName = NULL; + info.pvData = data; + info.dwDataSize = sizeof(data); + hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME; + info.pwszName = name; + info.pvData = data; + info.dwDataSize = sizeof(data); + hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME; + info.pwszName = name; + info.pvData = NULL; + info.dwDataSize = 0; + hr = IDirectPlay8Server_SetServerInfo(server, &info, NULL, NULL, DPNSETSERVERINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + IDirectPlay8Server_Release(server); + } +} + START_TEST(server) { HRESULT hr; @@ -108,6 +190,7 @@ START_TEST(server) return; create_server(); + test_server_info(); CoUninitialize(); }
1
0
0
0
Alistair Leslie-Hughes : dpnet: Semi-stub IDirectPlay8Client SetClientInfo.
by Alexandre Julliard
01 Nov '16
01 Nov '16
Module: wine Branch: master Commit: 7a71a6a85867e473040ee7c8e3f8eaad34ac709a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7a71a6a85867e473040ee7c8e…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Fri Oct 28 07:07:07 2016 +0000 dpnet: Semi-stub IDirectPlay8Client SetClientInfo. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dpnet/client.c | 54 +++++++++++++++++++++++++++++++++---- dlls/dpnet/dpnet_private.h | 3 +++ dlls/dpnet/tests/client.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+), 5 deletions(-) diff --git a/dlls/dpnet/client.c b/dlls/dpnet/client.c index bf2b8d2..f6f9e79 100644 --- a/dlls/dpnet/client.c +++ b/dlls/dpnet/client.c @@ -86,8 +86,11 @@ static ULONG WINAPI IDirectPlay8ClientImpl_Release(IDirectPlay8Client *iface) TRACE("(%p) ref=%u\n", This, ref); - if (!ref) { - HeapFree(GetProcessHeap(), 0, This); + if (!ref) + { + heap_free(This->username); + heap_free(This->data); + heap_free(This); } return ref; } @@ -182,9 +185,50 @@ static HRESULT WINAPI IDirectPlay8ClientImpl_SetClientInfo(IDirectPlay8Client *i const DPN_PLAYER_INFO * const pdpnPlayerInfo, void * const pvAsyncContext, DPNHANDLE * const phAsyncHandle, const DWORD dwFlags) { - IDirectPlay8ClientImpl *This = impl_from_IDirectPlay8Client(iface); - FIXME("(%p):(%p,%p,%x): Stub\n", This, pvAsyncContext, phAsyncHandle, dwFlags); - return DPN_OK; + IDirectPlay8ClientImpl *This = impl_from_IDirectPlay8Client(iface); + FIXME("(%p):(%p,%p,%x): Semi-stub.\n", This, pvAsyncContext, phAsyncHandle, dwFlags); + + if(!pdpnPlayerInfo) + return E_POINTER; + + if(phAsyncHandle) + FIXME("Async handle currently not supported.\n"); + + if (pdpnPlayerInfo->dwInfoFlags & DPNINFO_NAME) + { + heap_free(This->username); + This->username = NULL; + + if(pdpnPlayerInfo->pwszName) + { + This->username = heap_strdupW(pdpnPlayerInfo->pwszName); + if (!This->username) + return E_OUTOFMEMORY; + } + } + + if (pdpnPlayerInfo->dwInfoFlags & DPNINFO_DATA) + { + heap_free(This->data); + This->data = NULL; + This->datasize = 0; + + if(!pdpnPlayerInfo->pvData && pdpnPlayerInfo->dwDataSize) + return E_POINTER; + + if(pdpnPlayerInfo->dwDataSize && pdpnPlayerInfo->pvData) + { + This->data = heap_alloc(pdpnPlayerInfo->dwDataSize); + if (!This->data) + return E_OUTOFMEMORY; + + This->datasize = pdpnPlayerInfo->dwDataSize; + + memcpy(This->data, pdpnPlayerInfo->pvData, pdpnPlayerInfo->dwDataSize); + } + } + + return DPN_OK; } static HRESULT WINAPI IDirectPlay8ClientImpl_GetServerInfo(IDirectPlay8Client *iface, diff --git a/dlls/dpnet/dpnet_private.h b/dlls/dpnet/dpnet_private.h index 05608a6..dc6a4f1 100644 --- a/dlls/dpnet/dpnet_private.h +++ b/dlls/dpnet/dpnet_private.h @@ -56,6 +56,9 @@ struct IDirectPlay8ClientImpl PFNDPNMESSAGEHANDLER msghandler; DWORD flags; void *usercontext; + WCHAR *username; + void *data; + DWORD datasize; DPN_SP_CAPS spcaps; }; diff --git a/dlls/dpnet/tests/client.c b/dlls/dpnet/tests/client.c index 253526a..f7d6c53 100644 --- a/dlls/dpnet/tests/client.c +++ b/dlls/dpnet/tests/client.c @@ -230,6 +230,71 @@ static void test_lobbyclient(void) } } +static void test_player_info(void) +{ + HRESULT hr; + DPN_PLAYER_INFO info; + WCHAR name[] = {'w','i','n','e',0}; + WCHAR name2[] = {'w','i','n','e','2',0}; + WCHAR data[] = {'X','X','X','X',0}; + + ZeroMemory( &info, sizeof(DPN_PLAYER_INFO) ); + info.dwSize = sizeof(DPN_PLAYER_INFO); + info.dwInfoFlags = DPNINFO_NAME; + + hr = IDirectPlay8Client_SetClientInfo(client, NULL, NULL, NULL, DPNSETCLIENTINFO_SYNC); + ok(hr == E_POINTER, "got %x\n", hr); + + info.pwszName = NULL; + hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + info.pwszName = name; + hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + info.dwInfoFlags = DPNINFO_NAME; + info.pwszName = name2; + hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + info.dwInfoFlags = DPNINFO_DATA; + info.pwszName = NULL; + info.pvData = NULL; + info.dwDataSize = sizeof(data); + hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); + ok(hr == E_POINTER, "got %x\n", hr); + + info.dwInfoFlags = DPNINFO_DATA; + info.pwszName = NULL; + info.pvData = data; + info.dwDataSize = 0; + hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + info.dwInfoFlags = DPNINFO_DATA; + info.pwszName = NULL; + info.pvData = data; + info.dwDataSize = sizeof(data); + hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME; + info.pwszName = name; + info.pvData = data; + info.dwDataSize = sizeof(data); + hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + /* Leave ClientInfo with only the name set. */ + info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME; + info.pwszName = name; + info.pvData = NULL; + info.dwDataSize = 0; + hr = IDirectPlay8Client_SetClientInfo(client, &info, NULL, NULL, DPNSETCLIENTINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); +} + static void test_cleanup_dp(void) { HRESULT hr; @@ -258,6 +323,7 @@ START_TEST(client) test_enum_service_providers(); test_enum_hosts(); test_get_sp_caps(); + test_player_info(); test_lobbyclient(); test_cleanup_dp(); }
1
0
0
0
Alistair Leslie-Hughes : dpnet: Semi-stub IDirectPlay8Peer SetPeerInfo.
by Alexandre Julliard
01 Nov '16
01 Nov '16
Module: wine Branch: master Commit: ac5418b18576ce8f4332849c2807e851accd7c4d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ac5418b18576ce8f4332849c2…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Fri Oct 28 07:06:56 2016 +0000 dpnet: Semi-stub IDirectPlay8Peer SetPeerInfo. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dpnet/address.c | 31 --------------------- dlls/dpnet/dpnet_private.h | 22 +++++++++++++++ dlls/dpnet/peer.c | 48 ++++++++++++++++++++++++++++++-- dlls/dpnet/tests/peer.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 136 insertions(+), 34 deletions(-) diff --git a/dlls/dpnet/address.c b/dlls/dpnet/address.c index 6305fe7..c5457eb 100644 --- a/dlls/dpnet/address.c +++ b/dlls/dpnet/address.c @@ -39,37 +39,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dpnet); -static inline void *heap_alloc(size_t len) -{ - return HeapAlloc(GetProcessHeap(), 0, len); -} - -static inline void *heap_realloc(void *mem, size_t len) -{ - return HeapReAlloc( GetProcessHeap(), 0, mem, len); -} - -static inline BOOL heap_free(void *mem) -{ - return HeapFree(GetProcessHeap(), 0, mem); -} - -static inline LPWSTR heap_strdupW(LPCWSTR str) -{ - LPWSTR ret = NULL; - - if(str) { - DWORD size; - - size = (strlenW(str)+1)*sizeof(WCHAR); - ret = heap_alloc(size); - if(ret) - memcpy(ret, str, size); - } - - return ret; -} - static char *heap_strdupA( const char *str ) { char *ret; diff --git a/dlls/dpnet/dpnet_private.h b/dlls/dpnet/dpnet_private.h index f9c4400..05608a6 100644 --- a/dlls/dpnet/dpnet_private.h +++ b/dlls/dpnet/dpnet_private.h @@ -26,6 +26,7 @@ #endif #include <wine/list.h> +#include "wine/unicode.h" #include "dplay8.h" #include "dplobby8.h" @@ -146,6 +147,27 @@ typedef struct { #define FE(x) { x, #x } #define GE(x) { &x, #x } +static inline void *heap_alloc( size_t len ) +{ + return HeapAlloc( GetProcessHeap(), 0, len ); +} + +static inline void *heap_realloc(void *mem, size_t len) +{ + return HeapReAlloc( GetProcessHeap(), 0, mem, len); +} +static inline BOOL heap_free( void *mem ) +{ + return HeapFree( GetProcessHeap(), 0, mem ); +} + +static inline WCHAR *heap_strdupW( const WCHAR *src ) +{ + WCHAR *dst; + if (!src) return NULL; + if ((dst = heap_alloc( (strlenW( src ) + 1) * sizeof(WCHAR) ))) strcpyW( dst, src ); + return dst; +} #endif diff --git a/dlls/dpnet/peer.c b/dlls/dpnet/peer.c index a07a59a..264ca70 100644 --- a/dlls/dpnet/peer.c +++ b/dlls/dpnet/peer.c @@ -48,6 +48,10 @@ typedef struct IDirectPlay8PeerImpl DWORD flags; void *usercontext; + WCHAR *username; + void *data; + DWORD datasize; + DPN_SP_CAPS spcaps; } IDirectPlay8PeerImpl; @@ -92,7 +96,12 @@ static ULONG WINAPI IDirectPlay8PeerImpl_Release(IDirectPlay8Peer *iface) TRACE("(%p) ref=%d\n", This, RefCount); if(!RefCount) - HeapFree(GetProcessHeap(), 0, This); + { + heap_free(This->username); + heap_free(This->data); + + heap_free(This); + } return RefCount; } @@ -310,9 +319,42 @@ static HRESULT WINAPI IDirectPlay8PeerImpl_SetPeerInfo(IDirectPlay8Peer *iface, const DPN_PLAYER_INFO * const pdpnPlayerInfo, void * const pvAsyncContext, DPNHANDLE * const phAsyncHandle, const DWORD dwFlags) { - FIXME("(%p)->(%p,%p,%p,%x): stub\n", iface, pdpnPlayerInfo, pvAsyncContext, phAsyncHandle, dwFlags); + IDirectPlay8PeerImpl* This = impl_from_IDirectPlay8Peer(iface); - return DPNERR_GENERIC; + FIXME("(%p)->(%p,%p,%p,%x) Semi-stub.\n", This, pdpnPlayerInfo, pvAsyncContext, phAsyncHandle, dwFlags); + + if(!pdpnPlayerInfo) + return E_POINTER; + + if(phAsyncHandle) + FIXME("Async handle currently not supported.\n"); + + if (pdpnPlayerInfo->dwInfoFlags & DPNINFO_NAME) + { + heap_free(This->username); + This->username = NULL; + + if(pdpnPlayerInfo->pwszName) + { + This->username = heap_strdupW(pdpnPlayerInfo->pwszName); + if (!This->username) + return E_OUTOFMEMORY; + } + } + + if (pdpnPlayerInfo->dwInfoFlags & DPNINFO_DATA) + { + heap_free(This->data); + + This->datasize = pdpnPlayerInfo->dwDataSize; + This->data = heap_alloc(pdpnPlayerInfo->dwDataSize); + if (!This->data) + return E_OUTOFMEMORY; + + memcpy(This->data, pdpnPlayerInfo->pvData, pdpnPlayerInfo->dwDataSize); + } + + return S_OK; } static HRESULT WINAPI IDirectPlay8PeerImpl_GetPeerInfo(IDirectPlay8Peer *iface, const DPNID dpnid, diff --git a/dlls/dpnet/tests/peer.c b/dlls/dpnet/tests/peer.c index 1fec1f2..f6c413f 100644 --- a/dlls/dpnet/tests/peer.c +++ b/dlls/dpnet/tests/peer.c @@ -212,6 +212,74 @@ static void test_get_sp_caps(void) "expected 0x10000, got 0x%x\n", caps.dwSystemBufferSize); } +static void test_player_info(void) +{ + HRESULT hr; + DPN_PLAYER_INFO info; + WCHAR name[] = {'w','i','n','e',0}; + WCHAR name2[] = {'w','i','n','e','2',0}; + WCHAR data[] = {'X','X','X','X',0}; + + ZeroMemory( &info, sizeof(DPN_PLAYER_INFO) ); + info.dwSize = sizeof(DPN_PLAYER_INFO); + info.dwInfoFlags = DPNINFO_NAME; + + hr = IDirectPlay8Peer_SetPeerInfo(peer, NULL, NULL, NULL, DPNSETPEERINFO_SYNC); + ok(hr == E_POINTER, "got %x\n", hr); + + info.pwszName = NULL; + hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + info.pwszName = name; + hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + info.dwInfoFlags = DPNINFO_NAME; + info.pwszName = name2; + hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + +if(0) /* Crashes on windows */ +{ + info.dwInfoFlags = DPNINFO_DATA; + info.pwszName = NULL; + info.pvData = NULL; + info.dwDataSize = sizeof(data); + hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); +} + + info.dwInfoFlags = DPNINFO_DATA; + info.pwszName = NULL; + info.pvData = data; + info.dwDataSize = 0; + hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + info.dwInfoFlags = DPNINFO_DATA; + info.pwszName = NULL; + info.pvData = data; + info.dwDataSize = sizeof(data); + hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME; + info.pwszName = name; + info.pvData = data; + info.dwDataSize = sizeof(data); + hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); + + /* Leave PeerInfo with only the name set. */ + info.dwInfoFlags = DPNINFO_DATA | DPNINFO_NAME; + info.pwszName = name; + info.pvData = NULL; + info.dwDataSize = 0; + hr = IDirectPlay8Peer_SetPeerInfo(peer, &info, NULL, NULL, DPNSETPEERINFO_SYNC); + ok(hr == S_OK, "got %x\n", hr); +} + static void test_cleanup_dp(void) { HRESULT hr; @@ -238,5 +306,6 @@ START_TEST(peer) test_enum_service_providers(); test_enum_hosts(); test_get_sp_caps(); + test_player_info(); test_cleanup_dp(); }
1
0
0
0
Akihiro Sagawa : comctl32: Show none hotkey text properly.
by Alexandre Julliard
01 Nov '16
01 Nov '16
Module: wine Branch: master Commit: 62d205514c160504ca4f631b03e6d74ab5d5020d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=62d205514c160504ca4f631b0…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Tue Nov 1 21:33:16 2016 +0900 comctl32: Show none hotkey text properly. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/hotkey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/comctl32/hotkey.c b/dlls/comctl32/hotkey.c index a72b487..a6b3486 100644 --- a/dlls/comctl32/hotkey.c +++ b/dlls/comctl32/hotkey.c @@ -140,7 +140,7 @@ HOTKEY_Refresh(HOTKEY_INFO *infoPtr, HDC hdc) TRACE("(infoPtr=%p hdc=%p)\n", infoPtr, hdc); if(!infoPtr->CurrMod && !infoPtr->HotKey) { - HOTKEY_DrawHotKey (infoPtr, hdc, infoPtr->strNone, 4); + HOTKEY_DrawHotKey (infoPtr, hdc, infoPtr->strNone, lstrlenW(infoPtr->strNone)); return; }
1
0
0
0
Akihiro Sagawa : winex11: Add Japanese special key support.
by Alexandre Julliard
01 Nov '16
01 Nov '16
Module: wine Branch: master Commit: 08b531ed0d317d0ba5d285ea66b0eec32afa1355 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=08b531ed0d317d0ba5d285ea6…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Tue Nov 1 21:33:15 2016 +0900 winex11: Add Japanese special key support. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/keyboard.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index e9c7b7f..37e51b2 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -46,6 +46,7 @@ #include "winuser.h" #include "winreg.h" #include "winnls.h" +#include "ime.h" #include "x11drv.h" #include "wine/server.h" #include "wine/unicode.h" @@ -980,11 +981,14 @@ static const WORD nonchar_key_vkey[256] = VK_BACK, VK_TAB, 0, VK_CLEAR, 0, VK_RETURN, 0, 0, /* FF08 */ 0, 0, 0, VK_PAUSE, VK_SCROLL, 0, 0, 0, /* FF10 */ 0, 0, 0, VK_ESCAPE, 0, 0, 0, 0, /* FF18 */ - /* unused */ - 0, 0, 0, 0, 0, 0, 0, 0, /* FF20 */ - 0, 0, 0, 0, 0, 0, 0, 0, /* FF28 */ - 0, VK_HANGUL, 0, 0, VK_HANJA, 0, 0, 0, /* FF30 */ + /* Japanese special keys */ + 0, VK_KANJI, VK_NONCONVERT, VK_CONVERT, /* FF20 */ + VK_DBE_ROMAN, 0, 0, VK_DBE_HIRAGANA, + 0, 0, VK_DBE_SBCSCHAR, 0, 0, 0, 0, 0, /* FF28 */ + /* Korean special keys (FF31-) */ + VK_DBE_ALPHANUMERIC, VK_HANGUL, 0, 0, VK_HANJA, 0, 0, 0, /* FF30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* FF38 */ + /* unused */ 0, 0, 0, 0, 0, 0, 0, 0, /* FF40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* FF48 */ /* cursor keys */ @@ -1034,11 +1038,13 @@ static const WORD nonchar_key_scan[256] = 0x0E, 0x0F, 0x00, /*?*/ 0, 0x00, 0x1C, 0x00, 0x00, /* FF08 */ 0x00, 0x00, 0x00, 0x45, 0x46, 0x00, 0x00, 0x00, /* FF10 */ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, /* FF18 */ - /* unused */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* FF20 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* FF28 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* FF30 */ + /* Japanese special keys */ + 0x00, 0x29, 0x7B, 0x79, 0x70, 0x00, 0x00, 0x70, /* FF20 */ + 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, /* FF28 */ + /* Korean special keys (FF31-) */ + 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* FF30 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* FF38 */ + /* unused */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* FF40 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* FF48 */ /* cursor keys */
1
0
0
0
← Newer
1
...
43
44
45
46
47
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
Results per page:
10
25
50
100
200