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 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
777 discussions
Start a n
N
ew thread
Michael Stefaniuc : mshtml: Use SetRectEmpty() instead of memset().
by Alexandre Julliard
01 Aug '16
01 Aug '16
Module: wine Branch: master Commit: 85916a10ad8e4372139c3bfa65935264dff61fb5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85916a10ad8e4372139c3bfa6…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sat Jul 30 22:06:02 2016 +0200 mshtml: Use SetRectEmpty() instead of memset(). Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/editor.c | 2 +- dlls/mshtml/view.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c index fb77ee1..275ba0c 100644 --- a/dlls/mshtml/editor.c +++ b/dlls/mshtml/editor.c @@ -1328,7 +1328,7 @@ HRESULT setup_edit_mode(HTMLDocumentObj *doc) if(doc->ip_window) call_set_active_object(doc->ip_window, &doc->basedoc.IOleInPlaceActiveObject_iface); - memset(&rcBorderWidths, 0, sizeof(rcBorderWidths)); + SetRectEmpty(&rcBorderWidths); if(doc->frame) IOleInPlaceFrame_SetBorderSpace(doc->frame, &rcBorderWidths); } diff --git a/dlls/mshtml/view.c b/dlls/mshtml/view.c index 4470a43..2a55938 100644 --- a/dlls/mshtml/view.c +++ b/dlls/mshtml/view.c @@ -650,7 +650,7 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f if(This->doc_obj->ip_window) call_set_active_object(This->doc_obj->ip_window, &This->IOleInPlaceActiveObject_iface); - memset(&rcBorderWidths, 0, sizeof(rcBorderWidths)); + SetRectEmpty(&rcBorderWidths); IOleInPlaceFrame_SetBorderSpace(This->doc_obj->frame, &rcBorderWidths); This->doc_obj->ui_active = TRUE;
1
0
0
0
Henri Verbeet : wined3d: Introduce wined3d_texture_load_location().
by Alexandre Julliard
01 Aug '16
01 Aug '16
Module: wine Branch: master Commit: 3b61af6306361953d6fff924078c9017db397b13 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3b61af6306361953d6fff9240…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Aug 1 12:49:07 2016 +0200 wined3d: Introduce wined3d_texture_load_location(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/texture.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 5a59f17..1f0a97a 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -174,6 +174,14 @@ void wined3d_texture_invalidate_location(struct wined3d_texture *texture, sub_resource_idx, texture); } +/* Context activation is done by the caller. Context may be NULL in + * WINED3D_NO3D mode. */ +static BOOL wined3d_texture_load_location(struct wined3d_texture *texture, + unsigned int sub_resource_idx, struct wined3d_context *context, DWORD location) +{ + return texture->texture_ops->texture_load_location(texture, sub_resource_idx, context, location); +} + /* Context activation is done by the caller. */ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size_t size, const struct wined3d_gl_info *gl_info, GLenum binding, DWORD flags) @@ -352,7 +360,7 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture) for (i = 0; i < sub_count; ++i) { if (texture->sub_resources[i].locations == texture->resource.map_binding - && !texture->texture_ops->texture_load_location(texture, i, context, map_binding)) + && !wined3d_texture_load_location(texture, i, context, map_binding)) ERR("Failed to load location %s.\n", wined3d_debug_location(map_binding)); if (texture->resource.map_binding == WINED3D_LOCATION_BUFFER) wined3d_texture_remove_buffer_object(texture, i, context->gl_info); @@ -914,7 +922,7 @@ void wined3d_texture_load(struct wined3d_texture *texture, TRACE("Reloading because of color key value change.\n"); for (i = 0; i < sub_count; i++) { - if (!texture->texture_ops->texture_load_location(texture, i, context, texture->resource.map_binding)) + if (!wined3d_texture_load_location(texture, i, context, texture->resource.map_binding)) ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding)); else wined3d_texture_invalidate_location(texture, i, ~texture->resource.map_binding); @@ -932,7 +940,7 @@ void wined3d_texture_load(struct wined3d_texture *texture, /* Reload the surfaces if the texture is marked dirty. */ for (i = 0; i < sub_count; ++i) { - if (!texture->texture_ops->texture_load_location(texture, i, context, + if (!wined3d_texture_load_location(texture, i, context, srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB)) ERR("Failed to load location (srgb %#x).\n", srgb); } @@ -1413,8 +1421,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture, FIXME("Ignoring dirty_region %s.\n", debug_box(dirty_region)); context = context_acquire(texture->resource.device, NULL); - if (!texture->texture_ops->texture_load_location(texture, sub_resource_idx, - context, texture->resource.map_binding)) + if (!wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding)) { ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding)); context_release(context); @@ -1591,7 +1598,7 @@ static void wined3d_texture_unload(struct wined3d_resource *resource) struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[i]; if (resource->pool != WINED3D_POOL_DEFAULT - && texture->texture_ops->texture_load_location(texture, i, context, resource->map_binding)) + && wined3d_texture_load_location(texture, i, context, resource->map_binding)) { wined3d_texture_invalidate_location(texture, i, ~resource->map_binding); } @@ -1710,8 +1717,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour { if (resource->usage & WINED3DUSAGE_DYNAMIC) WARN_(d3d_perf)("Mapping a dynamic texture without WINED3D_MAP_DISCARD.\n"); - ret = texture->texture_ops->texture_load_location(texture, - sub_resource_idx, context, texture->resource.map_binding); + ret = wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding); } if (!ret)
1
0
0
0
Henri Verbeet : wined3d: Merge wined3d_volume_upload_data() into texture3d_upload_data().
by Alexandre Julliard
01 Aug '16
01 Aug '16
Module: wine Branch: master Commit: 9b7ff40d7e2bf1a6bafffe65a94d2381e8fb1c7d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b7ff40d7e2bf1a6bafffe65a…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Aug 1 12:49:06 2016 +0200 wined3d: Merge wined3d_volume_upload_data() into texture3d_upload_data(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/Makefile.in | 1 - dlls/wined3d/texture.c | 58 ++++++++++++++++++++++++++-- dlls/wined3d/volume.c | 87 ------------------------------------------ dlls/wined3d/wined3d_private.h | 3 -- 4 files changed, 54 insertions(+), 95 deletions(-) diff --git a/dlls/wined3d/Makefile.in b/dlls/wined3d/Makefile.in index e631a15..edee588 100644 --- a/dlls/wined3d/Makefile.in +++ b/dlls/wined3d/Makefile.in @@ -29,7 +29,6 @@ C_SRCS = \ utils.c \ vertexdeclaration.c \ view.c \ - volume.c \ wined3d_main.c RC_SRCS = version.rc diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index bf4b43d..5a59f17 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -2072,17 +2072,67 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3 return WINED3D_OK; } +/* This call just uploads data, the caller is responsible for binding the + * correct texture. */ +/* Context activation is done by the caller. */ static void texture3d_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx, const struct wined3d_context *context, const struct wined3d_const_bo_address *data, unsigned int row_pitch, unsigned int slice_pitch) { + const struct wined3d_format *format = texture->resource.format; + unsigned int level = sub_resource_idx % texture->level_count; + const struct wined3d_gl_info *gl_info = context->gl_info; unsigned int dst_row_pitch, dst_slice_pitch; + unsigned int width, height, depth; + const void *mem = data->addr; + void *converted_mem = NULL; + + TRACE("texture %p, sub_resource_idx %u, context %p, data {%#x:%p}, row_pitch %#x, slice_pitch %#x.\n", + texture, sub_resource_idx, context, data->buffer_object, data->addr, row_pitch, slice_pitch); + + width = wined3d_texture_get_level_width(texture, level); + height = wined3d_texture_get_level_height(texture, level); + depth = wined3d_texture_get_level_depth(texture, level); + + if (format->convert) + { + if (data->buffer_object) + ERR("Loading a converted texture from a PBO.\n"); + if (texture->resource.format_flags & WINED3DFMT_FLAG_BLOCKS) + ERR("Converting a block-based format.\n"); + + dst_row_pitch = width * format->conv_byte_count; + dst_slice_pitch = dst_row_pitch * height; + + converted_mem = wined3d_calloc(depth, dst_slice_pitch); + format->convert(data->addr, converted_mem, row_pitch, slice_pitch, + dst_row_pitch, dst_slice_pitch, width, height, depth); + mem = converted_mem; + } + else + { + wined3d_texture_get_pitch(texture, sub_resource_idx, &dst_row_pitch, &dst_slice_pitch); + if (row_pitch != dst_row_pitch || slice_pitch != dst_slice_pitch) + FIXME("Ignoring row/slice pitch (%u/%u).\n", row_pitch, slice_pitch); + } + + if (data->buffer_object) + { + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, data->buffer_object)); + checkGLcall("glBindBuffer"); + } + + GL_EXTCALL(glTexSubImage3D(GL_TEXTURE_3D, level, 0, 0, 0, + width, height, depth, format->glFormat, format->glType, mem)); + checkGLcall("glTexSubImage3D"); - wined3d_texture_get_pitch(texture, sub_resource_idx, &dst_row_pitch, &dst_slice_pitch); - if (row_pitch != dst_row_pitch || slice_pitch != dst_slice_pitch) - FIXME("Ignoring row/slice pitch (%u/%u).\n", row_pitch, slice_pitch); + if (data->buffer_object) + { + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); + } - wined3d_volume_upload_data(texture, sub_resource_idx, context, data); + HeapFree(GetProcessHeap(), 0, converted_mem); } /* Context activation is done by the caller. */ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c deleted file mode 100644 index a44f411..0000000 --- a/dlls/wined3d/volume.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2002-2005 Jason Edmeades - * Copyright 2002-2005 Raphael Junqueira - * Copyright 2005 Oliver Stieber - * Copyright 2009-2011 Henri Verbeet for CodeWeavers - * Copyright 2013 Stefan Dösinger for CodeWeavers - * - * 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 "config.h" -#include "wine/port.h" -#include "wined3d_private.h" - -WINE_DEFAULT_DEBUG_CHANNEL(d3d); - -/* This call just uploads data, the caller is responsible for binding the - * correct texture. */ -/* Context activation is done by the caller. */ -void wined3d_volume_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx, - const struct wined3d_context *context, const struct wined3d_const_bo_address *data) -{ - const struct wined3d_format *format = texture->resource.format; - unsigned int level = sub_resource_idx % texture->level_count; - const struct wined3d_gl_info *gl_info = context->gl_info; - unsigned int width, height, depth; - const void *mem = data->addr; - void *converted_mem = NULL; - - TRACE("texture %p, sub_resource_idx %u, context %p, format %s (%#x).\n", - texture, level, context, debug_d3dformat(format->id), format->id); - - width = wined3d_texture_get_level_width(texture, level); - height = wined3d_texture_get_level_height(texture, level); - depth = wined3d_texture_get_level_depth(texture, level); - - if (format->convert) - { - UINT dst_row_pitch, dst_slice_pitch; - UINT src_row_pitch, src_slice_pitch; - - if (data->buffer_object) - ERR("Loading a converted texture from a PBO.\n"); - if (texture->resource.format_flags & WINED3DFMT_FLAG_BLOCKS) - ERR("Converting a block-based format.\n"); - - dst_row_pitch = width * format->conv_byte_count; - dst_slice_pitch = dst_row_pitch * height; - - wined3d_texture_get_pitch(texture, level, &src_row_pitch, &src_slice_pitch); - - converted_mem = wined3d_calloc(depth, dst_slice_pitch); - format->convert(data->addr, converted_mem, src_row_pitch, src_slice_pitch, - dst_row_pitch, dst_slice_pitch, width, height, depth); - mem = converted_mem; - } - - if (data->buffer_object) - { - GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, data->buffer_object)); - checkGLcall("glBindBuffer"); - } - - GL_EXTCALL(glTexSubImage3D(GL_TEXTURE_3D, level, 0, 0, 0, - width, height, depth, format->glFormat, format->glType, mem)); - checkGLcall("glTexSubImage3D"); - - if (data->buffer_object) - { - GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); - checkGLcall("glBindBuffer"); - } - - HeapFree(GetProcessHeap(), 0, converted_mem); -} diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index c1bc638..f428245 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2786,9 +2786,6 @@ void wined3d_texture_validate_location(struct wined3d_texture *texture, const char *wined3d_debug_location(DWORD location) DECLSPEC_HIDDEN; -void wined3d_volume_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx, - const struct wined3d_context *context, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN; - struct wined3d_renderbuffer_entry { struct list entry;
1
0
0
0
Henri Verbeet : wined3d: Use texture3d_upload_data() in texture3d_load_location().
by Alexandre Julliard
01 Aug '16
01 Aug '16
Module: wine Branch: master Commit: 61fa6ea2c547ccd1b1274b473328a6134b57469e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=61fa6ea2c547ccd1b1274b473…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Aug 1 12:49:05 2016 +0200 wined3d: Use texture3d_upload_data() in texture3d_load_location(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/texture.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 4f9fb0a..bf4b43d 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -2152,6 +2152,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in { struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[sub_resource_idx]; DWORD required_access = wined3d_resource_access_from_location(location); + unsigned int row_pitch, slice_pitch; TRACE("texture %p, sub_resource_idx %u, context %p, location %s.\n", texture, sub_resource_idx, context, wined3d_debug_location(location)); @@ -2192,14 +2193,16 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in data.addr += sub_resource->offset; wined3d_texture_bind_and_dirtify(texture, context, location == WINED3D_LOCATION_TEXTURE_SRGB); - wined3d_volume_upload_data(texture, sub_resource_idx, context, &data); + wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch); + texture3d_upload_data(texture, sub_resource_idx, context, &data, row_pitch, slice_pitch); } else if (sub_resource->locations & WINED3D_LOCATION_BUFFER) { struct wined3d_const_bo_address data = {sub_resource->buffer_object, NULL}; wined3d_texture_bind_and_dirtify(texture, context, location == WINED3D_LOCATION_TEXTURE_SRGB); - wined3d_volume_upload_data(texture, sub_resource_idx, context, &data); + wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch); + texture3d_upload_data(texture, sub_resource_idx, context, &data, row_pitch, slice_pitch); } else if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB) {
1
0
0
0
Henri Verbeet : wined3d: Use texture3d_upload_data() in texture3d_srgb_transfer().
by Alexandre Julliard
01 Aug '16
01 Aug '16
Module: wine Branch: master Commit: 0bf35ec975ec90654911659a9da5c7db1ac948f3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0bf35ec975ec90654911659a9…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Aug 1 12:49:04 2016 +0200 wined3d: Use texture3d_upload_data() in texture3d_srgb_transfer(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/texture.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 51b02d8..4f9fb0a 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -2122,6 +2122,7 @@ static void texture3d_srgb_transfer(struct wined3d_texture *texture, unsigned in struct wined3d_context *context, BOOL dest_is_srgb) { struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[sub_resource_idx]; + unsigned int row_pitch, slice_pitch; struct wined3d_bo_address data; /* Optimisations are possible, but the effort should be put into either @@ -2135,10 +2136,12 @@ static void texture3d_srgb_transfer(struct wined3d_texture *texture, unsigned in if (!(data.addr = HeapAlloc(GetProcessHeap(), 0, sub_resource->size))) return; + wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch); wined3d_texture_bind_and_dirtify(texture, context, !dest_is_srgb); texture3d_download_data(texture, sub_resource_idx, context, &data); wined3d_texture_bind_and_dirtify(texture, context, dest_is_srgb); - wined3d_volume_upload_data(texture, sub_resource_idx, context, wined3d_const_bo_address(&data)); + texture3d_upload_data(texture, sub_resource_idx, context, + wined3d_const_bo_address(&data), row_pitch, slice_pitch); HeapFree(GetProcessHeap(), 0, data.addr); }
1
0
0
0
Henri Verbeet : wined3d: Use wined3d_texture_upload_data() in wined3d_device_update_texture_3d().
by Alexandre Julliard
01 Aug '16
01 Aug '16
Module: wine Branch: master Commit: 1cc4d8486b817681ff7e519a2ff190f52edf1c97 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1cc4d8486b817681ff7e519a2…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Aug 1 12:49:03 2016 +0200 wined3d: Use wined3d_texture_upload_data() in wined3d_device_update_texture_3d(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/device.c | 2 +- dlls/wined3d/texture.c | 2 +- dlls/wined3d/wined3d_private.h | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index dfcebc0..1ada36e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3607,7 +3607,7 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device, data.buffer_object = 0; data.addr = src.data; - wined3d_volume_upload_data(dst_texture, i, context, &data); + wined3d_texture_upload_data(dst_texture, i, context, &data, src.row_pitch, src.slice_pitch); wined3d_texture_invalidate_location(dst_texture, i, ~WINED3D_LOCATION_TEXTURE_RGB); if (FAILED(hr = wined3d_resource_unmap(&src_texture->resource, src_level + i))) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 4a9ed42..51b02d8 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1426,7 +1426,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture, return WINED3D_OK; } -static void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx, +void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx, const struct wined3d_context *context, const struct wined3d_const_bo_address *data, unsigned int row_pitch, unsigned int slice_pitch) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index e933909..c1bc638 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2768,6 +2768,9 @@ void wined3d_texture_set_swapchain(struct wined3d_texture *texture, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; void wined3d_texture_unmap_bo_address(const struct wined3d_bo_address *data, const struct wined3d_gl_info *gl_info, GLenum binding) DECLSPEC_HIDDEN; +void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx, + const struct wined3d_context *context, const struct wined3d_const_bo_address *data, + unsigned int row_pitch, unsigned int slice_pitch) DECLSPEC_HIDDEN; void wined3d_texture_validate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, DWORD location) DECLSPEC_HIDDEN;
1
0
0
0
Nikolay Sivov : comctl32/listview: Remove redundant check in LVM_DELETECOLUMN handler.
by Alexandre Julliard
01 Aug '16
01 Aug '16
Module: wine Branch: master Commit: e0361765ab3bea4eae6d970176032dc6f4ce2df3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e0361765ab3bea4eae6d97017…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Aug 1 12:18:51 2016 +0300 comctl32/listview: Remove redundant check in LVM_DELETECOLUMN handler. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/listview.c | 4 ++-- dlls/comctl32/tests/listview.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index a32c594..6ab360b 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -5621,8 +5621,8 @@ static BOOL LISTVIEW_DeleteColumn(LISTVIEW_INFO *infoPtr, INT nColumn) TRACE("nColumn=%d\n", nColumn); - if (nColumn < 0 || DPA_GetPtrCount(infoPtr->hdpaColumns) == 0 - || nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return FALSE; + if (nColumn < 0 || nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) + return FALSE; /* While the MSDN specifically says that column zero should not be deleted, what actually happens is that the column itself is deleted but no items or subitems diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 8214d7b..97f611f 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -1420,6 +1420,12 @@ static void test_columns(void) 10, 10, 100, 200, hwndparent, NULL, NULL, NULL); ok(hwnd != NULL, "failed to create listview window\n"); + rc = SendMessageA(hwnd, LVM_DELETECOLUMN, -1, 0); + ok(!rc, "got %d\n", rc); + + rc = SendMessageA(hwnd, LVM_DELETECOLUMN, 0, 0); + ok(!rc, "got %d\n", rc); + /* Add a column with no mask */ memset(&column, 0xcc, sizeof(column)); column.mask = 0;
1
0
0
0
Nikolay Sivov : comctl32/listview: Filter invalid indices when setting selection mark.
by Alexandre Julliard
01 Aug '16
01 Aug '16
Module: wine Branch: master Commit: 5faab43d34f48030fdbf6689c92aa3e82e00aefc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5faab43d34f48030fdbf6689c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Aug 1 12:18:50 2016 +0300 comctl32/listview: Filter invalid indices when setting selection mark. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/listview.c | 3 ++- dlls/comctl32/tests/listview.c | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index cfdb7de..a32c594 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -9053,7 +9053,8 @@ static INT LISTVIEW_SetSelectionMark(LISTVIEW_INFO *infoPtr, INT nIndex) TRACE("(nIndex=%d)\n", nIndex); - infoPtr->nSelectionMark = nIndex; + if (nIndex >= -1 && nIndex < infoPtr->nItemCount) + infoPtr->nSelectionMark = nIndex; return nOldIndex; } diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 549dc21..8214d7b 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -2257,7 +2257,29 @@ static void test_multiselect(void) item_count = SendMessageA(hwnd, LVM_GETITEMCOUNT, 0, 0); expect(items, item_count); - for (i = 0; i < 4; i++) { + r = SendMessageA(hwnd, LVM_SETSELECTIONMARK, 0, -1); + ok(r == -1, "got %d\n", r); + + r = SendMessageA(hwnd, LVM_SETSELECTIONMARK, 0, 0); + ok(r == -1, "got %d\n", r); + + r = SendMessageA(hwnd, LVM_SETSELECTIONMARK, 0, 0); + ok(r == 0, "got %d\n", r); + + /* out of range index */ + r = SendMessageA(hwnd, LVM_SETSELECTIONMARK, 0, items); + ok(r == 0, "got %d\n", r); + + r = SendMessageA(hwnd, LVM_GETSELECTIONMARK, 0, 0); + ok(r == 0, "got %d\n", r); + + r = SendMessageA(hwnd, LVM_SETSELECTIONMARK, 0, -2); + ok(r == 0, "got %d\n", r); + + r = SendMessageA(hwnd, LVM_GETSELECTIONMARK, 0, 0); + ok(r == 0, "got %d\n", r); + + for (i = 0; i < sizeof(task_list)/sizeof(task_list[0]); i++) { DWORD selected_count; LVITEMA item;
1
0
0
0
Huw Davies : gdi32: Only reselect the objects if the linear transform portion changes.
by Alexandre Julliard
01 Aug '16
01 Aug '16
Module: wine Branch: master Commit: 28bb9d15a69a749e3de6a9f5c026dc6cd0a5bf27 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=28bb9d15a69a749e3de6a9f5c…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Aug 1 09:43:18 2016 +0100 gdi32: Only reselect the objects if the linear transform portion changes. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/dc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 92a98df..27e89ae 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -325,6 +325,17 @@ static void construct_window_to_viewport(DC *dc, XFORM *xform) } /*********************************************************************** + * linear_xform_cmp + * + * Compares the linear transform portion of two XFORMs (i.e. the 2x2 submatrix). + * Returns 0 if they match. + */ +static inline int linear_xform_cmp( const XFORM *a, const XFORM *b ) +{ + return memcmp( a, b, FIELD_OFFSET( XFORM, eDx ) ); +} + +/*********************************************************************** * DC_UpdateXforms * * Updates the xformWorld2Vport, xformVport2World and vport2WorldValid @@ -351,7 +362,7 @@ void DC_UpdateXforms( DC *dc ) /* Reselect the font and pen back into the dc so that the size gets updated. */ - if (memcmp(&oldworld2vport, &dc->xformWorld2Vport, sizeof(oldworld2vport)) && + if (linear_xform_cmp( &oldworld2vport, &dc->xformWorld2Vport ) && !GdiIsMetaFileDC(dc->hSelf)) { SelectObject(dc->hSelf, dc->hFont);
1
0
0
0
Nikolay Sivov : ucrtbase: Added __stdio_common_vsnwprintf_s().
by Alexandre Julliard
01 Aug '16
01 Aug '16
Module: wine Branch: master Commit: 24291f2b6a96b0cffb738b5304e60fe9cf5efdd5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=24291f2b6a96b0cffb738b530…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Jul 28 22:21:49 2016 +0300 ucrtbase: Added __stdio_common_vsnwprintf_s(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-crt-stdio-l1-1-0.spec | 2 +- dlls/msvcrt/wcs.c | 70 ++++++++++++++-------- dlls/ucrtbase/tests/printf.c | 56 +++++++++++++++++ dlls/ucrtbase/ucrtbase.spec | 2 +- 4 files changed, 103 insertions(+), 27 deletions(-) diff --git a/dlls/api-ms-win-crt-stdio-l1-1-0/api-ms-win-crt-stdio-l1-1-0.spec b/dlls/api-ms-win-crt-stdio-l1-1-0/api-ms-win-crt-stdio-l1-1-0.spec index 29d2e1a..4dcc065 100644 --- a/dlls/api-ms-win-crt-stdio-l1-1-0/api-ms-win-crt-stdio-l1-1-0.spec +++ b/dlls/api-ms-win-crt-stdio-l1-1-0/api-ms-win-crt-stdio-l1-1-0.spec @@ -10,7 +10,7 @@ @ stub __stdio_common_vfwprintf_s @ stub __stdio_common_vfwscanf @ cdecl __stdio_common_vsnprintf_s(int64 ptr long long ptr ptr ptr) ucrtbase.__stdio_common_vsnprintf_s -@ stub __stdio_common_vsnwprintf_s +@ cdecl __stdio_common_vsnwprintf_s(int64 ptr long long ptr ptr ptr) ucrtbase.__stdio_common_vsnwprintf_s @ cdecl __stdio_common_vsprintf(int64 ptr long ptr ptr ptr) ucrtbase.__stdio_common_vsprintf @ stub __stdio_common_vsprintf_p @ cdecl __stdio_common_vsprintf_s(int64 ptr long ptr ptr ptr) ucrtbase.__stdio_common_vsprintf_s diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index 4935e54..04a2f76 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -844,6 +844,37 @@ static int CDECL MSVCRT_vsnprintf_s_l_opt( char *str, MSVCRT_size_t sizeOfBuffer return ret; } +static int MSVCRT_vsnwprintf_s_l_opt( MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfBuffer, + MSVCRT_size_t count, const MSVCRT_wchar_t *format, DWORD options, + MSVCRT__locale_t locale, __ms_va_list valist) +{ + static const MSVCRT_wchar_t nullbyte = '\0'; + struct _str_ctx_w ctx; + int len, ret; + + len = sizeOfBuffer; + if(count!=-1 && len>count+1) + len = count+1; + + ctx.len = len; + ctx.buf = str; + ret = pf_printf_w(puts_clbk_str_w, &ctx, format, locale, MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER | options, + arg_clbk_valist, NULL, &valist); + puts_clbk_str_w(&ctx, 1, &nullbyte); + + if(ret<0 || ret==len) { + if(count!=MSVCRT__TRUNCATE && count>sizeOfBuffer) { + MSVCRT_INVALID_PMT("str[sizeOfBuffer] is too small", MSVCRT_ERANGE); + memset(str, 0, sizeOfBuffer*sizeof(MSVCRT_wchar_t)); + } else + str[len-1] = '\0'; + + return -1; + } + + return ret; +} + /********************************************************************* * _vsnprintf_s_l (MSVCRT.@) */ @@ -899,6 +930,18 @@ int CDECL MSVCRT__stdio_common_vsnprintf_s( unsigned __int64 options, } /********************************************************************* + * __stdio_common_vsnwprintf_s (MSVCRT.@) + */ +int CDECL MSVCRT__stdio_common_vsnwprintf_s( unsigned __int64 options, + MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfBuffer, MSVCRT_size_t count, + const MSVCRT_wchar_t *format, MSVCRT__locale_t locale, __ms_va_list valist ) +{ + if (options & ~UCRTBASE_PRINTF_MASK) + FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); + return MSVCRT_vsnwprintf_s_l_opt(str, sizeOfBuffer, count, format, options & UCRTBASE_PRINTF_MASK, locale, valist); +} + +/********************************************************************* * __stdio_common_vsprintf_s (MSVCRT.@) */ int CDECL MSVCRT__stdio_common_vsprintf_s( unsigned __int64 options, @@ -1098,6 +1141,7 @@ int CDECL MSVCRT__vswprintf_p(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, return MSVCRT_vswprintf_p_l(buffer, length, format, NULL, args); } + /********************************************************************* * _vsnwprintf_s_l (MSVCRT.@) */ @@ -1105,31 +1149,7 @@ int CDECL MSVCRT_vsnwprintf_s_l( MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfBuffer MSVCRT_size_t count, const MSVCRT_wchar_t *format, MSVCRT__locale_t locale, __ms_va_list valist) { - static const MSVCRT_wchar_t nullbyte = '\0'; - struct _str_ctx_w ctx; - int len, ret; - - len = sizeOfBuffer; - if(count!=-1 && len>count+1) - len = count+1; - - ctx.len = len; - ctx.buf = str; - ret = pf_printf_w(puts_clbk_str_w, &ctx, format, locale, MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER, - arg_clbk_valist, NULL, &valist); - puts_clbk_str_w(&ctx, 1, &nullbyte); - - if(ret<0 || ret==len) { - if(count!=MSVCRT__TRUNCATE && count>sizeOfBuffer) { - MSVCRT_INVALID_PMT("str[sizeOfBuffer] is too small", MSVCRT_ERANGE); - memset(str, 0, sizeOfBuffer*sizeof(MSVCRT_wchar_t)); - } else - str[len-1] = '\0'; - - return -1; - } - - return ret; + return MSVCRT_vsnwprintf_s_l_opt(str, sizeOfBuffer, count, format, 0, locale, valist); } /********************************************************************* diff --git a/dlls/ucrtbase/tests/printf.c b/dlls/ucrtbase/tests/printf.c index 196b9cb..973217e 100644 --- a/dlls/ucrtbase/tests/printf.c +++ b/dlls/ucrtbase/tests/printf.c @@ -99,6 +99,8 @@ static int (__cdecl *p_vsprintf_s)(unsigned __int64 options, char *str, size_t c void *locale, __ms_va_list valist); static int (__cdecl *p_vswprintf)(unsigned __int64 options, wchar_t *str, size_t len, const wchar_t *format, void *locale, __ms_va_list valist); +static int (__cdecl *p_vsnwprintf_s)(unsigned __int64 options, WCHAR *str, size_t sizeOfBuffer, size_t count, const WCHAR *format, + void *locale, __ms_va_list valist); static FILE *(__cdecl *p_fopen)(const char *name, const char *mode); static int (__cdecl *p_fclose)(FILE *file); @@ -135,6 +137,7 @@ static BOOL init( void ) p_vfwprintf = (void *)GetProcAddress(hmod, "__stdio_common_vfwprintf"); p_vsprintf = (void *)GetProcAddress(hmod, "__stdio_common_vsprintf"); p_vsnprintf_s = (void *)GetProcAddress(hmod, "__stdio_common_vsnprintf_s"); + p_vsnwprintf_s = (void *)GetProcAddress(hmod, "__stdio_common_vsnwprintf_s"); p_vsprintf_s = (void *)GetProcAddress(hmod, "__stdio_common_vsprintf_s"); p_vswprintf = (void *)GetProcAddress(hmod, "__stdio_common_vswprintf"); @@ -516,6 +519,58 @@ static void test_vsnprintf_s(void) ok( !strcmp(out1, buffer), "buffer wrong, got=%s\n", buffer); } +static int __cdecl _vsnwprintf_s_wrapper(WCHAR *str, size_t sizeOfBuffer, + size_t count, const WCHAR *format, ...) +{ + int ret; + __ms_va_list valist; + __ms_va_start(valist, format); + ret = p_vsnwprintf_s(0, str, sizeOfBuffer, count, format, NULL, valist); + __ms_va_end(valist); + return ret; +} + +static void test_vsnwprintf_s(void) +{ + const WCHAR format[] = {'A','B','%','u','C',0}; + const WCHAR out7[] = {'A','B','1','2','3','C',0}; + const WCHAR out6[] = {'A','B','1','2','3',0}; + const WCHAR out2[] = {'A',0}; + const WCHAR out1[] = {0}; + WCHAR buffer[14] = { 0 }; + int exp, got; + + /* Enough room. */ + exp = lstrlenW(out7); + + got = _vsnwprintf_s_wrapper(buffer, 14, _TRUNCATE, format, 123); + ok( exp == got, "length wrong, expect=%d, got=%d\n", exp, got); + ok( !lstrcmpW(out7, buffer), "buffer wrong, got=%s\n", wine_dbgstr_w(buffer)); + + got = _vsnwprintf_s_wrapper(buffer, 12, _TRUNCATE, format, 123); + ok( exp == got, "length wrong, expect=%d, got=%d\n", exp, got); + ok( !lstrcmpW(out7, buffer), "buffer wrong, got=%s\n", wine_dbgstr_w(buffer)); + + got = _vsnwprintf_s_wrapper(buffer, 7, _TRUNCATE, format, 123); + ok( exp == got, "length wrong, expect=%d, got=%d\n", exp, got); + ok( !lstrcmpW(out7, buffer), "buffer wrong, got=%s\n", wine_dbgstr_w(buffer)); + + /* Not enough room. */ + exp = -1; + + got = _vsnwprintf_s_wrapper(buffer, 6, _TRUNCATE, format, 123); + ok( exp == got, "length wrong, expect=%d, got=%d\n", exp, got); + ok( !lstrcmpW(out6, buffer), "buffer wrong, got=%s\n", wine_dbgstr_w(buffer)); + + got = _vsnwprintf_s_wrapper(buffer, 2, _TRUNCATE, format, 123); + ok( exp == got, "length wrong, expect=%d, got=%d\n", exp, got); + ok( !lstrcmpW(out2, buffer), "buffer wrong, got=%s\n", wine_dbgstr_w(buffer)); + + got = _vsnwprintf_s_wrapper(buffer, 1, _TRUNCATE, format, 123); + ok( exp == got, "length wrong, expect=%d, got=%d\n", exp, got); + ok( !lstrcmpW(out1, buffer), "buffer wrong, got=%s\n", wine_dbgstr_w(buffer)); +} + static void test_printf_legacy_wide(void) { const wchar_t wide[] = {'A','B','C','D',0}; @@ -614,6 +669,7 @@ START_TEST(printf) test_fprintf(); test_fwprintf(); test_vsnprintf_s(); + test_vsnwprintf_s(); test_printf_legacy_wide(); test_printf_legacy_msvcrt(); test_printf_legacy_three_digit_exp(); diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 2a34404..24a7f1f 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -155,7 +155,7 @@ @ stub __stdio_common_vfwprintf_s @ stub __stdio_common_vfwscanf @ cdecl __stdio_common_vsnprintf_s(int64 ptr long long ptr ptr ptr) MSVCRT__stdio_common_vsnprintf_s -@ stub __stdio_common_vsnwprintf_s +@ cdecl __stdio_common_vsnwprintf_s(int64 ptr long long ptr ptr ptr) MSVCRT__stdio_common_vsnwprintf_s @ cdecl __stdio_common_vsprintf(int64 ptr long ptr ptr ptr) MSVCRT__stdio_common_vsprintf @ stub __stdio_common_vsprintf_p @ cdecl __stdio_common_vsprintf_s(int64 ptr long ptr ptr ptr) MSVCRT__stdio_common_vsprintf_s
1
0
0
0
← Newer
1
...
74
75
76
77
78
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
Results per page:
10
25
50
100
200