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
July
June
May
April
March
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 2012
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
541 discussions
Start a n
N
ew thread
Jacek Caban : rpcrt4: Optimize buffer allocation in rpcrt4_ncacn_http_read.
by Alexandre Julliard
14 Aug '12
14 Aug '12
Module: wine Branch: master Commit: 9eeedc27237655ee025509a9c6c944560b7fac55 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9eeedc27237655ee025509a9c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Aug 14 13:35:36 2012 +0200 rpcrt4: Optimize buffer allocation in rpcrt4_ncacn_http_read. --- dlls/rpcrt4/rpc_transport.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index ef18c64..445f186 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -2440,31 +2440,32 @@ static int rpcrt4_ncacn_http_read(RpcConnection *Connection, unsigned int bytes_left = count; RPC_STATUS status = RPC_S_OK; + httpc->async_data->inet_buffers.lpvBuffer = HeapAlloc(GetProcessHeap(), 0, count); + while (bytes_left) { httpc->async_data->inet_buffers.dwBufferLength = bytes_left; - httpc->async_data->inet_buffers.lpvBuffer = HeapAlloc(GetProcessHeap(), 0, bytes_left); prepare_async_request(httpc->async_data); ret = InternetReadFileExA(httpc->out_request, &httpc->async_data->inet_buffers, IRF_ASYNC, 0); status = wait_async_request(httpc->async_data, ret, httpc->cancel_event); if(status != RPC_S_OK) { if(status == RPC_S_CALL_CANCELLED) TRACE("call cancelled\n"); - HeapFree(GetProcessHeap(), 0, httpc->async_data->inet_buffers.lpvBuffer); - httpc->async_data->inet_buffers.lpvBuffer = NULL; break; } - memcpy(buf, httpc->async_data->inet_buffers.lpvBuffer, - httpc->async_data->inet_buffers.dwBufferLength); - HeapFree(GetProcessHeap(), 0, httpc->async_data->inet_buffers.lpvBuffer); - httpc->async_data->inet_buffers.lpvBuffer = NULL; if(!httpc->async_data->inet_buffers.dwBufferLength) break; + memcpy(buf, httpc->async_data->inet_buffers.lpvBuffer, + httpc->async_data->inet_buffers.dwBufferLength); bytes_left -= httpc->async_data->inet_buffers.dwBufferLength; buf += httpc->async_data->inet_buffers.dwBufferLength; } + + HeapFree(GetProcessHeap(), 0, httpc->async_data->inet_buffers.lpvBuffer); + httpc->async_data->inet_buffers.lpvBuffer = NULL; + TRACE("%p %p %u -> %u\n", httpc->out_request, buffer, count, status); return status == RPC_S_OK ? count : -1; }
1
0
0
0
Jacek Caban : rpcrt4: Use helper for handling async call wait.
by Alexandre Julliard
14 Aug '12
14 Aug '12
Module: wine Branch: master Commit: 5e6aca795595accf8380da8b87bfa77e75694906 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e6aca795595accf8380da8b8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Aug 14 13:35:17 2012 +0200 rpcrt4: Use helper for handling async call wait. --- dlls/rpcrt4/rpc_transport.c | 191 +++++++++++++----------------------------- 1 files changed, 59 insertions(+), 132 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5e6aca795595accf8380d…
1
0
0
0
Jacek Caban : rpcrt4: Added prepare_async_request helper.
by Alexandre Julliard
14 Aug '12
14 Aug '12
Module: wine Branch: master Commit: cba1cfc645bd605ed06422f630211cd8de4b0fd7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cba1cfc645bd605ed06422f63…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Aug 14 13:35:06 2012 +0200 rpcrt4: Added prepare_async_request helper. --- dlls/rpcrt4/rpc_transport.c | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index f873f71..501e5cc 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -1870,6 +1870,12 @@ static ULONG RpcHttpAsyncData_Release(RpcHttpAsyncData *data) return refs; } +static void prepare_async_request(RpcHttpAsyncData *async_data) +{ + ResetEvent(async_data->completion_event); + RpcHttpAsyncData_AddRef(async_data); +} + typedef struct _RpcConnection_http { RpcConnection common; @@ -2165,8 +2171,7 @@ static RPC_STATUS rpcrt4_http_prepare_in_pipe(HINTERNET in_request, RpcHttpAsync DWORD bytes_read, bytes_written; /* prepare in pipe */ - ResetEvent(async_data->completion_event); - RpcHttpAsyncData_AddRef(async_data); + prepare_async_request(async_data); ret = HttpSendRequestW(in_request, NULL, 0, NULL, 0); if (!ret) { @@ -2189,8 +2194,7 @@ static RPC_STATUS rpcrt4_http_prepare_in_pipe(HINTERNET in_request, RpcHttpAsync buffers_in.dwStructSize = sizeof(buffers_in); /* FIXME: get this from the registry */ buffers_in.dwBufferTotal = 1024 * 1024 * 1024; /* 1Gb */ - ResetEvent(async_data->completion_event); - RpcHttpAsyncData_AddRef(async_data); + prepare_async_request(async_data); ret = HttpSendRequestExW(in_request, &buffers_in, NULL, 0, 0); if (!ret) { @@ -2279,8 +2283,7 @@ static RPC_STATUS rpcrt4_http_prepare_out_pipe(HINTERNET out_request, RpcPktHdr pkt_from_server; ULONG field1, field3; - ResetEvent(async_data->completion_event); - RpcHttpAsyncData_AddRef(async_data); + prepare_async_request(async_data); ret = HttpSendRequestW(out_request, NULL, 0, NULL, 0); if (!ret) { @@ -2301,8 +2304,8 @@ static RPC_STATUS rpcrt4_http_prepare_out_pipe(HINTERNET out_request, hdr = RPCRT4_BuildHttpConnectHeader(0, TRUE, connection_uuid, out_pipe_uuid, NULL); if (!hdr) return RPC_S_OUT_OF_RESOURCES; - ResetEvent(async_data->completion_event); - RpcHttpAsyncData_AddRef(async_data); + + prepare_async_request(async_data); ret = HttpSendRequestW(out_request, NULL, 0, hdr, hdr->common.frag_len); if (!ret) {
1
0
0
0
Jacek Caban : rpcrt4: Use proper helper for IRpcStubBuffer call.
by Alexandre Julliard
14 Aug '12
14 Aug '12
Module: wine Branch: master Commit: 567e49f21a33c512ce2274afe116c7184ed191b8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=567e49f21a33c512ce2274afe…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Aug 14 13:34:56 2012 +0200 rpcrt4: Use proper helper for IRpcStubBuffer call. --- dlls/rpcrt4/cstub.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/rpcrt4/cstub.c b/dlls/rpcrt4/cstub.c index 74801f6..680b22e 100644 --- a/dlls/rpcrt4/cstub.c +++ b/dlls/rpcrt4/cstub.c @@ -372,7 +372,7 @@ HRESULT WINAPI CStdStubBuffer_QueryInterface(LPRPCSTUBBUFFER iface, if (IsEqualIID(&IID_IUnknown, riid) || IsEqualIID(&IID_IRpcStubBuffer, riid)) { - IUnknown_AddRef(iface); + IRpcStubBuffer_AddRef(iface); *obj = iface; return S_OK; }
1
0
0
0
Jacek Caban : vbscript: Added shell registry for VBSFile.
by Alexandre Julliard
14 Aug '12
14 Aug '12
Module: wine Branch: master Commit: 7931c23fef1b41bcf31a9c07bd85816c679d3af8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7931c23fef1b41bcf31a9c07b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Aug 14 12:02:01 2012 +0200 vbscript: Added shell registry for VBSFile. --- dlls/vbscript/vbscript.rgs | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/dlls/vbscript/vbscript.rgs b/dlls/vbscript/vbscript.rgs index c390d17..4513b4d 100644 --- a/dlls/vbscript/vbscript.rgs +++ b/dlls/vbscript/vbscript.rgs @@ -59,5 +59,24 @@ HKCR ForceRemove VBSFile = s 'VBScript Script File' { ScriptEngine = s 'VBScript' + Shell = s 'Open' + { + Edit + { + Command = s '"%%SystemRoot%%\system32\notepad.exe" %%1' + } + Open + { + Command = s '"%%SystemRoot%%\system32\wscript.exe" "%%1" %%*' + } + Open2 + { + Command = s '"%%SystemRoot%%\system32\cscript.exe" "%%1" %%*' + } + Print + { + Command = s '"%%SystemRoot%%\system32\notepad.exe" /p %%1' + } + } } }
1
0
0
0
Detlef Riekenberg : advpack/tests: Avoid test failures without high access rights.
by Alexandre Julliard
14 Aug '12
14 Aug '12
Module: wine Branch: master Commit: a97f81ff320920d0196cbfb572d53a718ee8e256 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a97f81ff320920d0196cbfb57…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Sun Aug 5 15:55:20 2012 +0200 advpack/tests: Avoid test failures without high access rights. --- dlls/advpack/tests/Makefile.in | 2 +- dlls/advpack/tests/install.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/advpack/tests/Makefile.in b/dlls/advpack/tests/Makefile.in index 115f180..af9d2ee 100644 --- a/dlls/advpack/tests/Makefile.in +++ b/dlls/advpack/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = advpack.dll -IMPORTS = cabinet advapi32 +IMPORTS = cabinet advapi32 advpack C_SRCS = \ advpack.c \ diff --git a/dlls/advpack/tests/install.c b/dlls/advpack/tests/install.c index 6a4d8d6..4876d71 100644 --- a/dlls/advpack/tests/install.c +++ b/dlls/advpack/tests/install.c @@ -259,6 +259,12 @@ START_TEST(install) if (!init_function_pointers()) return; + if (!IsNTAdmin(0, NULL)) + { + skip("Most tests need admin rights\n"); + return; + } + GetCurrentDirectoryA(MAX_PATH, prev_path); GetTempPath(MAX_PATH, temp_path); SetCurrentDirectoryA(temp_path);
1
0
0
0
Nikolay Bogoychev : wined3d: Recognize GeForce GT 630M.
by Alexandre Julliard
14 Aug '12
14 Aug '12
Module: wine Branch: master Commit: 9716c1b50c7e5bd4fe1182c96d965a190f662b78 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9716c1b50c7e5bd4fe1182c96…
Author: Nikolay Bogoychev <nheart(a)gmail.com> Date: Wed Aug 1 23:59:19 2012 +0100 wined3d: Recognize GeForce GT 630M. --- dlls/wined3d/directx.c | 2 ++ dlls/wined3d/wined3d_private.h | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index e00c9b4..e47b4e1 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1106,6 +1106,7 @@ static const struct gpu_description gpu_description_table[] = {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX560, "NVIDIA GeForce GTX 560", DRIVER_NVIDIA_GEFORCE6, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX570, "NVIDIA GeForce GTX 570", DRIVER_NVIDIA_GEFORCE6, 1280}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX580, "NVIDIA GeForce GTX 580", DRIVER_NVIDIA_GEFORCE6, 1536}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT630M, "NVIDIA GeForce GT 630M", DRIVER_NVIDIA_GEFORCE6, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX670, "NVIDIA GeForce GTX 670", DRIVER_NVIDIA_GEFORCE6, 2048}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX680, "NVIDIA GeForce GTX 680", DRIVER_NVIDIA_GEFORCE6, 2048}, @@ -1504,6 +1505,7 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl { {"GTX 680", CARD_NVIDIA_GEFORCE_GTX680}, /* Geforce 600 - highend */ {"GTX 670", CARD_NVIDIA_GEFORCE_GTX670}, /* Geforce 600 - midend high */ + {"GT 630M", CARD_NVIDIA_GEFORCE_GT630M}, /* Geforce 600 - midend mobile */ {"GTX 580", CARD_NVIDIA_GEFORCE_GTX580}, /* Geforce 500 - highend */ {"GTX 570", CARD_NVIDIA_GEFORCE_GTX570}, /* Geforce 500 - midend high */ {"GTX 560 Ti", CARD_NVIDIA_GEFORCE_GTX560TI}, /* Geforce 500 - midend */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index b6f96c0..36edf20 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1402,6 +1402,7 @@ enum wined3d_pci_device CARD_NVIDIA_GEFORCE_GTX560 = 0x1201, CARD_NVIDIA_GEFORCE_GTX570 = 0x1081, CARD_NVIDIA_GEFORCE_GTX580 = 0x1080, + CARD_NVIDIA_GEFORCE_GT630M = 0x0de9, CARD_NVIDIA_GEFORCE_GTX670 = 0x1189, CARD_NVIDIA_GEFORCE_GTX680 = 0x1180,
1
0
0
0
Dmitry Timoshkov : gdiplus: get_font_hfont helper should transform returned font height using font and device unit /resolution/scale.
by Alexandre Julliard
14 Aug '12
14 Aug '12
Module: wine Branch: master Commit: 889be9d447329994f009726d4e79a2fb3772e456 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=889be9d447329994f009726d4…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Aug 9 12:55:19 2012 +0900 gdiplus: get_font_hfont helper should transform returned font height using font and device unit/resolution/scale. --- dlls/gdiplus/gdiplus.c | 6 ++++++ dlls/gdiplus/gdiplus_private.h | 1 + dlls/gdiplus/graphics.c | 20 ++++++++++++++++++-- dlls/gdiplus/tests/graphics.c | 29 +++++++++++++++++++++-------- 4 files changed, 46 insertions(+), 10 deletions(-) diff --git a/dlls/gdiplus/gdiplus.c b/dlls/gdiplus/gdiplus.c index ed2dcae..0146a0f 100644 --- a/dlls/gdiplus/gdiplus.c +++ b/dlls/gdiplus/gdiplus.c @@ -389,6 +389,12 @@ REAL pixels_to_units(REAL pixels, GpUnit unit, REAL dpi) } } +REAL units_scale(GpUnit from, GpUnit to, REAL dpi) +{ + REAL pixels = units_to_pixels(1.0, from, dpi); + return pixels_to_units(pixels, to, dpi); +} + /* Calculates Bezier points from cardinal spline points. */ void calc_curve_bezier(CONST GpPointF *pts, REAL tension, REAL *x1, REAL *y1, REAL *x2, REAL *y2) diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index 0c7e055..ac070fe 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -51,6 +51,7 @@ extern GpStatus hresult_to_status(HRESULT res) DECLSPEC_HIDDEN; extern REAL convert_unit(REAL logpixels, GpUnit unit) DECLSPEC_HIDDEN; extern REAL units_to_pixels(REAL units, GpUnit unit, REAL dpi) DECLSPEC_HIDDEN; extern REAL pixels_to_units(REAL pixels, GpUnit unit, REAL dpi) DECLSPEC_HIDDEN; +extern REAL units_scale(GpUnit from, GpUnit to, REAL dpi) DECLSPEC_HIDDEN; extern GpStatus graphics_from_image(GpImage *image, GpGraphics **graphics) DECLSPEC_HIDDEN; diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 101b73a..41034e5 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -2115,11 +2115,27 @@ static void get_font_hfont(GpGraphics *graphics, GDIPCONST GpFont *font, HFONT * { HDC hdc = CreateCompatibleDC(0); GpPointF pt[3]; - REAL angle, rel_width, rel_height; + REAL angle, rel_width, rel_height, font_height, font_to_pixel_scale; LOGFONTW lfw; HFONT unscaled_font; TEXTMETRICW textmet; + font_to_pixel_scale = units_scale(UnitPoint, UnitPixel, font->family->dpi); + + if (font->unit == UnitPixel) + font_height = font->emSize * font_to_pixel_scale; + else + { + REAL unit_scale, res; + + res = (graphics->unit == UnitDisplay || graphics->unit == UnitPixel) ? graphics->xres : graphics->yres; + unit_scale = units_scale(font->unit, graphics->unit, res); + + font_height = font->emSize * font_to_pixel_scale * unit_scale; + if (graphics->unit != UnitDisplay) + font_height /= graphics->scale; + } + pt[0].X = 0.0; pt[0].Y = 0.0; pt[1].X = 1.0; @@ -2135,7 +2151,7 @@ static void get_font_hfont(GpGraphics *graphics, GDIPCONST GpFont *font, HFONT * (pt[2].X-pt[0].X)*(pt[2].X-pt[0].X)); get_log_fontW(font, graphics, &lfw); - lfw.lfHeight = roundr(lfw.lfHeight * rel_height); + lfw.lfHeight = roundr(font_height * rel_height); unscaled_font = CreateFontIndirectW(&lfw); SelectObject(hdc, unscaled_font); diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 5f1213c..fb0c1cd 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -3495,14 +3495,6 @@ static void test_GdipMeasureString(void) base_cy = bounds.Height; } - /* FIXME: remove once Wine is fixed */ - if (fabs(height - bounds.Height) > height / 100.0) - { - /* further testing is useless */ - GdipDeleteGraphics(graphics); - continue; - } - expectf(0.0, bounds.X); expectf(0.0, bounds.Y); expectf_(height, bounds.Height, height / 100.0); @@ -3521,6 +3513,13 @@ static void test_GdipMeasureString(void) expect(Ok, status); expectf(50.0, bounds.X); expectf(50.0, bounds.Y); + /* FIXME: remove once Wine is fixed */ + if (fabs(height - bounds.Height) > height / 100.0) + { + /* further testing is useless */ + GdipDeleteGraphics(graphics); + continue; + } expectf_(height, bounds.Height, height / 100.0); expectf_(bounds.Height / base_cy, bounds.Width / base_cx, 0.05); expect(7, chars); @@ -3595,6 +3594,13 @@ static void test_GdipMeasureString(void) expectf(0.0, bounds.X); expectf(0.0, bounds.Y); + /* FIXME: remove once Wine is fixed */ + if (fabs(height - bounds.Height) > height / 85.0) + { + /* further testing is useless */ + GdipDeleteGraphics(graphics); + continue; + } expectf_(height, bounds.Height, height / 85.0); expectf_(bounds.Height / base_cy, bounds.Width / base_cx, 0.05); expect(7, chars); @@ -3611,6 +3617,13 @@ static void test_GdipMeasureString(void) expect(Ok, status); expectf(50.0, bounds.X); expectf(50.0, bounds.Y); + /* FIXME: remove once Wine is fixed */ + if (fabs(height - bounds.Height) > height / 85.0) + { + /* further testing is useless */ + GdipDeleteGraphics(graphics); + continue; + } expectf_(height, bounds.Height, height / 85.0); expectf_(bounds.Height / base_cy, bounds.Width / base_cx, 0.05); expect(7, chars);
1
0
0
0
Dmitry Timoshkov : gdiplus: GdipGetLogFontW should transform returned font height using font and device unit /resolution/scale.
by Alexandre Julliard
14 Aug '12
14 Aug '12
Module: wine Branch: master Commit: f8b11542266e78f9ac7b7161da2474cf772860fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f8b11542266e78f9ac7b7161d…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Aug 9 12:54:48 2012 +0900 gdiplus: GdipGetLogFontW should transform returned font height using font and device unit/resolution/scale. --- dlls/gdiplus/font.c | 19 +++++++++++++++++-- dlls/gdiplus/tests/graphics.c | 12 ------------ 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 9d545e0..51fda73 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -449,8 +449,23 @@ GpStatus WINGDIPAPI GdipGetLogFontA(GpFont *font, GpGraphics *graphics, void get_log_fontW(const GpFont *font, GpGraphics *graphics, LOGFONTW *lf) { - /* FIXME: use graphics */ - lf->lfHeight = -units_to_pixels(font->emSize, font->unit, font->family->dpi); + REAL height; + + if (font->unit == UnitPixel) + { + height = units_to_pixels(font->emSize, graphics->unit, graphics->yres); + if (graphics->unit != UnitDisplay) + height *= graphics->scale; + } + else + { + if (graphics->unit == UnitDisplay || graphics->unit == UnitPixel) + height = units_to_pixels(font->emSize, font->unit, graphics->xres); + else + height = units_to_pixels(font->emSize, font->unit, graphics->yres); + } + + lf->lfHeight = -(height + 0.5); lf->lfWidth = 0; lf->lfEscapement = 0; lf->lfOrientation = 0; diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 2c32390..5f1213c 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -3479,19 +3479,8 @@ static void test_GdipMeasureString(void) height = units_to_pixels(font_size, td[i].unit, td[i].res_y); if (td[i].unit != UnitDisplay) height *= td[i].page_scale; - /* FIXME: remove once Wine is fixed */ - if (td[i].unit == UnitDisplay || (td[i].unit == UnitPixel && td[i].page_scale == 1.0)) - ok(-lf.lfHeight == (LONG)(height + 0.5), "%u: expected %d (%f), got %d\n", - i, (LONG)(height + 0.5), height, lf.lfHeight); - else - { - todo_wine ok(-lf.lfHeight == (LONG)(height + 0.5), "%u: expected %d (%f), got %d\n", i, (LONG)(height + 0.5), height, lf.lfHeight); - /* further testing is useless */ - GdipDeleteGraphics(graphics); - continue; - } height = font_size * font_to_pixel_scale; @@ -3572,7 +3561,6 @@ static void test_GdipMeasureString(void) else height = units_to_pixels(font_size, font_unit, td[i].res_y); /*trace("%.1f font units = %f pixels with %.1f dpi, page_scale %.1f\n", font_size, height, td[i].res_y, td[i].page_scale);*/ -todo_wine ok(-lf.lfHeight == (LONG)(height + 0.5), "%u: expected %d (%f), got %d\n", i, (LONG)(height + 0.5), height, lf.lfHeight);
1
0
0
0
Dmitry Timoshkov : Revert commit b20a1f56b0c915b24f70b8be83fbf76ea7378123.
by Alexandre Julliard
14 Aug '12
14 Aug '12
Module: wine Branch: master Commit: e9af648aeb3f6066ccf9fa2df6cb704a92b3310d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e9af648aeb3f6066ccf9fa2df…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Aug 9 12:54:20 2012 +0900 Revert commit b20a1f56b0c915b24f70b8be83fbf76ea7378123. --- dlls/gdiplus/graphics.c | 35 +++-------------------------------- 1 files changed, 3 insertions(+), 32 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 5ad2f56..101b73a 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -4910,30 +4910,6 @@ static GpStatus measure_ranges_callback(HDC hdc, return stat; } -static void rect_to_pixels(const RectF *in, const GpGraphics *graphics, RectF *out) -{ - REAL dpi; - - GdipGetDpiX((GpGraphics *)graphics, &dpi); - out->X = units_to_pixels(in->X, graphics->unit, dpi); - out->Width = units_to_pixels(in->Width, graphics->unit, dpi); - GdipGetDpiY((GpGraphics *)graphics, &dpi); - out->Y = units_to_pixels(in->Y, graphics->unit, dpi); - out->Height = units_to_pixels(in->Height, graphics->unit, dpi); -} - -static void rect_to_units(const RectF *in, const GpGraphics *graphics, RectF *out) -{ - REAL dpi; - - GdipGetDpiX((GpGraphics *)graphics, &dpi); - out->X = pixels_to_units(in->X, graphics->unit, dpi); - out->Width = pixels_to_units(in->Width, graphics->unit, dpi); - GdipGetDpiY((GpGraphics *)graphics, &dpi); - out->Y = pixels_to_units(in->Y, graphics->unit, dpi); - out->Height = pixels_to_units(in->Height, graphics->unit, dpi); -} - GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics, GDIPCONST WCHAR* string, INT length, GDIPCONST GpFont* font, GDIPCONST RectF* layoutRect, GDIPCONST GpStringFormat *stringFormat, @@ -5037,7 +5013,6 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics, struct measure_string_args args; HDC temp_hdc=NULL, hdc; GpPointF pt[3]; - RectF rect_pixels; TRACE("(%p, %s, %i, %p, %s, %p, %p, %p, %p)\n", graphics, debugstr_wn(string, length), length, font, debugstr_rectf(rect), format, @@ -5075,10 +5050,8 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics, get_font_hfont(graphics, font, &gdifont); oldfont = SelectObject(hdc, gdifont); - rect_to_pixels(rect, graphics, &rect_pixels); - - bounds->X = rect_pixels.X; - bounds->Y = rect_pixels.Y; + bounds->X = rect->X; + bounds->Y = rect->Y; bounds->Width = 0.0; bounds->Height = 0.0; @@ -5086,11 +5059,9 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics, args.codepointsfitted = codepointsfitted; args.linesfilled = linesfilled; - gdip_format_string(hdc, string, length, font, &rect_pixels, format, + gdip_format_string(hdc, string, length, font, rect, format, measure_string_callback, &args); - rect_to_units(bounds, graphics, bounds); - SelectObject(hdc, oldfont); DeleteObject(gdifont);
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
...
55
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
Results per page:
10
25
50
100
200