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
October 2015
----- 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
749 discussions
Start a n
N
ew thread
Józef Kucia : d3d/tests: Check that device implements IDXGIDevice1.
by Alexandre Julliard
26 Oct '15
26 Oct '15
Module: wine Branch: master Commit: 8b0b82a580b00ba69903d9b67f36a6cd6c563e23 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b0b82a580b00ba69903d9b67…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Oct 26 02:30:25 2015 +0100 d3d/tests: Check that device implements IDXGIDevice1. 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/d3d10_1/tests/d3d10_1.c | 4 ++++ dlls/d3d10core/tests/device.c | 5 +++++ dlls/d3d11/tests/d3d11.c | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/dlls/d3d10_1/tests/d3d10_1.c b/dlls/d3d10_1/tests/d3d10_1.c index fd865a3..c145181 100644 --- a/dlls/d3d10_1/tests/d3d10_1.c +++ b/dlls/d3d10_1/tests/d3d10_1.c @@ -95,6 +95,10 @@ static void test_device_interfaces(void) IDXGIAdapter_Release(dxgi_adapter); IDXGIDevice_Release(dxgi_device); + hr = ID3D10Device1_QueryInterface(device, &IID_IDXGIDevice1, (void **)&iface); + ok(SUCCEEDED(hr), "Device should implement IDXGIDevice1.\n"); + IUnknown_Release(iface); + hr = ID3D10Device1_QueryInterface(device, &IID_ID3D10Multithread, (void **)&iface); ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* Not available on all Windows versions. */, "Device should implement ID3D10Multithread interface, hr %#x.\n", hr); diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c index 38e9e9c..5606c3b 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c @@ -240,6 +240,11 @@ static void test_device_interfaces(void) IUnknown_Release(dxgi_adapter); IUnknown_Release(dxgi_device); + hr = ID3D10Device_QueryInterface(device, &IID_IDXGIDevice1, (void **)&iface); + ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* Not available on all Windows versions. */, + "Device should implement IDXGIDevice1.\n"); + if (SUCCEEDED(hr)) IUnknown_Release(iface); + hr = ID3D10Device_QueryInterface(device, &IID_ID3D10Multithread, (void **)&iface); ok(SUCCEEDED(hr), "Device should implement ID3D10Multithread interface, hr %#x.\n", hr); IUnknown_Release(iface); diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index f54e6e3..7adea47 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -288,6 +288,10 @@ static void test_device_interfaces(void) IDXGIAdapter_Release(dxgi_adapter); IDXGIDevice_Release(dxgi_device); + hr = ID3D11Device_QueryInterface(device, &IID_IDXGIDevice1, (void **)&iface); + ok(SUCCEEDED(hr), "Device should implement IDXGIDevice1.\n"); + IUnknown_Release(iface); + hr = ID3D11Device_QueryInterface(device, &IID_ID3D10Multithread, (void **)&iface); ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* Not available on all Windows versions. */, "Device should implement ID3D10Multithread interface, hr %#x.\n", hr);
1
0
0
0
Józef Kucia : dxgi/tests: Add test for maximum frame latency.
by Alexandre Julliard
26 Oct '15
26 Oct '15
Module: wine Branch: master Commit: 718d35dcd6ef30818cf2bbc20ac2195fc6906c54 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=718d35dcd6ef30818cf2bbc20…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Oct 26 02:30:24 2015 +0100 dxgi/tests: Add test for maximum frame latency. 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/dxgi/tests/device.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/dlls/dxgi/tests/device.c b/dlls/dxgi/tests/device.c index 9e676b9..8a4b3f3 100644 --- a/dlls/dxgi/tests/device.c +++ b/dlls/dxgi/tests/device.c @@ -21,6 +21,12 @@ #include "d3d11.h" #include "wine/test.h" +enum frame_latency +{ + DEFAULT_FRAME_LATENCY = 3, + MAX_FRAME_LATENCY = 16, +}; + static DEVMODEW registry_mode; static HRESULT (WINAPI *pCreateDXGIFactory1)(REFIID iid, void **factory); @@ -1214,6 +1220,57 @@ static void test_swapchain_parameters(void) DestroyWindow(window); } +static void test_maximum_frame_latency(void) +{ + IDXGIDevice1 *device1; + IDXGIDevice *device; + UINT max_latency; + ULONG refcount; + HRESULT hr; + + if (!(device = create_device())) + { + skip("Failed to create device.\n"); + return; + } + + if (SUCCEEDED(IDXGIDevice_QueryInterface(device, &IID_IDXGIDevice1, (void **)&device1))) + { + hr = IDXGIDevice1_GetMaximumFrameLatency(device1, &max_latency); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(max_latency == DEFAULT_FRAME_LATENCY, "Got unexpected maximum frame latency %u.\n", max_latency); + + hr = IDXGIDevice1_SetMaximumFrameLatency(device1, MAX_FRAME_LATENCY); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + hr = IDXGIDevice1_GetMaximumFrameLatency(device1, &max_latency); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + todo_wine ok(max_latency == MAX_FRAME_LATENCY, "Got unexpected maximum frame latency %u.\n", max_latency); + + hr = IDXGIDevice1_SetMaximumFrameLatency(device1, MAX_FRAME_LATENCY + 1); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + hr = IDXGIDevice1_GetMaximumFrameLatency(device1, &max_latency); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + todo_wine ok(max_latency == MAX_FRAME_LATENCY, "Got unexpected maximum frame latency %u.\n", max_latency); + + hr = IDXGIDevice1_SetMaximumFrameLatency(device1, 0); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + hr = IDXGIDevice1_GetMaximumFrameLatency(device1, &max_latency); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + /* 0 does not reset to the default frame latency on all Windows versions. */ + ok(max_latency == DEFAULT_FRAME_LATENCY || broken(!max_latency), + "Got unexpected maximum frame latency %u.\n", max_latency); + + IDXGIDevice1_Release(device1); + } + else + { + win_skip("IDXGIDevice1 is not implemented.\n"); + } + + refcount = IDXGIDevice_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +} + START_TEST(device) { pCreateDXGIFactory1 = (void *)GetProcAddress(GetModuleHandleA("dxgi.dll"), "CreateDXGIFactory1"); @@ -1231,4 +1288,5 @@ START_TEST(device) test_private_data(); test_swapchain_resize(); test_swapchain_parameters(); + test_maximum_frame_latency(); }
1
0
0
0
Józef Kucia : dxgi: Implement IDXGIDevice1 interface.
by Alexandre Julliard
26 Oct '15
26 Oct '15
Module: wine Branch: master Commit: 6c9ff7df2488534b5fe43790113831b9f8a52498 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6c9ff7df2488534b5fe437901…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Oct 26 02:30:23 2015 +0100 dxgi: Implement IDXGIDevice1 interface. 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/dxgi/device.c | 28 ++++++++++++++++++++++++++-- dlls/dxgi/dxgi_private.h | 6 ++++++ include/wine/winedxgi.idl | 2 +- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/dlls/dxgi/device.c b/dlls/dxgi/device.c index b7a6aa0..8645b02 100644 --- a/dlls/dxgi/device.c +++ b/dlls/dxgi/device.c @@ -40,6 +40,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_QueryInterface(IWineDXGIDevice *ifa if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDXGIObject) || IsEqualGUID(riid, &IID_IDXGIDevice) + || IsEqualGUID(riid, &IID_IDXGIDevice1) || IsEqualGUID(riid, &IID_IWineDXGIDevice)) { IUnknown_AddRef(iface); @@ -49,11 +50,11 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_QueryInterface(IWineDXGIDevice *ifa if (This->child_layer) { - TRACE("forwarding to child layer %p\n", This->child_layer); + TRACE("forwarding to child layer %p.\n", This->child_layer); return IUnknown_QueryInterface(This->child_layer, riid, object); } - WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid)); + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); *object = NULL; return E_NOINTERFACE; @@ -257,6 +258,26 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_GetGPUThreadPriority(IWineDXGIDevic return E_NOTIMPL; } +static HRESULT STDMETHODCALLTYPE dxgi_device_SetMaximumFrameLatency(IWineDXGIDevice *iface, UINT max_latency) +{ + FIXME("iface %p, max_latency %u stub!\n", iface, max_latency); + + if (max_latency > DXGI_FRAME_LATENCY_MAX) + return DXGI_ERROR_INVALID_CALL; + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_device_GetMaximumFrameLatency(IWineDXGIDevice *iface, UINT *max_latency) +{ + FIXME("iface %p, max_latency %p stub!\n", iface, max_latency); + + if (max_latency) + *max_latency = DXGI_FRAME_LATENCY_DEFAULT; + + return E_NOTIMPL; +} + /* IWineDXGIDevice methods */ static HRESULT STDMETHODCALLTYPE dxgi_device_create_surface(IWineDXGIDevice *iface, @@ -336,6 +357,9 @@ static const struct IWineDXGIDeviceVtbl dxgi_device_vtbl = dxgi_device_QueryResourceResidency, dxgi_device_SetGPUThreadPriority, dxgi_device_GetGPUThreadPriority, + /* IDXGIDevice1 methods */ + dxgi_device_SetMaximumFrameLatency, + dxgi_device_GetMaximumFrameLatency, /* IWineDXGIDevice methods */ dxgi_device_create_surface, dxgi_device_create_swapchain, diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h index c1c178d..59b436b 100644 --- a/dlls/dxgi/dxgi_private.h +++ b/dlls/dxgi/dxgi_private.h @@ -37,6 +37,12 @@ #include "wine/wined3d.h" #include "wine/winedxgi.h" +enum dxgi_frame_latency +{ + DXGI_FRAME_LATENCY_DEFAULT = 3, + DXGI_FRAME_LATENCY_MAX = 16, +}; + /* Layered device */ enum dxgi_device_layer_id { diff --git a/include/wine/winedxgi.idl b/include/wine/winedxgi.idl index a6c6cce..452f022 100644 --- a/include/wine/winedxgi.idl +++ b/include/wine/winedxgi.idl @@ -23,7 +23,7 @@ import "dxgi.idl"; local, uuid(3e1ff30b-c951-48c3-b010-0fb49f3dca71) ] -interface IWineDXGIDevice : IDXGIDevice +interface IWineDXGIDevice : IDXGIDevice1 { HRESULT create_surface( [in] struct wined3d_resource *wined3d_resource,
1
0
0
0
Gerald Pfeifer : d3d9: Change #define D3DSTREAMSOURCE_INSTANCEDATA to avoid shift overflow.
by Alexandre Julliard
26 Oct '15
26 Oct '15
Module: wine Branch: master Commit: f6788b91862bfe89ebe6f402260040d169db4eac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f6788b91862bfe89ebe6f4022…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Sat Oct 24 23:33:52 2015 +0200 d3d9: Change #define D3DSTREAMSOURCE_INSTANCEDATA to avoid shift overflow. Signed-off-by: Gerald Pfeifer <gerald(a)pfeifer.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/d3d9types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/d3d9types.h b/include/d3d9types.h index 3afcf89..111d242 100644 --- a/include/d3d9types.h +++ b/include/d3d9types.h @@ -178,8 +178,8 @@ #define D3DPV_DONOTCOPYDATA (1 << 0) -#define D3DSTREAMSOURCE_INDEXEDDATA (1 << 30) -#define D3DSTREAMSOURCE_INSTANCEDATA (2 << 30) +#define D3DSTREAMSOURCE_INDEXEDDATA (1u << 30) +#define D3DSTREAMSOURCE_INSTANCEDATA (2u << 30) #define D3D_MAX_SIMULTANEOUS_RENDERTARGETS 4
1
0
0
0
Gerald Pfeifer : d3d8: Redefine D3DVSD_MAKETOKENTYPE to avoid shift overflow (warnings).
by Alexandre Julliard
26 Oct '15
26 Oct '15
Module: wine Branch: master Commit: a0991fc73f2c7d9b485f2c065487da38cd957a83 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0991fc73f2c7d9b485f2c065…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Sun Oct 25 01:17:59 2015 +0200 d3d8: Redefine D3DVSD_MAKETOKENTYPE to avoid shift overflow (warnings). Signed-off-by: Gerald Pfeifer <gerald(a)pfeifer.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/d3d8types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/d3d8types.h b/include/d3d8types.h index 3506805..163ee4f 100644 --- a/include/d3d8types.h +++ b/include/d3d8types.h @@ -267,7 +267,7 @@ typedef enum _D3DVSDT_TYPE { #define D3DVSD_MAKETOKENTYPE(TokenType) \ - ((TokenType << D3DVSD_TOKENTYPESHIFT) & D3DVSD_TOKENTYPEMASK) + (((unsigned)TokenType << D3DVSD_TOKENTYPESHIFT) & D3DVSD_TOKENTYPEMASK) #define D3DVSD_CONST(ConstantAddress, Count) \ (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_CONSTMEM) | ((Count) << D3DVSD_CONSTCOUNTSHIFT) | (ConstantAddress))
1
0
0
0
Hugh McMaster : kernel32/tests: Add tests for the FALSE pathway of GetCurrentConsoleFont.
by Alexandre Julliard
26 Oct '15
26 Oct '15
Module: wine Branch: master Commit: 0ad7a0df890a176d3b0b0e59365a010b32875578 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0ad7a0df890a176d3b0b0e593…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Mon Oct 26 17:42:14 2015 +1100 kernel32/tests: Add tests for the FALSE pathway of GetCurrentConsoleFont. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/console.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c index 5928e8c..454f963 100644 --- a/dlls/kernel32/tests/console.c +++ b/dlls/kernel32/tests/console.c @@ -2588,6 +2588,45 @@ static void test_ReadConsole(void) ok(bytes == 0xdeadbeef, "expected 0xdeadbeef, got %#x\n", bytes); } +static void test_GetCurrentConsoleFont(HANDLE std_output) +{ + BOOL ret; + CONSOLE_FONT_INFO cfi; + CONSOLE_SCREEN_BUFFER_INFO csbi; + short int width, height; + COORD c; + + memset(&cfi, 0, sizeof(CONSOLE_FONT_INFO)); + SetLastError(0xdeadbeef); + ret = GetCurrentConsoleFont(NULL, FALSE, &cfi); + ok(!ret, "got %d, expected 0\n", ret); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(!cfi.dwFontSize.X, "got %d, expected 0\n", cfi.dwFontSize.X); + ok(!cfi.dwFontSize.Y, "got %d, expected 0\n", cfi.dwFontSize.Y); + + memset(&cfi, 0, sizeof(CONSOLE_FONT_INFO)); + SetLastError(0xdeadbeef); + ret = GetCurrentConsoleFont(GetStdHandle(STD_INPUT_HANDLE), FALSE, &cfi); + ok(!ret, "got %d, expected 0\n", ret); + ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError()); + ok(!cfi.dwFontSize.X, "got %d, expected 0\n", cfi.dwFontSize.X); + ok(!cfi.dwFontSize.Y, "got %d, expected 0\n", cfi.dwFontSize.Y); + + memset(&cfi, 0, sizeof(CONSOLE_FONT_INFO)); + SetLastError(0xdeadbeef); + ret = GetCurrentConsoleFont(std_output, FALSE, &cfi); + ok(ret, "got %d, expected non-zero\n", ret); + ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); + GetConsoleScreenBufferInfo(std_output, &csbi); + width = csbi.srWindow.Right - csbi.srWindow.Left + 1; + height = csbi.srWindow.Bottom - csbi.srWindow.Top + 1; + c = GetConsoleFontSize(std_output, cfi.nFont); + ok(cfi.dwFontSize.X == width || cfi.dwFontSize.X == c.X /* Vista and higher */, + "got %d, expected %d\n", cfi.dwFontSize.X, width); + ok(cfi.dwFontSize.Y == height || cfi.dwFontSize.Y == c.Y /* Vista and higher */, + "got %d, expected %d\n", cfi.dwFontSize.Y, height); +} + START_TEST(console) { static const char font_name[] = "Lucida Console"; @@ -2720,4 +2759,5 @@ START_TEST(console) test_ReadConsoleOutputCharacterA(hConOut); test_ReadConsoleOutputCharacterW(hConOut); test_ReadConsoleOutputAttribute(hConOut); + test_GetCurrentConsoleFont(hConOut); }
1
0
0
0
Hugh McMaster : kernel32: Implement the FALSE pathway of GetCurrentConsoleFont.
by Alexandre Julliard
26 Oct '15
26 Oct '15
Module: wine Branch: master Commit: a9277a9c34fbf6287b151eb87004c2a896d62e06 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a9277a9c34fbf6287b151eb87…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Mon Oct 26 17:42:13 2015 +1100 kernel32: Implement the FALSE pathway of GetCurrentConsoleFont. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/console.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index 14f1189..c32dc49 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -3236,9 +3236,28 @@ BOOL WINAPI SetConsoleIcon(HICON icon) BOOL WINAPI GetCurrentConsoleFont(HANDLE hConsole, BOOL maxwindow, LPCONSOLE_FONT_INFO fontinfo) { - FIXME(": (%p, %d, %p) stub!\n", hConsole, maxwindow, fontinfo); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + BOOL ret; + + memset(fontinfo, 0, sizeof(CONSOLE_FONT_INFO)); + + if (maxwindow) + { + FIXME(": (%p, %d, %p) stub!\n", hConsole, maxwindow, fontinfo); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; + } + + SERVER_START_REQ(get_console_output_info) + { + req->handle = console_handle_unmap(hConsole); + if ((ret = !wine_server_call_err(req))) + { + fontinfo->dwFontSize.X = reply->win_right - reply->win_left + 1; + fontinfo->dwFontSize.Y = reply->win_bottom - reply->win_top + 1; + } + } + SERVER_END_REQ; + return ret; } #ifdef __i386__
1
0
0
0
Sebastian Lackner : combase/tests: Add tests for WindowsSubstringWithSpecifiedLength.
by Alexandre Julliard
26 Oct '15
26 Oct '15
Module: wine Branch: master Commit: bc7809c258053256ed1376168273401430d1f0f3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc7809c258053256ed1376168…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Sun Oct 25 15:32:45 2015 +0100 combase/tests: Add tests for WindowsSubstringWithSpecifiedLength. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/combase/tests/string.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/dlls/combase/tests/string.c b/dlls/combase/tests/string.c index a6b02c6..5a59b50 100644 --- a/dlls/combase/tests/string.c +++ b/dlls/combase/tests/string.c @@ -39,6 +39,7 @@ static HRESULT (WINAPI *pWindowsPreallocateStringBuffer)(UINT32, WCHAR **, HSTRI static HRESULT (WINAPI *pWindowsPromoteStringBuffer)(HSTRING_BUFFER, HSTRING *); static HRESULT (WINAPI *pWindowsStringHasEmbeddedNull)(HSTRING, BOOL *); static HRESULT (WINAPI *pWindowsSubstring)(HSTRING, UINT32, HSTRING *); +static HRESULT (WINAPI *pWindowsSubstringWithSpecifiedLength)(HSTRING, UINT32, UINT32, HSTRING *); #define SET(x) p##x = (void*)GetProcAddress(hmod, #x) @@ -62,6 +63,7 @@ static BOOL init_functions(void) SET(WindowsPromoteStringBuffer); SET(WindowsStringHasEmbeddedNull); SET(WindowsSubstring); + SET(WindowsSubstringWithSpecifiedLength); return TRUE; } @@ -249,6 +251,9 @@ static void test_substring(void) ok(pWindowsSubstring(str, 2, &substr) == S_OK, "Failed to create substring\n"); check_string(substr, output_substring, 4, FALSE); ok(pWindowsDeleteString(substr) == S_OK, "Failed to delete string\n"); + ok(pWindowsSubstringWithSpecifiedLength(str, 2, 3, &substr) == S_OK, "Failed to create substring\n"); + check_string(substr, output_substring, 3, FALSE); + ok(pWindowsDeleteString(substr) == S_OK, "Failed to delete string\n"); ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string\n"); /* Test duplication of string using substring */ @@ -257,6 +262,10 @@ static void test_substring(void) ok(str != substr, "Duplicated string didn't create new string\n"); check_string(substr, input_string, 6, FALSE); ok(pWindowsDeleteString(substr) == S_OK, "Failed to delete string\n"); + ok(pWindowsSubstringWithSpecifiedLength(str, 0, 6, &substr) == S_OK, "Failed to create substring\n"); + ok(str != substr, "Duplicated string didn't create new string\n"); + check_string(substr, input_string, 6, FALSE); + ok(pWindowsDeleteString(substr) == S_OK, "Failed to delete string\n"); ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string\n"); /* Test substring of string reference */ @@ -264,6 +273,9 @@ static void test_substring(void) ok(pWindowsSubstring(str, 2, &substr) == S_OK, "Failed to create substring of string ref\n"); check_string(substr, output_substring, 4, FALSE); ok(pWindowsDeleteString(substr) == S_OK, "Failed to delete string\n"); + ok(pWindowsSubstringWithSpecifiedLength(str, 2, 3, &substr) == S_OK, "Failed to create substring of string ref\n"); + check_string(substr, output_substring, 3, FALSE); + ok(pWindowsDeleteString(substr) == S_OK, "Failed to delete string\n"); ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string ref\n"); /* Test duplication of string reference using substring */ @@ -272,26 +284,38 @@ static void test_substring(void) ok(str != substr, "Duplicated string ref didn't create new string\n"); check_string(substr, input_string, 6, FALSE); ok(pWindowsDeleteString(substr) == S_OK, "Failed to delete string\n"); - ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string\n"); + ok(pWindowsSubstringWithSpecifiedLength(str, 0, 6, &substr) == S_OK, "Failed to create substring of string ref\n"); + ok(str != substr, "Duplicated string ref didn't create new string\n"); + check_string(substr, input_string, 6, FALSE); + ok(pWindowsDeleteString(substr) == S_OK, "Failed to delete string\n"); + ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string ref\n"); /* Test get substring of empty string */ ok(pWindowsSubstring(NULL, 0, &substr) == S_OK, "Failed to duplicate NULL string\n"); ok(substr == NULL, "Substring created new string\n"); + ok(pWindowsSubstringWithSpecifiedLength(NULL, 0, 0, &substr) == S_OK, "Failed to duplicate NULL string\n"); + ok(substr == NULL, "Substring created new string\n"); /* Test get empty substring of string */ ok(pWindowsCreateString(input_string, 6, &str) == S_OK, "Failed to create string\n"); ok(pWindowsSubstring(str, 6, &substr) == S_OK, "Failed to create substring\n"); ok(substr == NULL, "Substring created new string\n"); + ok(pWindowsSubstringWithSpecifiedLength(str, 6, 0, &substr) == S_OK, "Failed to create substring\n"); + ok(substr == NULL, "Substring created new string\n"); ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string\n"); - /* Test handling of using too high start index */ + /* Test handling of using too high start index or length */ ok(pWindowsCreateString(input_string, 6, &str) == S_OK, "Failed to create string\n"); ok(pWindowsSubstring(str, 7, &substr) == E_BOUNDS, "Incorrect error handling\n"); + ok(pWindowsSubstringWithSpecifiedLength(str, 7, 0, &substr) == E_BOUNDS, "Incorrect error handling\n"); + ok(pWindowsSubstringWithSpecifiedLength(str, 6, 1, &substr) == E_BOUNDS, "Incorrect error handling\n"); + ok(pWindowsSubstringWithSpecifiedLength(str, 7, ~0U, &substr) == E_BOUNDS, "Incorrect error handling\n"); ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string\n"); /* Test handling of a NULL string */ ok(pWindowsCreateString(input_string, 6, &str) == S_OK, "Failed to create string\n"); ok(pWindowsSubstring(str, 7, NULL) == E_INVALIDARG, "Incorrect error handling\n"); + ok(pWindowsSubstringWithSpecifiedLength(str, 7, 0, NULL) == E_INVALIDARG, "Incorrect error handling\n"); ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string\n"); }
1
0
0
0
Sebastian Lackner : combase: Implement WindowsSubstringWithSpecifiedLength.
by Alexandre Julliard
26 Oct '15
26 Oct '15
Module: wine Branch: master Commit: 7d0dccd23421f09cab0e3ba5f96e9a932ff53cb1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d0dccd23421f09cab0e3ba5f…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Sun Oct 25 15:32:37 2015 +0100 combase: Implement WindowsSubstringWithSpecifiedLength. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-core-winrt-string-l1-1-0.spec | 2 +- dlls/combase/combase.spec | 2 +- dlls/combase/string.c | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec b/dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec index f629bcf..dc67deb 100644 --- a/dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec +++ b/dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec @@ -22,6 +22,6 @@ @ stub WindowsReplaceString @ stdcall WindowsStringHasEmbeddedNull(ptr ptr) combase.WindowsStringHasEmbeddedNull @ stdcall WindowsSubstring(ptr long ptr) combase.WindowsSubstring -@ stub WindowsSubstringWithSpecifiedLength +@ stdcall WindowsSubstringWithSpecifiedLength(ptr long long ptr) combase.WindowsSubstringWithSpecifiedLength @ stub WindowsTrimStringEnd @ stub WindowsTrimStringStart diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index e7c8866..fcd5947 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -303,6 +303,6 @@ @ stub WindowsReplaceString @ stdcall WindowsStringHasEmbeddedNull(ptr ptr) @ stdcall WindowsSubstring(ptr long ptr) -@ stub WindowsSubstringWithSpecifiedLength +@ stdcall WindowsSubstringWithSpecifiedLength(ptr long long ptr) @ stub WindowsTrimStringEnd @ stub WindowsTrimStringStart diff --git a/dlls/combase/string.c b/dlls/combase/string.c index 2146d61..49d7695 100644 --- a/dlls/combase/string.c +++ b/dlls/combase/string.c @@ -308,6 +308,28 @@ HRESULT WINAPI WindowsSubstring(HSTRING str, UINT32 start, HSTRING *out) } /*********************************************************************** + * WindowsSubstringWithSpecifiedLength (combase.@) + */ +HRESULT WINAPI WindowsSubstringWithSpecifiedLength(HSTRING str, UINT32 start, UINT32 len, HSTRING *out) +{ + struct hstring_private *priv = impl_from_HSTRING(str); + + TRACE("(%p, %u, %u, %p)\n", str, start, len, out); + + if (out == NULL) + return E_INVALIDARG; + if (start + len < start || + start + len > WindowsGetStringLen(str)) + return E_BOUNDS; + if (len == 0) + { + *out = NULL; + return S_OK; + } + return WindowsCreateString(&priv->buffer[start], len, out); +} + +/*********************************************************************** * WindowsIsStringEmpty (combase.@) */ BOOL WINAPI WindowsIsStringEmpty(HSTRING str)
1
0
0
0
Sebastian Lackner : combase: Simplify NULL pointer check in WindowsCreateString[Reference].
by Alexandre Julliard
26 Oct '15
26 Oct '15
Module: wine Branch: master Commit: 8a870d4965aececa9e85f17c6a475f8d15fe0cc5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a870d4965aececa9e85f17c6…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Sun Oct 25 15:32:26 2015 +0100 combase: Simplify NULL pointer check in WindowsCreateString[Reference]. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/combase/string.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/combase/string.c b/dlls/combase/string.c index 53a32c9..2146d61 100644 --- a/dlls/combase/string.c +++ b/dlls/combase/string.c @@ -79,13 +79,13 @@ HRESULT WINAPI WindowsCreateString(LPCWSTR ptr, UINT32 len, if (out == NULL) return E_INVALIDARG; - if (ptr == NULL && len > 0) - return E_POINTER; if (len == 0) { *out = NULL; return S_OK; } + if (ptr == NULL) + return E_POINTER; if (!alloc_string(len, out)) return E_OUTOFMEMORY; priv = impl_from_HSTRING(*out); @@ -105,13 +105,13 @@ HRESULT WINAPI WindowsCreateStringReference(LPCWSTR ptr, UINT32 len, if (out == NULL || header == NULL) return E_INVALIDARG; - if (ptr == NULL && len > 0) - return E_POINTER; if (len == 0) { *out = NULL; return S_OK; } + if (ptr == NULL) + return E_POINTER; if (ptr[len] != '\0') return E_INVALIDARG; priv->buffer = (LPWSTR)ptr;
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
75
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
Results per page:
10
25
50
100
200