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
May 2017
----- 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
640 discussions
Start a n
N
ew thread
Henri Verbeet : d3dx9/tests: Use compare_float() in test_D3DXSHScale().
by Alexandre Julliard
08 May '17
08 May '17
Module: wine Branch: master Commit: 8b1df91902d9809d02df7996b64c6ff187ed6609 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b1df91902d9809d02df7996b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri May 5 13:40:29 2017 +0200 d3dx9/tests: Use compare_float() in test_D3DXSHScale(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/tests/math.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c index 5a5eccf..6effa74 100644 --- a/dlls/d3dx9_36/tests/math.c +++ b/dlls/d3dx9_36/tests/math.c @@ -25,10 +25,6 @@ #define ARRAY_SIZE 5 -#define admitted_error 0.0001f - -#define relative_error(exp, out) (fabsf(exp) < 1e-38f ? fabsf(exp - out) : fabsf(1.0f - (out) / (exp))) - static BOOL compare_float(float f, float g, unsigned int ulps) { int x = *(int *)&f; @@ -3590,8 +3586,9 @@ static void test_D3DXSHRotateZ(void) static void test_D3DXSHScale(void) { + float a[49], b[49], expected, *received_array; unsigned int i, order; - FLOAT a[49], b[49], expected, *received_array; + BOOL equal; for (i = 0; i < 49; i++) { @@ -3611,7 +3608,8 @@ static void test_D3DXSHScale(void) /* D3DXSHScale does not modify the elements of the array after the order * order-th element */ else expected = a[i]; - ok(relative_error(b[i], expected) < admitted_error, "order %d, element %d, expected %f, received %f\n", order, i, expected, b[i]); + equal = compare_float(b[i], expected, 0); + ok(equal, "order %u, element %u, expected %.8e, received %.8e.\n", order, i, expected, b[i]); } } }
1
0
0
0
Henri Verbeet : d3dx9/tests: Use compare_float() in test_D3DXSHEvalSphericalLight().
by Alexandre Julliard
08 May '17
08 May '17
Module: wine Branch: master Commit: 1db76b03bdba3eb67ffdc69455be9a9b24b13c1a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1db76b03bdba3eb67ffdc6945…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri May 5 13:40:28 2017 +0200 d3dx9/tests: Use compare_float() in test_D3DXSHEvalSphericalLight(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/tests/math.c | 171 ++++++++++++++++++++++++--------------------- 1 file changed, 92 insertions(+), 79 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1db76b03bdba3eb67ffdc…
1
0
0
0
Paul Gofman : d3dx9: Support setting strings in effect.
by Alexandre Julliard
08 May '17
08 May '17
Module: wine Branch: master Commit: d1ac3b8e726d22bb842e6efedef03f1cce4bee10 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d1ac3b8e726d22bb842e6efed…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Fri May 5 14:34:32 2017 +0300 d3dx9: Support setting strings in effect. Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/effect.c | 47 ++++++++++++++++++++++++++++++++++++-------- dlls/d3dx9_36/tests/effect.c | 4 ---- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index 3a6803c..6cc098d 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -1497,10 +1497,24 @@ static void clear_dirty_params(struct d3dx9_base_effect *base) base->parameters[i].runtime_flags &= ~PARAMETER_FLAG_DIRTY; } +static HRESULT set_string(char **param_data, const char *string) +{ + HeapFree(GetProcessHeap(), 0, *param_data); + *param_data = HeapAlloc(GetProcessHeap(), 0, strlen(string) + 1); + if (!*param_data) + { + ERR("Out of memory.\n"); + return E_OUTOFMEMORY; + } + strcpy(*param_data, string); + return D3D_OK; +} + static HRESULT d3dx9_base_effect_set_value(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const void *data, UINT bytes) { struct d3dx_parameter *param = get_valid_parameter(base, parameter); + unsigned int i; if (!param) { @@ -1524,9 +1538,6 @@ static HRESULT d3dx9_base_effect_set_value(struct d3dx9_base_effect *base, case D3DXPT_TEXTURE2D: case D3DXPT_TEXTURE3D: case D3DXPT_TEXTURECUBE: - { - unsigned int i; - for (i = 0; i < (param->element_count ? param->element_count : 1); ++i) { IUnknown *unk = ((IUnknown **)data)[i]; @@ -1537,19 +1548,31 @@ static HRESULT d3dx9_base_effect_set_value(struct d3dx9_base_effect *base, if (unk) IUnknown_Release(unk); } - } /* fallthrough */ case D3DXPT_VOID: case D3DXPT_BOOL: case D3DXPT_INT: case D3DXPT_FLOAT: - TRACE("Copy %u bytes\n", param->bytes); + TRACE("Copy %u bytes.\n", param->bytes); memcpy(param->data, data, param->bytes); set_dirty(param); break; + case D3DXPT_STRING: + { + HRESULT hr; + + set_dirty(param); + for (i = 0; i < (param->element_count ? param->element_count : 1); ++i) + { + if (FAILED(hr = set_string(&((char **)param->data)[i], ((const char **)data)[i]))) + return hr; + } + break; + } + default: - FIXME("Unhandled type %s\n", debug_d3dxparameter_type(param->type)); + FIXME("Unhandled type %s.\n", debug_d3dxparameter_type(param->type)); break; } @@ -2578,9 +2601,17 @@ static HRESULT d3dx9_base_effect_get_matrix_transpose_pointer_array(struct d3dx9 static HRESULT d3dx9_base_effect_set_string(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const char *string) { - FIXME("stub!\n"); + struct d3dx_parameter *param = get_valid_parameter(base, parameter); - return E_NOTIMPL; + if (param && param->type == D3DXPT_STRING) + { + set_dirty(param); + return set_string(param->data, string); + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT d3dx9_base_effect_get_string(struct d3dx9_base_effect *base, diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c index 6e8024f..7b39e31 100644 --- a/dlls/d3dx9_36/tests/effect.c +++ b/dlls/d3dx9_36/tests/effect.c @@ -2441,7 +2441,6 @@ static void test_effect_setvalue_object(IDirect3DDevice9 *device) ok(!count, "Got reference count %u, expected 0.\n", count); hr = effect->lpVtbl->SetString(effect, "s", expected_string); - todo_wine ok(hr == D3D_OK, "Got result %#x.\n", hr); string = NULL; hr = effect->lpVtbl->GetString(effect, "s", &string); @@ -2451,7 +2450,6 @@ static void test_effect_setvalue_object(IDirect3DDevice9 *device) ok(string != expected_string, "String pointers are the same.\n"); ok(string == string2, "String pointers differ.\n"); - todo_wine ok(!strcmp(string, expected_string), "Unexpected string '%s'.\n", string); string = expected_string2; @@ -2466,7 +2464,6 @@ static void test_effect_setvalue_object(IDirect3DDevice9 *device) ok(hr == D3D_OK, "Got result %#x.\n", hr); ok(string != expected_string2, "String pointers are the same.\n"); - todo_wine ok(!strcmp(string, expected_string2), "Unexpected string '%s'.\n", string); hr = effect->lpVtbl->SetValue(effect, "s_2", expected_string_array, @@ -2477,7 +2474,6 @@ static void test_effect_setvalue_object(IDirect3DDevice9 *device) ok(hr == D3D_OK, "Got result %#x.\n", hr); for (i = 0; i < ARRAY_SIZE(expected_string_array); ++i) { - todo_wine ok(!strcmp(string_array[i], expected_string_array[i]), "Unexpected string '%s', i %u.\n", string_array[i], i); }
1
0
0
0
Paul Gofman : d3dx9/tests: Add tests for setting strings in effect.
by Alexandre Julliard
08 May '17
08 May '17
Module: wine Branch: master Commit: 97dcf42ff2c21dd521f79916bf66900c8cc6f68d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=97dcf42ff2c21dd521f79916b…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Fri May 5 14:34:31 2017 +0300 d3dx9/tests: Add tests for setting strings in effect. Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/tests/effect.c | 55 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c index c0ff4bd..6e8024f 100644 --- a/dlls/d3dx9_36/tests/effect.c +++ b/dlls/d3dx9_36/tests/effect.c @@ -2402,12 +2402,18 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) static void test_effect_setvalue_object(IDirect3DDevice9 *device) { - ID3DXEffect *effect; - D3DXHANDLE parameter; - IDirect3DTexture9 *texture; + static const char expected_string[] = "test_string_1"; + static const char expected_string2[] = "test_longer_string_2"; + static const char *expected_string_array[] = {expected_string, expected_string2}; + const char *string_array[ARRAY_SIZE(expected_string_array)]; + const char *string, *string2; IDirect3DTexture9 *texture_set; - HRESULT hr; + IDirect3DTexture9 *texture; + D3DXHANDLE parameter; + ID3DXEffect *effect; + unsigned int i; ULONG count; + HRESULT hr; hr = D3DXCreateEffect(device, test_effect_parameter_value_blob_object, sizeof(test_effect_parameter_value_blob_object), NULL, NULL, 0, NULL, &effect, NULL); @@ -2434,6 +2440,47 @@ static void test_effect_setvalue_object(IDirect3DDevice9 *device) count = IDirect3DTexture9_Release(texture); ok(!count, "Got reference count %u, expected 0.\n", count); + hr = effect->lpVtbl->SetString(effect, "s", expected_string); + todo_wine + ok(hr == D3D_OK, "Got result %#x.\n", hr); + string = NULL; + hr = effect->lpVtbl->GetString(effect, "s", &string); + ok(hr == D3D_OK, "Got result %#x.\n", hr); + hr = effect->lpVtbl->GetString(effect, "s", &string2); + ok(hr == D3D_OK, "Got result %#x.\n", hr); + + ok(string != expected_string, "String pointers are the same.\n"); + ok(string == string2, "String pointers differ.\n"); + todo_wine + ok(!strcmp(string, expected_string), "Unexpected string '%s'.\n", string); + + string = expected_string2; + hr = effect->lpVtbl->SetValue(effect, "s", &string, sizeof(string) - 1); + ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr); + hr = effect->lpVtbl->SetValue(effect, "s", &string, sizeof(string)); + ok(hr == D3D_OK, "Got result %#x.\n", hr); + hr = effect->lpVtbl->SetValue(effect, "s", &string, sizeof(string) * 2); + ok(hr == D3D_OK, "Got result %#x.\n", hr); + string = NULL; + hr = effect->lpVtbl->GetValue(effect, "s", &string, sizeof(string)); + ok(hr == D3D_OK, "Got result %#x.\n", hr); + + ok(string != expected_string2, "String pointers are the same.\n"); + todo_wine + ok(!strcmp(string, expected_string2), "Unexpected string '%s'.\n", string); + + hr = effect->lpVtbl->SetValue(effect, "s_2", expected_string_array, + sizeof(expected_string_array)); + ok(hr == D3D_OK, "Got result %#x.\n", hr); + hr = effect->lpVtbl->GetValue(effect, "s_2", string_array, + sizeof(string_array)); + ok(hr == D3D_OK, "Got result %#x.\n", hr); + for (i = 0; i < ARRAY_SIZE(expected_string_array); ++i) + { + todo_wine + ok(!strcmp(string_array[i], expected_string_array[i]), "Unexpected string '%s', i %u.\n", + string_array[i], i); + } effect->lpVtbl->Release(effect); }
1
0
0
0
Paul Gofman : d3dx9: Do not set active pass if BeginPass() failed.
by Alexandre Julliard
08 May '17
08 May '17
Module: wine Branch: master Commit: a79da9689d95e59e36ea32ca118331931e6799b4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a79da9689d95e59e36ea32ca1…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Fri May 5 14:34:30 2017 +0300 d3dx9: Do not set active pass if BeginPass() failed. Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/effect.c | 8 ++++++-- dlls/d3dx9_36/tests/effect.c | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index 864c390..3a6803c 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -4071,10 +4071,14 @@ static HRESULT WINAPI ID3DXEffectImpl_BeginPass(ID3DXEffect *iface, UINT pass) if (technique && pass < technique->pass_count && !effect->active_pass) { - effect->active_pass = &technique->passes[pass]; + HRESULT hr; + memset(effect->current_light, 0, sizeof(effect->current_light)); memset(&effect->current_material, 0, sizeof(effect->current_material)); - return d3dx9_apply_pass_states(effect, effect->active_pass, TRUE); + + if (SUCCEEDED(hr = d3dx9_apply_pass_states(effect, &technique->passes[pass], TRUE))) + effect->active_pass = &technique->passes[pass]; + return hr; } WARN("Invalid argument supplied.\n"); diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c index f3bc9e3..c0ff4bd 100644 --- a/dlls/d3dx9_36/tests/effect.c +++ b/dlls/d3dx9_36/tests/effect.c @@ -6019,6 +6019,7 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device) "Unexpected vector %g, %g, %g, %g.\n", fvect.x, fvect.y, fvect.z, fvect.w); hr = effect3->lpVtbl->EndPass(effect3); + todo_wine ok(hr == D3D_OK, "Got result %#x.\n", hr); hr = effect3->lpVtbl->End(effect3);
1
0
0
0
Nikolay Sivov : user32: Added a helper to get screen dc.
by Alexandre Julliard
08 May '17
08 May '17
Module: wine Branch: master Commit: 393ec970c80baa0d6b37a7b073883f458ce7289a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=393ec970c80baa0d6b37a7b07…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun May 7 17:50:38 2017 +0300 user32: Added a helper to get screen dc. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/cursoricon.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index a1fd073..33ce5cb 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -48,10 +48,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(cursor); WINE_DECLARE_DEBUG_CHANNEL(icon); WINE_DECLARE_DEBUG_CHANNEL(resource); -static HDC screen_dc; - -static const WCHAR DISPLAYW[] = {'D','I','S','P','L','A','Y',0}; - static struct list icon_cache = LIST_INIT( icon_cache ); /********************************************************************** @@ -96,6 +92,17 @@ struct animated_cursoricon_object HICON frames[1]; /* list of animated cursor frames */ }; +static HDC get_screen_dc(void) +{ + static const WCHAR DISPLAYW[] = {'D','I','S','P','L','A','Y',0}; + static HDC screen_dc; + + if (!screen_dc) + screen_dc = CreateDCW( DISPLAYW, NULL, NULL, NULL ); + + return screen_dc; +} + static HICON alloc_icon_handle( BOOL is_ani, UINT num_steps ) { struct cursoricon_object *obj; @@ -792,6 +799,7 @@ static HICON create_icon_from_bmi( const BITMAPINFO *bmi, DWORD maxsize, HMODULE BOOL ret = FALSE; BOOL do_stretch; HICON hObj = 0; + HDC screen_dc; HDC hdc = 0; LONG bmi_width, bmi_height; WORD bpp; @@ -855,8 +863,7 @@ static HICON create_icon_from_bmi( const BITMAPINFO *bmi, DWORD maxsize, HMODULE hotspot.y = (hotspot.y * height) / (bmi_height / 2); } - if (!screen_dc) screen_dc = CreateDCW( DISPLAYW, NULL, NULL, NULL ); - if (!screen_dc) return 0; + if (!(screen_dc = get_screen_dc())) return 0; if (!(bmi_copy = HeapAlloc( GetProcessHeap(), 0, max( size, FIELD_OFFSET( BITMAPINFO, bmiColors[2] ))))) return 0; @@ -2149,7 +2156,7 @@ HICON WINAPI CreateIconIndirect(PICONINFO iconinfo) height = bmpXor.bmHeight; if (bmpXor.bmPlanes * bmpXor.bmBitsPixel != 1 || bmpAnd.bmPlanes * bmpAnd.bmBitsPixel != 1) { - color = CreateCompatibleBitmap( screen_dc, width, height ); + color = CreateCompatibleBitmap( get_screen_dc(), width, height ); mask = CreateBitmap( width, height, 1, 1, NULL ); } else mask = CreateBitmap( width, height * 2, 1, 1, NULL ); @@ -2479,6 +2486,7 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name, DWORD compr_dummy, offbits = 0; INT bm_type; HDC screen_mem_dc = NULL; + HDC screen_dc; if (!(loadflags & LR_LOADFROMFILE)) { @@ -2558,7 +2566,7 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name, if (new_height < 0) new_height = -new_height; - if (!screen_dc) screen_dc = CreateDCW( DISPLAYW, NULL, NULL, NULL ); + screen_dc = get_screen_dc(); if (!(screen_mem_dc = CreateCompatibleDC( screen_dc ))) goto end; bits = (char *)info + (offbits ? offbits : size); @@ -2654,8 +2662,10 @@ HANDLE WINAPI LoadImageW( HINSTANCE hinst, LPCWSTR name, UINT type, depth = 1; if (!(loadflags & LR_MONOCHROME)) { - if (!screen_dc) screen_dc = CreateDCW( DISPLAYW, NULL, NULL, NULL ); - if (screen_dc) depth = GetDeviceCaps( screen_dc, BITSPIXEL ); + HDC screen_dc; + + if ((screen_dc = get_screen_dc())) + depth = GetDeviceCaps( screen_dc, BITSPIXEL ); } return CURSORICON_Load(hinst, name, desiredx, desiredy, depth, (type == IMAGE_CURSOR), loadflags); } @@ -2879,7 +2889,7 @@ HANDLE WINAPI CopyImage( HANDLE hnd, UINT type, INT desiredx, { struct cursoricon_object *icon; HICON res = 0; - int depth = (flags & LR_MONOCHROME) ? 1 : GetDeviceCaps( screen_dc, BITSPIXEL ); + int depth = (flags & LR_MONOCHROME) ? 1 : GetDeviceCaps( get_screen_dc(), BITSPIXEL ); if (flags & LR_DEFAULTSIZE) {
1
0
0
0
Nikolay Sivov : user32/msgbox: Fix static control id.
by Alexandre Julliard
08 May '17
08 May '17
Module: wine Branch: master Commit: 9ee82b9465c33ecf28ca61c4f6cd8434d242fb1c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9ee82b9465c33ecf28ca61c4f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun May 7 17:49:59 2017 +0300 user32/msgbox: Fix static control id. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/msgbox.c | 5 +---- dlls/user32/resources.h | 2 +- dlls/user32/tests/dialog.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 5 deletions(-) diff --git a/dlls/user32/msgbox.c b/dlls/user32/msgbox.c index 0839f97..d3d11d6 100644 --- a/dlls/user32/msgbox.c +++ b/dlls/user32/msgbox.c @@ -28,15 +28,12 @@ #include "winternl.h" #include "dlgs.h" #include "user_private.h" +#include "resources.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dialog); WINE_DECLARE_DEBUG_CHANNEL(msgbox); -#define MSGBOX_IDICON stc1 -#define MSGBOX_IDTEXT 100 -#define IDS_ERROR 2 - struct ThreadWindows { UINT numHandles; diff --git a/dlls/user32/resources.h b/dlls/user32/resources.h index d9cc9cc..3cb8c48 100644 --- a/dlls/user32/resources.h +++ b/dlls/user32/resources.h @@ -26,5 +26,5 @@ #define MDI_IDC_LISTBOX 100 #define IDS_MDI_MOREWINDOWS 13 #define MSGBOX_IDICON stc1 -#define MSGBOX_IDTEXT 100 +#define MSGBOX_IDTEXT 0xffff #define IDS_ERROR 2 diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c index a37c678..6b9d704 100644 --- a/dlls/user32/tests/dialog.c +++ b/dlls/user32/tests/dialog.c @@ -1522,6 +1522,47 @@ static void test_timer_message(void) DialogBoxA(g_hinst, "RADIO_TEST_DIALOG", NULL, timer_message_dlg_proc); } +static LRESULT CALLBACK msgbox_hook_proc(INT code, WPARAM wParam, LPARAM lParam) +{ + if (code == HCBT_ACTIVATE) + { + HWND msgbox = (HWND)wParam, msghwnd; + char text[64]; + + if (msgbox) + { + text[0] = 0; + GetWindowTextA(msgbox, text, sizeof(text)); + ok(!strcmp(text, "MSGBOX caption"), "Unexpected window text \"%s\"\n", text); + + msghwnd = GetDlgItem(msgbox, 0xffff); + ok(msghwnd != NULL, "Expected static control\n"); + + text[0] = 0; + GetWindowTextA(msghwnd, text, sizeof(text)); + ok(!strcmp(text, "Text"), "Unexpected window text \"%s\"\n", text); + + SendDlgItemMessageA(msgbox, IDCANCEL, WM_LBUTTONDOWN, 0, 0); + SendDlgItemMessageA(msgbox, IDCANCEL, WM_LBUTTONUP, 0, 0); + } + } + + return CallNextHookEx(NULL, code, wParam, lParam); +} + +static void test_MessageBox(void) +{ + HHOOK hook; + int ret; + + hook = SetWindowsHookExA(WH_CBT, msgbox_hook_proc, NULL, GetCurrentThreadId()); + + ret = MessageBoxA(NULL, "Text", "MSGBOX caption", MB_OKCANCEL); + ok(ret == IDCANCEL, "got %d\n", ret); + + UnhookWindowsHookEx(hook); +} + START_TEST(dialog) { g_hinst = GetModuleHandleA (0); @@ -1539,4 +1580,5 @@ START_TEST(dialog) test_MessageBoxFontTest(); test_SaveRestoreFocus(); test_timer_message(); + test_MessageBox(); }
1
0
0
0
Nikolay Sivov : api-ms-win-core-memory-l1-1-2: Update spec file.
by Alexandre Julliard
08 May '17
08 May '17
Module: wine Branch: master Commit: 36b7d6f51c24dc2e017576ae25a68aaaa7259210 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36b7d6f51c24dc2e017576ae2…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun May 7 09:44:38 2017 +0300 api-ms-win-core-memory-l1-1-2: Update spec file. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-core-memory-l1-1-2.spec | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec b/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec index 2ad54b7..866d20e 100644 --- a/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec +++ b/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec @@ -1,8 +1,39 @@ @ stdcall AllocateUserPhysicalPages(long ptr ptr) kernel32.AllocateUserPhysicalPages @ stub AllocateUserPhysicalPagesNuma +@ stub CreateFileMappingFromApp +@ stub CreateFileMappingNumaW +@ stdcall CreateFileMappingW(long ptr long long long wstr) kernel32.CreateFileMappingW +@ stdcall CreateMemoryResourceNotification(long) kernel32.CreateMemoryResourceNotification +@ stdcall FlushViewOfFile(ptr long) kernel32.FlushViewOfFile @ stdcall FreeUserPhysicalPages(long ptr ptr) kernel32.FreeUserPhysicalPages +@ stdcall GetLargePageMinimum() kernel32.GetLargePageMinimum @ stub GetMemoryErrorHandlingCapabilities +@ stub GetProcessWorkingSetSizeEx +@ stdcall GetSystemFileCacheSize(ptr ptr ptr) kernel32.GetSystemFileCacheSize +@ stdcall GetWriteWatch(long ptr long ptr ptr ptr) kernel32.GetWriteWatch @ stub MapUserPhysicalPages +@ stdcall MapViewOfFile(long long long long long) kernel32.MapViewOfFile +@ stdcall MapViewOfFileEx(long long long long long ptr) kernel32.MapViewOfFileEx +@ stub MapViewOfFileFromApp +@ stdcall OpenFileMappingW(long long wstr) kernel32.OpenFileMappingW +@ stub PrefetchVirtualMemory +@ stdcall QueryMemoryResourceNotification(ptr ptr) kernel32.QueryMemoryResourceNotification +@ stdcall ReadProcessMemory(long ptr ptr long ptr) kernel32.ReadProcessMemory @ stub RegisterBadMemoryNotification +@ stdcall ResetWriteWatch(ptr long) kernel32.ResetWriteWatch +@ stub SetProcessWorkingSetSizeEx +@ stdcall SetSystemFileCacheSize(long long long) kernel32.SetSystemFileCacheSize +@ stdcall UnmapViewOfFile(ptr) kernel32.UnmapViewOfFile +@ stub UnmapViewOfFileEx @ stub UnregisterBadMemoryNotification +@ stdcall VirtualAlloc(ptr long long long) kernel32.VirtualAlloc +@ stdcall VirtualAllocEx(long ptr long long long) kernel32.VirtualAllocEx @ stub VirtualAllocExNuma +@ stdcall VirtualFree(ptr long long) kernel32.VirtualFree +@ stdcall VirtualFreeEx(long ptr long long) kernel32.VirtualFreeEx +@ stdcall VirtualLock(ptr long) kernel32.VirtualLock +@ stdcall VirtualProtect(ptr long long ptr) kernel32.VirtualProtect +@ stdcall VirtualProtectEx(long ptr long long ptr) kernel32.VirtualProtectEx +@ stdcall VirtualQuery(ptr ptr long) kernel32.VirtualQuery +@ stdcall VirtualUnlock(ptr long) kernel32.VirtualUnlock +@ stdcall WriteProcessMemory(long ptr ptr long ptr) kernel32.WriteProcessMemory
1
0
0
0
Nikolay Sivov : ntdll: Move EventWrite() to ntdll.
by Alexandre Julliard
08 May '17
08 May '17
Module: wine Branch: master Commit: 77887b474e60d21157cc1c59784b2b4c6c42dedf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=77887b474e60d21157cc1c597…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun May 7 17:51:20 2017 +0300 ntdll: Move EventWrite() to ntdll. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/advapi32.spec | 2 +- dlls/advapi32/eventlog.c | 10 ---------- dlls/ntdll/misc.c | 10 ++++++++++ dlls/ntdll/ntdll.spec | 1 + 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index 0f9e776..ff56343 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -293,7 +293,7 @@ @ stdcall EventRegister(ptr ptr ptr ptr) ntdll.EtwEventRegister @ stdcall EventSetInformation(int64 long ptr long) ntdll.EtwEventSetInformation @ stdcall EventUnregister(int64) ntdll.EtwEventUnregister -@ stdcall EventWrite(int64 ptr long ptr) +@ stdcall EventWrite(int64 ptr long ptr) ntdll.EtwEventWrite # @ stub EventWriteEndScenario # @ stub EventWriteEx # @ stub EventWriteStartScenario diff --git a/dlls/advapi32/eventlog.c b/dlls/advapi32/eventlog.c index 059c34d..1547aa4 100644 --- a/dlls/advapi32/eventlog.c +++ b/dlls/advapi32/eventlog.c @@ -835,16 +835,6 @@ ULONG WINAPI EventActivityIdControl(ULONG code, GUID *guid) } /****************************************************************************** - * EventWrite [ADVAPI32.@] - */ -ULONG WINAPI EventWrite( REGHANDLE handle, PCEVENT_DESCRIPTOR descriptor, ULONG count, - PEVENT_DATA_DESCRIPTOR data ) -{ - FIXME("%s, %p, %u, %p: stub\n", wine_dbgstr_longlong(handle), descriptor, count, data); - return ERROR_SUCCESS; -} - -/****************************************************************************** * EventWriteTransfer [ADVAPI32.@] */ ULONG WINAPI EventWriteTransfer( REGHANDLE handle, PCEVENT_DESCRIPTOR descriptor, LPCGUID activity, diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c index bf786d6..8f0c51c 100644 --- a/dlls/ntdll/misc.c +++ b/dlls/ntdll/misc.c @@ -466,3 +466,13 @@ BOOLEAN WINAPI EtwEventEnabled( REGHANDLE handle, const EVENT_DESCRIPTOR *descri FIXME("(%s, %p): stub\n", wine_dbgstr_longlong(handle), descriptor); return FALSE; } + +/****************************************************************************** + * EtwEventWrite (NTDLL.@) + */ +ULONG WINAPI EtwEventWrite( REGHANDLE handle, const EVENT_DESCRIPTOR *descriptor, ULONG count, + EVENT_DATA_DESCRIPTOR *data ) +{ + FIXME("(%s, %p, %u, %p): stub\n", wine_dbgstr_longlong(handle), descriptor, count, data); + return ERROR_SUCCESS; +} diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 4decd3a..9adf1ed 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -45,6 +45,7 @@ @ stdcall EtwEventRegister(ptr ptr ptr ptr) @ stdcall EtwEventSetInformation(int64 long ptr long) @ stdcall EtwEventUnregister(int64) +@ stdcall EtwEventWrite(int64 ptr long ptr) @ stdcall EtwRegisterTraceGuidsA(ptr ptr ptr long ptr str str ptr) @ stdcall EtwRegisterTraceGuidsW(ptr ptr ptr long ptr wstr wstr ptr) @ stdcall EtwUnregisterTraceGuids(int64)
1
0
0
0
Rosanne DiMesio : commonReply.php: fix incorrect call to query_insert_id
by Jeremy Newman
08 May '17
08 May '17
Module: appdb Branch: master Commit: b039a0ca7d71e3a7c8e4994448063eb1b5d9fe4a URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=b039a0ca7d71e3a7c8e49944…
Author: Rosanne DiMesio <dimesio(a)earthlink.net> Date: Fri May 5 19:25:04 2017 -0500 commonReply.php: fix incorrect call to query_insert_id Should be query_appdb_insert_id. Signed-off-by: Rosanne DiMesio <dimesio(a)earthlink.net> Signed-off-by: Jeremy Newman <jnewman(a)codeweavers.com> --- include/commonReply.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/commonReply.php b/include/commonReply.php index a276cc4..8362e7e 100644 --- a/include/commonReply.php +++ b/include/commonReply.php @@ -42,7 +42,7 @@ class CommonReply extends ObjectManagerBase if(!$hResult) return false; - $this->iId = query_insert_id(); + $this->iId = query_appdb_insert_id(); foreach($this->aTags as $iTag) { @@ -146,4 +146,4 @@ class CommonReply extends ObjectManagerBase } } -?> \ No newline at end of file +?>
1
0
0
0
← Newer
1
...
49
50
51
52
53
54
55
...
64
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
Results per page:
10
25
50
100
200