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 2008
----- 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
4 participants
722 discussions
Start a n
N
ew thread
Michael Stefaniuc : comdlg32: Fix the Catalan translation including some size fixes too.
by Alexandre Julliard
27 May '08
27 May '08
Module: wine Branch: master Commit: 240f64819a236bff6d4d95ff520203c4108f88c4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=240f64819a236bff6d4d95ff5…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue May 27 01:07:27 2008 +0200 comdlg32: Fix the Catalan translation including some size fixes too. --- dlls/comdlg32/cdlg_Ca.rc | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/comdlg32/cdlg_Ca.rc b/dlls/comdlg32/cdlg_Ca.rc index adf60de..b76f412 100644 --- a/dlls/comdlg32/cdlg_Ca.rc +++ b/dlls/comdlg32/cdlg_Ca.rc @@ -40,7 +40,7 @@ FONT 8, "MS Shell Dlg" DEFPUSHBUTTON "D'acord", IDOK, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP PUSHBUTTON "Anul�laci�", IDCANCEL, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "A&juda", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP - CHECKBOX "Nom�s &lectura", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + CHECKBOX "Nom�s &lectura", 1040, 208, 68, 60, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP } @@ -62,7 +62,7 @@ FONT 8, "MS Shell Dlg" DEFPUSHBUTTON "D'acord", IDOK, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP PUSHBUTTON "Anul�laci�", IDCANCEL, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "A&juda", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP - CHECKBOX "&Fer-ne c�pia", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + CHECKBOX "&Fer-ne c�pia", 1040, 208, 68, 60, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP } @@ -95,9 +95,9 @@ CAPTION "Configuraci FONT 8, "MS Shell Dlg" { GROUPBOX "Impressora:", 1072, 6, 10, 180, 65, BS_GROUPBOX - RADIOBUTTON "Impressora per &defecte", 1056, 16, 20, 80, 12 + RADIOBUTTON "Impressora per &defecte", 1056, 16, 20, 90, 12 LTEXT "[none]", 1088, 35, 35, 120, 9 - RADIOBUTTON "Impressora &especificada:", 1057, 16, 50, 80, 12 + RADIOBUTTON "Impressora &especificada:", 1057, 16, 50, 90, 12 COMBOBOX 1136, 35, 65, 149, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP DEFPUSHBUTTON "D'acord", IDOK, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP PUSHBUTTON "Anul�laci�", IDCANCEL, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP @@ -126,7 +126,7 @@ FONT 8, "MS Shell Dlg" LTEXT "&Estil del tipus de lletra:",1089 ,108,3,44,9 COMBOBOX 1137,108,13,64,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE - LTEXT "&Grand�ria:",1090,179,3,30,9 + LTEXT "&Grand�ria:",1090,179,3,33,9 COMBOBOX 1138,179,13,32,54, CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_DISABLENOSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SIMPLE | CBS_SORT DEFPUSHBUTTON "D'acord",IDOK,218,6,40,14,WS_GROUP @@ -135,7 +135,7 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "A&juda" , 1038,218,57,40,14,WS_GROUP GROUPBOX "Efectes",1072,6,72,84,34,WS_GROUP CHECKBOX "&Barrar-lo", 1040, 10,82,50,10, BS_AUTOCHECKBOX | WS_TABSTOP - CHECKBOX "&Subratllar-lo", 1041, 10,94,50,10, BS_AUTOCHECKBOX + CHECKBOX "&Subratllar-lo", 1041, 10,94,60,10, BS_AUTOCHECKBOX LTEXT "&Color:", 1091 ,6,110,30,9 COMBOBOX 1139,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP @@ -189,7 +189,7 @@ FONT 8, "MS Shell Dlg" LTEXT "&Cercar:", -1, 4, 8, 42, 8 EDITTEXT 1152, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP CHECKBOX "C&ercar mots sencers", 1040, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - CHECKBOX "&Distingir maj�scules de min�scules", 1041, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "&Distingir maj�scules de min�scules", 1041, 4, 42, 124, 12, BS_AUTOCHECKBOX | WS_TABSTOP GROUPBOX "Direcci�", 1072, 107, 26, 68, 28 CONTROL "&Amunt", 1056, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12 CONTROL "A&vall", 1057, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12 @@ -206,10 +206,10 @@ FONT 8, "MS Shell Dlg" { LTEXT "&Cercar:", -1, 4, 9, 48, 8 EDITTEXT 1152, 54, 7, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP - LTEXT "&Substituir per:", 1090, -1, 4, 26, 48, 8 + LTEXT "&Substituir per:", -1, 4, 26, 48, 8 EDITTEXT 1153, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP CHECKBOX "Cercar &mots sencers", 1040, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - CHECKBOX "&Distingir maj�scules de min�scules", 1041, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "&Distingir maj�scules de min�scules", 1041, 5, 62, 129, 12, BS_AUTOCHECKBOX | WS_TABSTOP DEFPUSHBUTTON "C&ontinucaci�", IDOK, 174, 4, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP PUSHBUTTON "S&ubstituci�", 1024, 174, 21, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "Substituci� &autom�tica", 1025, 174, 38, 50, 14, WS_GROUP | WS_TABSTOP
1
0
0
0
Jon Griffiths : msvcrt/tests: Fix 4 tests that always fail on Vista.
by Alexandre Julliard
27 May '08
27 May '08
Module: wine Branch: master Commit: e5ffcd8827fb2080a1f631a49eb2f8133f617801 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e5ffcd8827fb2080a1f631a49…
Author: Jon Griffiths <jon_p_griffiths(a)yahoo.com> Date: Mon May 26 11:20:09 2008 -0700 msvcrt/tests: Fix 4 tests that always fail on Vista. --- dlls/msvcrt/tests/cpp.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/msvcrt/tests/cpp.c b/dlls/msvcrt/tests/cpp.c index ef80cac..96dcfbb 100644 --- a/dlls/msvcrt/tests/cpp.c +++ b/dlls/msvcrt/tests/cpp.c @@ -301,6 +301,7 @@ static void test_exception(void) /* Operator equals */ memset(&e2, 0, sizeof(e2)); + call_func1(pexception_default_ctor, &e2); pe = call_func2(pexception_opequals, &e2, &e); ok(e2.vtable != NULL, "Null exception vtable for e2\n"); ok(e2.name && e2.name != e.name && !strcmp(e2.name, "An exception name"), "Bad exception name for e2\n"); @@ -425,6 +426,7 @@ static void test_bad_typeid(void) /* Operator equals */ memset(&e2, 1, sizeof(e2)); + call_func1(pexception_default_ctor, &e2); pe = call_func2(pbad_typeid_opequals, &e2, &e); ok(e2.vtable != NULL, "Null bad_typeid vtable for e2\n"); ok(e2.name && e2.name != e.name && !strcmp(e2.name, "A bad_typeid name"), "Bad bad_typeid name for e2\n"); @@ -552,6 +554,7 @@ static void test_bad_cast(void) /* Operator equals */ memset(&e2, 1, sizeof(e2)); + call_func1(pexception_default_ctor, &e2); pe = call_func2(pbad_cast_opequals, &e2, &e); ok(e2.vtable != NULL, "Null bad_cast vtable for e2\n"); ok(e2.name && e2.name != e.name && !strcmp(e2.name, "A bad_cast name"), "Bad bad_cast name for e2\n"); @@ -653,6 +656,7 @@ static void test___non_rtti_object(void) /* Operator equals */ memset(&e2, 1, sizeof(e2)); + call_func1(pexception_default_ctor, &e2); pe = call_func2(p__non_rtti_object_opequals, &e2, &e); ok(e2.vtable != NULL, "Null __non_rtti_object vtable for e2\n"); ok(e2.name && e2.name != e.name && !strcmp(e2.name, "A __non_rtti_object name"), "Bad __non_rtti_object name for e2\n");
1
0
0
0
Michael Karcher : oleaut32: Currency to BSTR must use local decimal separator.
by Alexandre Julliard
27 May '08
27 May '08
Module: wine Branch: master Commit: c5310eda8d19fa66278274ba9831122a76c721ee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c5310eda8d19fa66278274ba9…
Author: Michael Karcher <wine(a)mkarcher.dialup.fu-berlin.de> Date: Mon May 26 15:30:10 2008 +0200 oleaut32: Currency to BSTR must use local decimal separator. --- dlls/oleaut32/tests/vartype.c | 64 +++++++++++++++++++++++++++++++++++++++++ dlls/oleaut32/vartype.c | 2 +- 2 files changed, 65 insertions(+), 1 deletions(-) diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index acd393a..770a860 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -498,6 +498,7 @@ static HRESULT (WINAPI *pVarBoolFromUI8)(ULONG64,VARIANT_BOOL*); static HRESULT (WINAPI *pVarBstrFromR4)(FLOAT,LCID,ULONG,BSTR*); static HRESULT (WINAPI *pVarBstrFromDate)(DATE,LCID,ULONG,BSTR*); +static HRESULT (WINAPI *pVarBstrFromCy)(CY,LCID,ULONG,BSTR*); static HRESULT (WINAPI *pVarBstrFromDec)(DECIMAL*,LCID,ULONG,BSTR*); static HRESULT (WINAPI *pVarBstrCmp)(BSTR,BSTR,LCID,ULONG); @@ -4800,6 +4801,68 @@ static void test_VarBstrFromDate(void) BSTR_DATE(2958465.0, "12/31/9999"); } +#define BSTR_CY(l, a, b, e) \ + S(l).Lo = b; S(l).Hi = a; \ + hres = VarBstrFromCy(l, lcid, LOCALE_NOUSEROVERRIDE, &bstr);\ + ok(hres == S_OK, "got hres 0x%08x\n", hres);\ + if (hres== S_OK && bstr)\ + {\ + ok(lstrcmpW(bstr, e) == 0, "invalid number (got %s)\n", wtoascii(bstr));\ + } + +static void test_VarBstrFromCy(void) +{ + LCID lcid; + HRESULT hres; + BSTR bstr = NULL; + CY l; + + static const WCHAR szZero[] = {'0', '\0'}; + static const WCHAR szOne[] = {'1', '\0'}; + static const WCHAR szOnePointFive[] = {'1','.','5','\0'}; + static const WCHAR szMinusOnePointFive[] = {'-','1','.','5','\0'}; + static const WCHAR szBigNum1[] = {'4','2','9','4','9','6','.','7','2','9','5','\0'}; /* (1 << 32) - 1 / 1000 */ + static const WCHAR szBigNum2[] = {'4','2','9','4','9','6','.','7','2','9','6','\0'}; /* (1 << 32) / 1000 */ + static const WCHAR szBigNum3[] = {'9','2','2','3','3','7','2','0','3','6','8','5','4','7','7','.','5','8','0','7','\0'}; /* ((1 << 63) - 1)/10000 */ + + static const WCHAR szSmallNumber_English[] = {'0','.','0','0','0','9','\0'}; + static const WCHAR szSmallNumber_Spanish[] = {'0',',','0','0','0','9','\0'}; + + CHECKPTR(VarBstrFromCy); + lcid = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); + + /* check zero */ + BSTR_CY(l, 0,0, szZero); + + /* check one */ + BSTR_CY(l, 0, 10000, szOne); + + /* check one point five */ + BSTR_CY(l, 0, 15000, szOnePointFive); + + /* check minus one point five */ + BSTR_CY(l, 0xffffffff, ((15000)^0xffffffff)+1, szMinusOnePointFive); + + /* check bignum (1) */ + BSTR_CY(l, 0, 0xffffffff, szBigNum1); + + /* check bignum (2) */ + BSTR_CY(l, 1,0, szBigNum2); + + /* check bignum (3) */ + BSTR_CY(l, 0x7fffffff,0xffffffff, szBigNum3); + + /* check leading zeros and decimal sep. for English locale */ + BSTR_CY(l, 0,9, szSmallNumber_English); + + lcid = MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_DEFAULT), SORT_DEFAULT); + + /* check leading zeros and decimal sep. for Spanish locale */ + BSTR_CY(l, 0,9, szSmallNumber_Spanish); +} + +#undef BSTR_CY + #define BSTR_DEC(l, a, b, c, d, e) \ SETDEC(l, a,b,c,d);\ hres = VarBstrFromDec(&l, lcid, LOCALE_NOUSEROVERRIDE, &bstr);\ @@ -6042,6 +6105,7 @@ START_TEST(vartype) test_VarBstrFromR4(); test_VarBstrFromDate(); + test_VarBstrFromCy(); test_VarBstrFromDec(); test_VarBstrCmp(); test_SysStringLen(); diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c index 7531508..daeac85 100644 --- a/dlls/oleaut32/vartype.c +++ b/dlls/oleaut32/vartype.c @@ -6529,7 +6529,7 @@ HRESULT WINAPI VarBstrFromCy(CY cyIn, LCID lcid, ULONG dwFlags, BSTR *pbstrOut) *pbstrOut = SysAllocString(cybuff); } else - *pbstrOut = SysAllocString(buff); + *pbstrOut = VARIANT_BstrReplaceDecimal(buff,lcid,dwFlags); return *pbstrOut ? S_OK : E_OUTOFMEMORY; }
1
0
0
0
Dmitry Timoshkov : gdi32: Make generated EMFs fully match Windows ones.
by Alexandre Julliard
27 May '08
27 May '08
Module: wine Branch: master Commit: 02a15500fb9c20e31f982de8bc69745ccc63bbce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=02a15500fb9c20e31f982de8b…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Sun May 25 21:32:31 2008 +0900 gdi32: Make generated EMFs fully match Windows ones. --- dlls/gdi32/enhmetafile.c | 89 +++++++++++++++++++++++------------------- dlls/gdi32/metafile.c | 19 ++++++++- dlls/gdi32/tests/metafile.c | 10 ++-- 3 files changed, 70 insertions(+), 48 deletions(-) diff --git a/dlls/gdi32/enhmetafile.c b/dlls/gdi32/enhmetafile.c index 1041594..b20f442 100644 --- a/dlls/gdi32/enhmetafile.c +++ b/dlls/gdi32/enhmetafile.c @@ -2257,6 +2257,7 @@ BOOL WINAPI EnumEnhMetaFile( HPEN hPen = NULL; HBRUSH hBrush = NULL; HFONT hFont = NULL; + HRGN hRgn = NULL; enum_emh_data *info; SIZE vp_size, win_size; POINT vp_org, win_org; @@ -2311,11 +2312,18 @@ BOOL WINAPI EnumEnhMetaFile( GetWindowOrgEx(hdc, &win_org); mapMode = GetMapMode(hdc); - /* save the current pen, brush and font */ + /* save DC */ hPen = GetCurrentObject(hdc, OBJ_PEN); hBrush = GetCurrentObject(hdc, OBJ_BRUSH); hFont = GetCurrentObject(hdc, OBJ_FONT); + hRgn = CreateRectRgn(0, 0, 0, 0); + if (!GetClipRgn(hdc, hRgn)) + { + DeleteObject(hRgn); + hRgn = 0; + } + old_text_color = SetTextColor(hdc, RGB(0,0,0)); old_bk_color = SetBkColor(hdc, RGB(0xff, 0xff, 0xff)); old_align = SetTextAlign(hdc, 0); @@ -2410,10 +2418,12 @@ BOOL WINAPI EnumEnhMetaFile( SetBkColor(hdc, old_bk_color); SetTextColor(hdc, old_text_color); - /* restore pen, brush and font */ + /* restore DC */ SelectObject(hdc, hBrush); SelectObject(hdc, hPen); SelectObject(hdc, hFont); + ExtSelectClipRgn(hdc, hRgn, RGN_COPY); + DeleteObject(hRgn); SetWorldTransform(hdc, &savedXform); if (savedMode) @@ -2673,9 +2683,8 @@ HENHMETAFILE WINAPI SetWinMetaFileBits(UINT cbBuffer, HENHMETAFILE ret = NULL; HDC hdc = NULL, hdcdisp = NULL; RECT rc, *prcFrame = NULL; - gdi_mf_comment *mfcomment; - UINT mfcomment_size; LONG mm, xExt, yExt; + INT horzsize, vertsize, horzres, vertres; TRACE("(%d, %p, %p, %p)\n", cbBuffer, lpbBuffer, hdcRef, lpmfp); @@ -2736,49 +2745,49 @@ HENHMETAFILE WINAPI SetWinMetaFileBits(UINT cbBuffer, * Write the original METAFILE into the enhanced metafile. * It is encapsulated in a GDICOMMENT_WINDOWS_METAFILE record. */ - mfcomment_size = sizeof (gdi_mf_comment) + cbBuffer; - mfcomment = HeapAlloc(GetProcessHeap(), 0, mfcomment_size); - if(mfcomment) - { - mfcomment->ident = GDICOMMENT_IDENTIFIER; - mfcomment->iComment = GDICOMMENT_WINDOWS_METAFILE; - mfcomment->nVersion = 0x00000300; - mfcomment->nChecksum = 0; /* FIXME */ - mfcomment->fFlags = 0; - mfcomment->cbWinMetaFile = cbBuffer; - memcpy(&mfcomment[1], lpbBuffer, cbBuffer); - GdiComment(hdc, mfcomment_size, (BYTE*) mfcomment); - HeapFree(GetProcessHeap(), 0, mfcomment); - } - if (mm != MM_TEXT) - SetMapMode(hdc, mm); - - if (mm == MM_ISOTROPIC || mm == MM_ANISOTROPIC) { - INT horzsize, vertsize, horzres, vertres; + gdi_mf_comment *mfcomment; + UINT mfcomment_size; - horzsize = GetDeviceCaps(hdcRef, HORZSIZE); - vertsize = GetDeviceCaps(hdcRef, VERTSIZE); - horzres = GetDeviceCaps(hdcRef, HORZRES); - vertres = GetDeviceCaps(hdcRef, VERTRES); - - if (!xExt || !yExt) + mfcomment_size = sizeof (gdi_mf_comment) + cbBuffer; + mfcomment = HeapAlloc(GetProcessHeap(), 0, mfcomment_size); + if (mfcomment) { - /* Use the whole device surface */ - xExt = horzres; - yExt = vertres; - } - else - { - xExt = MulDiv(xExt, horzres, 100 * horzsize); - yExt = MulDiv(yExt, vertres, 100 * vertsize); + mfcomment->ident = GDICOMMENT_IDENTIFIER; + mfcomment->iComment = GDICOMMENT_WINDOWS_METAFILE; + mfcomment->nVersion = 0x00000300; + mfcomment->nChecksum = 0; /* FIXME */ + mfcomment->fFlags = 0; + mfcomment->cbWinMetaFile = cbBuffer; + memcpy(&mfcomment[1], lpbBuffer, cbBuffer); + GdiComment(hdc, mfcomment_size, (BYTE*) mfcomment); + HeapFree(GetProcessHeap(), 0, mfcomment); } + SetMapMode(hdc, mm); + } - /* set the initial viewport:window ratio as 1:1 */ - SetViewportExtEx(hdc, xExt, yExt, NULL); - SetWindowExtEx(hdc, xExt, yExt, NULL); + + horzsize = GetDeviceCaps(hdcRef, HORZSIZE); + vertsize = GetDeviceCaps(hdcRef, VERTSIZE); + horzres = GetDeviceCaps(hdcRef, HORZRES); + vertres = GetDeviceCaps(hdcRef, VERTRES); + + if (!xExt || !yExt) + { + /* Use the whole device surface */ + xExt = horzres; + yExt = vertres; } + else + { + xExt = MulDiv(xExt, horzres, 100 * horzsize); + yExt = MulDiv(yExt, vertres, 100 * vertsize); + } + + /* set the initial viewport:window ratio as 1:1 */ + SetViewportExtEx(hdc, xExt, yExt, NULL); + SetWindowExtEx(hdc, xExt, yExt, NULL); PlayMetaFile(hdc, hmf); diff --git a/dlls/gdi32/metafile.c b/dlls/gdi32/metafile.c index 56404a0..68ec203 100644 --- a/dlls/gdi32/metafile.c +++ b/dlls/gdi32/metafile.c @@ -396,6 +396,8 @@ BOOL MF_PlayMetaFile( HDC hdc, METAHEADER *mh) HPEN hPen; HBRUSH hBrush; HFONT hFont; + HPALETTE hPal; + HRGN hRgn; BOOL loaded = FALSE; if (!mh) return FALSE; @@ -405,10 +407,18 @@ BOOL MF_PlayMetaFile( HDC hdc, METAHEADER *mh) loaded = TRUE; } - /* save the current pen, brush and font */ + /* save DC */ hPen = GetCurrentObject(hdc, OBJ_PEN); hBrush = GetCurrentObject(hdc, OBJ_BRUSH); hFont = GetCurrentObject(hdc, OBJ_FONT); + hPal = GetCurrentObject(hdc, OBJ_PAL); + + hRgn = CreateRectRgn(0, 0, 0, 0); + if (!GetClipRgn(hdc, hRgn)) + { + DeleteObject(hRgn); + hRgn = 0; + } /* create the handle table */ ht = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, @@ -436,9 +446,12 @@ BOOL MF_PlayMetaFile( HDC hdc, METAHEADER *mh) PlayMetaFileRecord( hdc, ht, mr, mh->mtNoObjects ); } - SelectObject(hdc, hBrush); + /* restore DC */ SelectObject(hdc, hPen); - SelectObject(hdc, hFont); + SelectObject(hdc, hBrush); + SelectPalette(hdc, hPal, FALSE); + ExtSelectClipRgn(hdc, hRgn, RGN_COPY); + DeleteObject(hRgn); /* free objects in handle table */ for(i = 0; i < mh->mtNoObjects; i++) diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index 40c7445..5f295bb 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -1480,7 +1480,7 @@ static void test_emf_ExtTextOut_on_path(void) * are there, but their contents don't match for different reasons. */ if (compare_emf_bits(hMetafile, EMF_TEXTOUT_ON_PATH_BITS, sizeof(EMF_TEXTOUT_ON_PATH_BITS), - "emf_TextOut_on_path", FALSE, TRUE) != 0) + "emf_TextOut_on_path", FALSE, FALSE) != 0) { dump_emf_bits(hMetafile, "emf_TextOut_on_path"); dump_emf_records(hMetafile, "emf_TextOut_on_path"); @@ -1676,7 +1676,7 @@ static void test_emf_clipping(void) ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError()); if (compare_emf_bits(hemf, EMF_CLIPPING, sizeof(EMF_CLIPPING), - "emf_clipping", FALSE, TRUE) != 0) + "emf_clipping", FALSE, FALSE) != 0) { dump_emf_bits(hemf, "emf_clipping"); dump_emf_records(hemf, "emf_clipping"); @@ -1785,7 +1785,7 @@ static void test_mf_conversions(void) hemf = create_converted_emf(&mfp); if (compare_emf_bits(hemf, EMF_LINETO_MM_ANISOTROPIC_BITS, sizeof(EMF_LINETO_MM_ANISOTROPIC_BITS), - "emf_LineTo MM_ANISOTROPIC", TRUE, TRUE) != 0) + "emf_LineTo MM_ANISOTROPIC", TRUE, FALSE) != 0) { dump_emf_bits(hemf, "emf_LineTo MM_ANISOTROPIC"); dump_emf_records(hemf, "emf_LineTo MM_ANISOTROPIC"); @@ -1810,7 +1810,7 @@ static void test_mf_conversions(void) hemf = create_converted_emf(&mfp); if (compare_emf_bits(hemf, EMF_LINETO_MM_TEXT_BITS, sizeof(EMF_LINETO_MM_TEXT_BITS), - "emf_LineTo MM_TEXT", TRUE, TRUE) != 0) + "emf_LineTo MM_TEXT", TRUE, FALSE) != 0) { dump_emf_bits(hemf, "emf_LineTo MM_TEXT"); dump_emf_records(hemf, "emf_LineTo MM_TEXT"); @@ -1830,7 +1830,7 @@ static void test_mf_conversions(void) hemf = create_converted_emf(NULL); if (compare_emf_bits(hemf, EMF_LINETO_BITS, sizeof(EMF_LINETO_BITS), - "emf_LineTo NULL", TRUE, TRUE) != 0) + "emf_LineTo NULL", TRUE, FALSE) != 0) { dump_emf_bits(hemf, "emf_LineTo NULL"); dump_emf_records(hemf, "emf_LineTo NULL");
1
0
0
0
Dmitry Timoshkov : gdi32: If there is no clipping rect, EMREXTTEXTOUT shouldn't have a bounding rect.
by Alexandre Julliard
27 May '08
27 May '08
Module: wine Branch: master Commit: 7aff723ccccd11f416b04501b47289bcc355001c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7aff723ccccd11f416b04501b…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Sun May 25 21:31:20 2008 +0900 gdi32: If there is no clipping rect, EMREXTTEXTOUT shouldn't have a bounding rect. --- dlls/gdi32/enhmfdrv/graphics.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c index 4a695f2..28f34cd 100644 --- a/dlls/gdi32/enhmfdrv/graphics.c +++ b/dlls/gdi32/enhmfdrv/graphics.c @@ -775,6 +775,13 @@ BOOL EMFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, } } + if (!lprect) + { + pemr->rclBounds.left = pemr->rclBounds.top = 0; + pemr->rclBounds.right = pemr->rclBounds.bottom = -1; + goto no_bounds; + } + switch (textAlign & (TA_LEFT | TA_RIGHT | TA_CENTER)) { case TA_CENTER: { pemr->rclBounds.left = x - (textWidth / 2) - 1; @@ -814,6 +821,7 @@ BOOL EMFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, } } +no_bounds: ret = EMFDRV_WriteRecord( dev, &pemr->emr ); if(ret) EMFDRV_UpdateBBox( dev, &pemr->rclBounds );
1
0
0
0
Dmitry Timoshkov : gdi32: Ignore exScale/ eyScale when comparing EMREXTTEXTOUT EMF records.
by Alexandre Julliard
27 May '08
27 May '08
Module: wine Branch: master Commit: 0c59e312c183c4d988feb10a8adf84f5a70558db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0c59e312c183c4d988feb10a8…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Sun May 25 21:30:10 2008 +0900 gdi32: Ignore exScale/eyScale when comparing EMREXTTEXTOUT EMF records. --- dlls/gdi32/tests/metafile.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 files changed, 40 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index d7eda2d..40c7445 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -975,6 +975,22 @@ static void dump_emf_record(const ENHMETARECORD *emr, const char *desc) printf ("};\n"); } +static void dump_EMREXTTEXTOUT(const EMREXTTEXTOUTW *eto) +{ + trace("rclBounds %d,%d - %d,%d\n", eto->rclBounds.left, eto->rclBounds.top, + eto->rclBounds.right, eto->rclBounds.bottom); + trace("iGraphicsMode %u\n", eto->iGraphicsMode); + trace("exScale: %f\n", eto->exScale); + trace("eyScale: %f\n", eto->eyScale); + trace("emrtext.ptlReference %d,%d\n", eto->emrtext.ptlReference.x, eto->emrtext.ptlReference.y); + trace("emrtext.nChars %u\n", eto->emrtext.nChars); + trace("emrtext.offString %#x\n", eto->emrtext.offString); + trace("emrtext.fOptions %#x\n", eto->emrtext.fOptions); + trace("emrtext.rcl %d,%d - %d,%d\n", eto->emrtext.rcl.left, eto->emrtext.rcl.top, + eto->emrtext.rcl.right, eto->emrtext.rcl.bottom); + trace("emrtext.offDx %#x\n", eto->emrtext.offDx); +} + static BOOL match_emf_record(const ENHMETARECORD *emr1, const ENHMETARECORD *emr2, const char *desc, BOOL ignore_scaling, BOOL todo) { @@ -1017,7 +1033,30 @@ static BOOL match_emf_record(const ENHMETARECORD *emr1, const ENHMETARECORD *emr emr1->iType == EMR_SETVIEWPORTEXTEX)) return TRUE; - diff = memcmp(emr1->dParm, emr2->dParm, emr1->nSize - sizeof(EMR)); + if (emr1->iType == EMR_EXTTEXTOUTW || emr1->iType == EMR_EXTTEXTOUTA) + { + EMREXTTEXTOUTW *eto1, *eto2; + + eto1 = HeapAlloc(GetProcessHeap(), 0, emr1->nSize); + memcpy(eto1, emr1, emr1->nSize); + eto2 = HeapAlloc(GetProcessHeap(), 0, emr2->nSize); + memcpy(eto2, emr2, emr2->nSize); + + /* different Windows versions setup DC scaling differently */ + eto1->exScale = eto1->eyScale = 0.0; + eto2->exScale = eto2->eyScale = 0.0; + + diff = memcmp(eto1, eto2, emr1->nSize); + if (diff) + { + dump_EMREXTTEXTOUT(eto1); + dump_EMREXTTEXTOUT(eto2); + } + HeapFree(GetProcessHeap(), 0, eto1); + HeapFree(GetProcessHeap(), 0, eto2); + } + else + diff = memcmp(emr1, emr2, emr1->nSize); if (diff && todo) { todo_wine
1
0
0
0
H. Verbeet : d3d9: Test our texop implementation.
by Alexandre Julliard
27 May '08
27 May '08
Module: wine Branch: master Commit: 8c79f136637f4b0e636445592228d29d57bcdc3c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8c79f136637f4b0e636445592…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Sat May 24 10:33:42 2008 +0200 d3d9: Test our texop implementation. --- dlls/d3d9/tests/visual.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 144 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8c79f136637f4b0e63644…
1
0
0
0
H. Verbeet : d3d8: Test our texop implementation.
by Alexandre Julliard
27 May '08
27 May '08
Module: wine Branch: master Commit: 2f6fbdec8caee311e2fb85b2ddc9fbd8a9afaea5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f6fbdec8caee311e2fb85b2d…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Sat May 24 10:33:36 2008 +0200 d3d8: Test our texop implementation. --- dlls/d3d8/tests/visual.c | 133 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 133 insertions(+), 0 deletions(-) diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index e34769c..c0e00cf 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -39,6 +39,18 @@ static HWND create_window(void) return ret; } +static BOOL color_match(D3DCOLOR c1, D3DCOLOR c2, BYTE max_diff) +{ + if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; + c1 >>= 8; c2 >>= 8; + if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; + c1 >>= 8; c2 >>= 8; + if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; + c1 >>= 8; c2 >>= 8; + if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; + return TRUE; +} + static DWORD getPixelColor(IDirect3DDevice8 *device, UINT x, UINT y) { DWORD ret; @@ -1147,6 +1159,126 @@ out: IDirect3D8_Release(d3d); } +static void texop_test(IDirect3DDevice8 *device) +{ + IDirect3DTexture8 *texture = NULL; + D3DLOCKED_RECT locked_rect; + D3DCOLOR color; + D3DCAPS8 caps; + HRESULT hr; + int i; + + static const struct { + float x, y, z; + D3DCOLOR diffuse; + float s, t; + } quad[] = { + {-1.0f, -1.0f, 0.1f, D3DCOLOR_ARGB(0x55, 0xff, 0x00, 0x00), -1.0f, -1.0f}, + {-1.0f, 1.0f, 0.1f, D3DCOLOR_ARGB(0x55, 0xff, 0x00, 0x00), -1.0f, 1.0f}, + { 1.0f, -1.0f, 0.1f, D3DCOLOR_ARGB(0x55, 0xff, 0x00, 0x00), 1.0f, -1.0f}, + { 1.0f, 1.0f, 0.1f, D3DCOLOR_ARGB(0x55, 0xff, 0x00, 0x00), 1.0f, 1.0f} + }; + + static const struct { + D3DTEXTUREOP op; + const char *name; + DWORD caps_flag; + D3DCOLOR result; + } test_data[] = { + {D3DTOP_SELECTARG1, "SELECTARG1", D3DTEXOPCAPS_SELECTARG1, D3DCOLOR_ARGB(0x00, 0x00, 0xff, 0x00)}, + {D3DTOP_SELECTARG2, "SELECTARG2", D3DTEXOPCAPS_SELECTARG2, D3DCOLOR_ARGB(0x00, 0x33, 0x33, 0x33)}, + {D3DTOP_MODULATE, "MODULATE", D3DTEXOPCAPS_MODULATE, D3DCOLOR_ARGB(0x00, 0x00, 0x33, 0x00)}, + {D3DTOP_MODULATE2X, "MODULATE2X", D3DTEXOPCAPS_MODULATE2X, D3DCOLOR_ARGB(0x00, 0x00, 0x66, 0x00)}, + {D3DTOP_MODULATE4X, "MODULATE4X", D3DTEXOPCAPS_MODULATE4X, D3DCOLOR_ARGB(0x00, 0x00, 0xcc, 0x00)}, + {D3DTOP_ADD, "ADD", D3DTEXOPCAPS_ADD, D3DCOLOR_ARGB(0x00, 0x33, 0xff, 0x33)}, + {D3DTOP_ADDSIGNED, "ADDSIGNED", D3DTEXOPCAPS_ADDSIGNED, D3DCOLOR_ARGB(0x00, 0x00, 0xb2, 0x00)}, + {D3DTOP_ADDSIGNED2X, "ADDSIGNED2X", D3DTEXOPCAPS_ADDSIGNED2X, D3DCOLOR_ARGB(0x00, 0x00, 0xff, 0x00)}, + {D3DTOP_SUBTRACT, "SUBTRACT", D3DTEXOPCAPS_SUBTRACT, D3DCOLOR_ARGB(0x00, 0x00, 0xcc, 0x00)}, + {D3DTOP_ADDSMOOTH, "ADDSMOOTH", D3DTEXOPCAPS_ADDSMOOTH, D3DCOLOR_ARGB(0x00, 0x33, 0xff, 0x33)}, + {D3DTOP_BLENDDIFFUSEALPHA, "BLENDDIFFUSEALPHA", D3DTEXOPCAPS_BLENDDIFFUSEALPHA, D3DCOLOR_ARGB(0x00, 0x22, 0x77, 0x22)}, + {D3DTOP_BLENDTEXTUREALPHA, "BLENDTEXTUREALPHA", D3DTEXOPCAPS_BLENDTEXTUREALPHA, D3DCOLOR_ARGB(0x00, 0x14, 0xad, 0x14)}, + {D3DTOP_BLENDFACTORALPHA, "BLENDFACTORALPHA", D3DTEXOPCAPS_BLENDFACTORALPHA, D3DCOLOR_ARGB(0x00, 0x07, 0xe4, 0x07)}, + {D3DTOP_BLENDTEXTUREALPHAPM, "BLENDTEXTUREALPHAPM", D3DTEXOPCAPS_BLENDTEXTUREALPHAPM, D3DCOLOR_ARGB(0x00, 0x14, 0xff, 0x14)}, + {D3DTOP_BLENDCURRENTALPHA, "BLENDCURRENTALPHA", D3DTEXOPCAPS_BLENDCURRENTALPHA, D3DCOLOR_ARGB(0x00, 0x22, 0x77, 0x22)}, + {D3DTOP_MODULATEALPHA_ADDCOLOR, "MODULATEALPHA_ADDCOLOR", D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR, D3DCOLOR_ARGB(0x00, 0x1f, 0xff, 0x1f)}, + {D3DTOP_MODULATECOLOR_ADDALPHA, "MODULATECOLOR_ADDALPHA", D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA, D3DCOLOR_ARGB(0x00, 0x99, 0xcc, 0x99)}, + {D3DTOP_MODULATEINVALPHA_ADDCOLOR, "MODULATEINVALPHA_ADDCOLOR", D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR, D3DCOLOR_ARGB(0x00, 0x14, 0xff, 0x14)}, + {D3DTOP_MODULATEINVCOLOR_ADDALPHA, "MODULATEINVCOLOR_ADDALPHA", D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA, D3DCOLOR_ARGB(0x00, 0xcc, 0x99, 0xcc)}, + /* BUMPENVMAP & BUMPENVMAPLUMINANCE have their own tests */ + {D3DTOP_DOTPRODUCT3, "DOTPRODUCT2", D3DTEXOPCAPS_DOTPRODUCT3, D3DCOLOR_ARGB(0x00, 0x99, 0x99, 0x99)}, + {D3DTOP_MULTIPLYADD, "MULTIPLYADD", D3DTEXOPCAPS_MULTIPLYADD, D3DCOLOR_ARGB(0x00, 0xff, 0x33, 0x00)}, + {D3DTOP_LERP, "LERP", D3DTEXOPCAPS_LERP, D3DCOLOR_ARGB(0x00, 0x00, 0x33, 0x33)}, + }; + + memset(&caps, 0, sizeof(caps)); + hr = IDirect3DDevice8_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "GetDeviceCaps failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + + hr = IDirect3DDevice8_SetVertexShader(device, D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX0); + ok(SUCCEEDED(hr), "SetVertexShader failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + + hr = IDirect3DDevice8_CreateTexture(device, 1, 1, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture); + ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateTexture failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + hr = IDirect3DTexture8_LockRect(texture, 0, &locked_rect, NULL, 0); + ok(SUCCEEDED(hr), "LockRect failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + *((DWORD *)locked_rect.pBits) = D3DCOLOR_ARGB(0x99, 0x00, 0xff, 0x00); + hr = IDirect3DTexture8_UnlockRect(texture, 0); + ok(SUCCEEDED(hr), "LockRect failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + hr = IDirect3DDevice8_SetTexture(device, 0, (IDirect3DBaseTexture8 *)texture); + ok(SUCCEEDED(hr), "SetTexture failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + + hr = IDirect3DDevice8_SetTextureStageState(device, 0, D3DTSS_COLORARG0, D3DTA_DIFFUSE); + ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + hr = IDirect3DDevice8_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); + ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + hr = IDirect3DDevice8_SetTextureStageState(device, 0, D3DTSS_COLORARG2, D3DTA_TFACTOR); + ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + + hr = IDirect3DDevice8_SetTextureStageState(device, 1, D3DTSS_COLOROP, D3DTOP_DISABLE); + ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(SUCCEEDED(hr), "SetRenderState failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_TEXTUREFACTOR, 0xdd333333); + ok(SUCCEEDED(hr), "SetRenderState failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_RED | D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_BLUE | D3DCOLORWRITEENABLE_ALPHA); + ok(SUCCEEDED(hr), "SetRenderState failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + + hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x00000000, 1.0f, 0); + ok(SUCCEEDED(hr), "IDirect3DDevice9_Clear failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + + for (i = 0; i < sizeof(test_data) / sizeof(*test_data); ++i) + { + if (!(caps.TextureOpCaps & test_data[i].caps_flag)) + { + skip("tex operation %s not supported\n", test_data[i].name); + continue; + } + + hr = IDirect3DDevice8_SetTextureStageState(device, 0, D3DTSS_COLOROP, test_data[i].op); + ok(SUCCEEDED(hr), "SetTextureStageState (%s) failed with 0x%08x (%s)\n", + test_data[i].name, hr, DXGetErrorString8(hr)); + + hr = IDirect3DDevice8_BeginScene(device); + ok(SUCCEEDED(hr), "BeginScene failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + + hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + + hr = IDirect3DDevice8_EndScene(device); + ok(SUCCEEDED(hr), "EndScene failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + + hr = IDirect3DDevice8_Present(device, NULL, NULL, NULL, NULL); + ok(SUCCEEDED(hr), "Present failed with 0x%08x (%s)\n", hr, DXGetErrorString8(hr)); + + color = getPixelColor(device, 320, 240); + ok(color_match(color, test_data[i].result, 1), "Operation %s returned color 0x%08x, expected 0x%08x\n", + test_data[i].name, color, test_data[i].result); + } + + if (texture) IDirect3DTexture8_Release(texture); +} + START_TEST(visual) { IDirect3DDevice8 *device_ptr; @@ -1219,6 +1351,7 @@ START_TEST(visual) } p8_texture_test(device_ptr); + texop_test(device_ptr); cleanup: if(device_ptr) {
1
0
0
0
H. Verbeet : wined3d: Fix the nvrc implementation of WINED3DTOP_MULTIPLYADD and WINED3DTOP_LERP.
by Alexandre Julliard
27 May '08
27 May '08
Module: wine Branch: master Commit: 8e6c7aaf1fe6d99f3bfee4b4752da318c000486f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8e6c7aaf1fe6d99f3bfee4b47…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Sat May 24 10:33:31 2008 +0200 wined3d: Fix the nvrc implementation of WINED3DTOP_MULTIPLYADD and WINED3DTOP_LERP. --- dlls/wined3d/utils.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index f51a9ab..bcd7b24 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1446,15 +1446,15 @@ void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, WINED3DTEX break; case WINED3DTOP_MULTIPLYADD: - /* Input, arg1*1+arg2*arg3 */ + /* Input, arg3*1+arg1*arg2 */ GL_EXTCALL(glCombinerInputNV(target, portion, GL_VARIABLE_A_NV, - tex_op_args.input[0], tex_op_args.mapping[0], tex_op_args.component_usage[0])); + tex_op_args.input[2], tex_op_args.mapping[2], tex_op_args.component_usage[2])); GL_EXTCALL(glCombinerInputNV(target, portion, GL_VARIABLE_B_NV, GL_ZERO, GL_UNSIGNED_INVERT_NV, portion)); GL_EXTCALL(glCombinerInputNV(target, portion, GL_VARIABLE_C_NV, - tex_op_args.input[1], tex_op_args.mapping[1], tex_op_args.component_usage[1])); + tex_op_args.input[0], tex_op_args.mapping[0], tex_op_args.component_usage[0])); GL_EXTCALL(glCombinerInputNV(target, portion, GL_VARIABLE_D_NV, - tex_op_args.input[2], tex_op_args.mapping[2], tex_op_args.component_usage[2])); + tex_op_args.input[1], tex_op_args.mapping[1], tex_op_args.component_usage[1])); /* Output */ GL_EXTCALL(glCombinerOutputNV(target, portion, GL_DISCARD_NV, GL_DISCARD_NV, @@ -1462,15 +1462,15 @@ void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, WINED3DTEX break; case WINED3DTOP_LERP: - /* Input, arg1*arg2+(1-arg1)*arg3 */ + /* Input, arg3*arg1+(1-arg3)*arg2 */ GL_EXTCALL(glCombinerInputNV(target, portion, GL_VARIABLE_A_NV, - tex_op_args.input[0], tex_op_args.mapping[0], tex_op_args.component_usage[0])); + tex_op_args.input[2], tex_op_args.mapping[2], tex_op_args.component_usage[2])); GL_EXTCALL(glCombinerInputNV(target, portion, GL_VARIABLE_B_NV, - tex_op_args.input[1], tex_op_args.mapping[1], tex_op_args.component_usage[1])); + tex_op_args.input[0], tex_op_args.mapping[0], tex_op_args.component_usage[0])); GL_EXTCALL(glCombinerInputNV(target, portion, GL_VARIABLE_C_NV, - tex_op_args.input[0], invert_mapping(tex_op_args.mapping[0]), tex_op_args.component_usage[0])); + tex_op_args.input[2], invert_mapping(tex_op_args.mapping[2]), tex_op_args.component_usage[2])); GL_EXTCALL(glCombinerInputNV(target, portion, GL_VARIABLE_D_NV, - tex_op_args.input[2], tex_op_args.mapping[2], tex_op_args.component_usage[2])); + tex_op_args.input[1], tex_op_args.mapping[1], tex_op_args.component_usage[1])); /* Output */ GL_EXTCALL(glCombinerOutputNV(target, portion, GL_DISCARD_NV, GL_DISCARD_NV,
1
0
0
0
H. Verbeet : wined3d: Add WINED3DTOP_ADDSIGNED2X to debug_d3dtop().
by Alexandre Julliard
27 May '08
27 May '08
Module: wine Branch: master Commit: e891a9938a2f4c992395c990bf4e994184bd70d5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e891a9938a2f4c992395c990b…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Sat May 24 10:33:25 2008 +0200 wined3d: Add WINED3DTOP_ADDSIGNED2X to debug_d3dtop(). --- dlls/wined3d/utils.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 0038bd0..f51a9ab 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -953,6 +953,7 @@ static const char* debug_d3dtop(WINED3DTEXTUREOP d3dtop) { D3DTOP_TO_STR(WINED3DTOP_MODULATE4X); D3DTOP_TO_STR(WINED3DTOP_ADD); D3DTOP_TO_STR(WINED3DTOP_ADDSIGNED); + D3DTOP_TO_STR(WINED3DTOP_ADDSIGNED2X); D3DTOP_TO_STR(WINED3DTOP_SUBTRACT); D3DTOP_TO_STR(WINED3DTOP_ADDSMOOTH); D3DTOP_TO_STR(WINED3DTOP_BLENDDIFFUSEALPHA);
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
73
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
Results per page:
10
25
50
100
200