winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
January 2009
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1348 discussions
Start a n
N
ew thread
Paul Vriens : wintrust/tests: Add a few tests.
by Alexandre Julliard
08 Jan '09
08 Jan '09
Module: wine Branch: master Commit: 5bfed84410ef6c359fb107f3a87c75ddf46abd89 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5bfed84410ef6c359fb107f3a…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Wed Jan 7 22:25:28 2009 +0100 wintrust/tests: Add a few tests. --- dlls/wintrust/tests/crypt.c | 62 +++++++++++++++++++++++++++++++++++++----- 1 files changed, 54 insertions(+), 8 deletions(-) diff --git a/dlls/wintrust/tests/crypt.c b/dlls/wintrust/tests/crypt.c index f9a57af..b1b7bc5 100644 --- a/dlls/wintrust/tests/crypt.c +++ b/dlls/wintrust/tests/crypt.c @@ -29,6 +29,8 @@ static char selfname[MAX_PATH]; static CHAR CURR_DIR[MAX_PATH]; +static CHAR catroot[MAX_PATH]; +static CHAR catroot2[MAX_PATH]; /* * Minimalistic catalog file. To reconstruct, save text below as winetest.cdf, @@ -123,7 +125,7 @@ static void test_context(void) BOOL ret; HCATADMIN hca; static GUID unknown = { 0xC689AABA, 0x8E78, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }}; /* WINTRUST.DLL */ - CHAR windir[MAX_PATH], catroot[MAX_PATH], catroot2[MAX_PATH], dummydir[MAX_PATH]; + CHAR dummydir[MAX_PATH]; DWORD attrs; /* When CryptCATAdminAcquireContext is successful it will create @@ -208,12 +210,6 @@ static void test_context(void) ok(ret, "Expected success\n"); ok(hca != NULL, "Expected a context handle, got NULL\n"); - GetWindowsDirectoryA(windir, MAX_PATH); - lstrcpyA(catroot, windir); - lstrcatA(catroot, "\\system32\\CatRoot"); - lstrcpyA(catroot2, windir); - lstrcatA(catroot2, "\\system32\\CatRoot2"); - attrs = GetFileAttributes(catroot); ok(attrs != INVALID_FILE_ATTRIBUTES, "Expected the CatRoot directory to exist\n"); @@ -354,14 +350,18 @@ static void test_calchash(void) static void test_CryptCATAdminAddRemoveCatalog(void) { static WCHAR basenameW[] = {'w','i','n','e','t','e','s','t','.','c','a','t',0}; + static CHAR basename[] = "winetest.cat"; HCATADMIN hcatadmin; HCATINFO hcatinfo; CATALOG_INFO info; WCHAR tmpfileW[MAX_PATH]; char tmpfile[MAX_PATH]; + char catfile[MAX_PATH], catfilepath[MAX_PATH], *p; + WCHAR catfileW[MAX_PATH]; HANDLE file; DWORD error, written; BOOL ret; + DWORD attrs; if (!pCryptCATAdminRemoveCatalog) { @@ -419,22 +419,61 @@ static void test_CryptCATAdminAddRemoveCatalog(void) WriteFile(file, test_catalog, sizeof(test_catalog), &written, NULL); CloseHandle(file); + /* Unique name will be created */ hcatinfo = pCryptCATAdminAddCatalog(hcatadmin, tmpfileW, NULL, 0); todo_wine ok(hcatinfo != NULL, "CryptCATAdminAddCatalog failed %u\n", GetLastError()); + info.cbStruct = sizeof(info); + info.wszCatalogFile[0] = 0; + ret = pCryptCATCatalogInfoFromContext(hcatinfo, &info, 0); + todo_wine + { + ok(ret, "CryptCATCatalogInfoFromContext failed %u\n", GetLastError()); + ok(info.wszCatalogFile[0] != 0, "Expected a filename\n"); + } + WideCharToMultiByte(CP_ACP, 0, info.wszCatalogFile, -1, catfile, MAX_PATH, 0, 0); + if ((p = strrchr(catfile, '\\'))) p++; + MultiByteToWideChar(0, 0, p, -1, catfileW, MAX_PATH); + + /* winetest.cat will be created */ hcatinfo = pCryptCATAdminAddCatalog(hcatadmin, tmpfileW, basenameW, 0); ok(hcatinfo != NULL, "CryptCATAdminAddCatalog failed %u\n", GetLastError()); + lstrcpyA(catfilepath, catroot); + lstrcatA(catfilepath, "\\{DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF}\\winetest.cat"); + attrs = GetFileAttributes(catfilepath); + ok(attrs != INVALID_FILE_ATTRIBUTES, "Expected %s to exist\n", catfilepath); + info.cbStruct = sizeof(info); info.wszCatalogFile[0] = 0; ret = pCryptCATCatalogInfoFromContext(hcatinfo, &info, 0); ok(ret, "CryptCATCatalogInfoFromContext failed %u\n", GetLastError()); + ok(info.wszCatalogFile[0] != 0, "Expected a filename\n"); + WideCharToMultiByte(CP_ACP, 0, info.wszCatalogFile, -1, catfile, MAX_PATH, 0, 0); + if ((p = strrchr(catfile, '\\'))) p++; + ok(!lstrcmpA(basename, p), "Expected %s, got %s\n", basename, p); ret = pCryptCATAdminReleaseCatalogContext(hcatadmin, hcatinfo, 0); ok(ret, "CryptCATAdminReleaseCatalogContext failed %u\n", GetLastError()); - ret = pCryptCATAdminRemoveCatalog(hcatadmin, tmpfileW, 0); + /* Remove the catalog file with the unique name */ + ret = pCryptCATAdminRemoveCatalog(hcatadmin, catfileW, 0); + todo_wine + ok(ret, "CryptCATAdminRemoveCatalog failed %u\n", GetLastError()); + + /* Remove the winetest.cat catalog file, first with the full path. This should not succeed + * according to MSDN */ + ret = pCryptCATAdminRemoveCatalog(hcatadmin, info.wszCatalogFile, 0); + ok(ret, "CryptCATAdminRemoveCatalog failed %u\n", GetLastError()); + /* The call succeeds but the file is not removed */ + attrs = GetFileAttributes(catfilepath); + todo_wine + ok(attrs != INVALID_FILE_ATTRIBUTES, "Expected %s to exist\n", catfilepath); + ret = pCryptCATAdminRemoveCatalog(hcatadmin, basenameW, 0); + todo_wine ok(ret, "CryptCATAdminRemoveCatalog failed %u\n", GetLastError()); + attrs = GetFileAttributes(catfilepath); + ok(attrs == INVALID_FILE_ATTRIBUTES, "Expected %s to be removed\n", catfilepath); ret = pCryptCATAdminReleaseContext(hcatadmin, 0); ok(ret, "CryptCATAdminReleaseContext failed %u\n", GetLastError()); @@ -506,6 +545,7 @@ START_TEST(crypt) { int myARGC; char** myARGV; + char windir[MAX_PATH]; InitFunctionPtrs(); @@ -515,6 +555,12 @@ START_TEST(crypt) return; } + GetWindowsDirectoryA(windir, MAX_PATH); + lstrcpyA(catroot, windir); + lstrcatA(catroot, "\\system32\\CatRoot"); + lstrcpyA(catroot2, windir); + lstrcatA(catroot2, "\\system32\\CatRoot2"); + myARGC = winetest_get_mainargs(&myARGV); strcpy(selfname, myARGV[0]);
1
0
0
0
Andrew Fenn : xinput1_3: Added stub code for XInputGetBatteryInformation.
by Alexandre Julliard
08 Jan '09
08 Jan '09
Module: wine Branch: master Commit: 907add75a9156c66536e877aafb3c9a63c77cc3e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=907add75a9156c66536e877aa…
Author: Andrew Fenn <andrewfenn(a)gmail.com> Date: Thu Jan 8 01:47:44 2009 +0700 xinput1_3: Added stub code for XInputGetBatteryInformation. --- dlls/xinput1_3/xinput1_3.spec | 2 +- dlls/xinput1_3/xinput1_3_main.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/dlls/xinput1_3/xinput1_3.spec b/dlls/xinput1_3/xinput1_3.spec index c8e0f53..be1f411 100644 --- a/dlls/xinput1_3/xinput1_3.spec +++ b/dlls/xinput1_3/xinput1_3.spec @@ -4,4 +4,4 @@ @ stdcall XInputGetKeystroke(long long ptr) @ stdcall XInputGetCapabilities(long long ptr) @ stdcall XInputGetDSoundAudioDeviceGuids(long ptr ptr) -@ stub XInputGetBatteryInformation +@ stdcall XInputGetBatteryInformation(long ptr ptr) diff --git a/dlls/xinput1_3/xinput1_3_main.c b/dlls/xinput1_3/xinput1_3_main.c index 1e69bc1..f4386b8 100644 --- a/dlls/xinput1_3/xinput1_3_main.c +++ b/dlls/xinput1_3/xinput1_3_main.c @@ -114,3 +114,15 @@ DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD dwUserIndex, GUID* pDSoundRen } return ERROR_BAD_ARGUMENTS; } + +DWORD WINAPI XInputGetBatteryInformation(DWORD dwUserIndex, BYTE deviceType, XINPUT_BATTERY_INFORMATION* pBatteryInfo) +{ + FIXME("(%d %u %p) Stub!\n", dwUserIndex, deviceType, pBatteryInfo); + + if (dwUserIndex < XUSER_MAX_COUNT) + { + return ERROR_DEVICE_NOT_CONNECTED; + /* If controller exists then return ERROR_SUCCESS */ + } + return ERROR_BAD_ARGUMENTS; +}
1
0
0
0
Michael Karcher : widl: Write struct fields as signed fields.
by Alexandre Julliard
08 Jan '09
08 Jan '09
Module: wine Branch: master Commit: 656de48e4ea5f15b5ecc58923e3a0e2f0c3fae90 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=656de48e4ea5f15b5ecc58923…
Author: Michael Karcher <wine(a)mkarcher.dialup.fu-berlin.de> Date: Thu Jan 8 00:21:42 2009 +0100 widl: Write struct fields as signed fields. --- tools/widl/typegen.c | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index d3d5cb3..7d2b751 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -1271,6 +1271,21 @@ static void write_user_tfs(FILE *file, type_t *type, unsigned int *tfsoff) *tfsoff += 2; } +static unsigned char inline make_signed(unsigned char fc) +{ + switch(fc) + { + case RPC_FC_USMALL: + return RPC_FC_SMALL; + case RPC_FC_USHORT: + return RPC_FC_SHORT; + case RPC_FC_ULONG: + return RPC_FC_LONG; + default: + return fc; + } +} + static void write_member_type(FILE *file, const type_t *cont, const attr_list_t *attrs, const type_t *type, unsigned int *corroff, unsigned int *tfsoff) @@ -1306,7 +1321,7 @@ static void write_member_type(FILE *file, const type_t *cont, print_file(file, 2, "0x%x,\t/* %s */\n", fc, string_of_type(fc)); *tfsoff += 1; } - else if (!write_base_type(file, type->type, tfsoff)) + else if (!write_base_type(file, make_signed(type->type), tfsoff)) error("Unsupported member type 0x%x\n", type->type); }
1
0
0
0
Michael Karcher : widl: Make write_base_type take a format char instead of a type desc ptr.
by Alexandre Julliard
08 Jan '09
08 Jan '09
Module: wine Branch: master Commit: 5f7886925db80cfe93aea89b4b3d604ab62e1cc8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5f7886925db80cfe93aea89b4…
Author: Michael Karcher <wine(a)mkarcher.dialup.fu-berlin.de> Date: Thu Jan 8 00:21:18 2009 +0100 widl: Make write_base_type take a format char instead of a type desc ptr. --- tools/widl/typegen.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index dfcb31e..d3d5cb3 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -776,11 +776,11 @@ void write_procformatstring(FILE *file, const statement_list_t *stmts, type_pred print_file(file, indent, "\n"); } -static int write_base_type(FILE *file, const type_t *type, unsigned int *typestring_offset) +static int write_base_type(FILE *file, unsigned char fc, unsigned int *typestring_offset) { - if (is_base_type(type->type)) + if (is_base_type(fc)) { - print_file(file, 2, "0x%02x,\t/* %s */\n", type->type, string_of_type(type->type)); + print_file(file, 2, "0x%02x,\t/* %s */\n", fc, string_of_type(fc)); *typestring_offset += 1; return 1; } @@ -1306,7 +1306,7 @@ static void write_member_type(FILE *file, const type_t *cont, print_file(file, 2, "0x%x,\t/* %s */\n", fc, string_of_type(fc)); *tfsoff += 1; } - else if (!write_base_type(file, type, tfsoff)) + else if (!write_base_type(file, type->type, tfsoff)) error("Unsupported member type 0x%x\n", type->type); }
1
0
0
0
Andrew Fenn : xinput1_3: Added test for XInputGetBatteryInformation.
by Alexandre Julliard
08 Jan '09
08 Jan '09
Module: wine Branch: master Commit: 37a7ca59b32062d5538edb3cf685fee840a3c5e9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=37a7ca59b32062d5538edb3cf…
Author: Andrew Fenn <andrewfenn(a)gmail.com> Date: Thu Jan 8 01:48:25 2009 +0700 xinput1_3: Added test for XInputGetBatteryInformation. --- dlls/xinput1_3/tests/xinput.c | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/dlls/xinput1_3/tests/xinput.c b/dlls/xinput1_3/tests/xinput.c index f597ed0..29f075f 100644 --- a/dlls/xinput1_3/tests/xinput.c +++ b/dlls/xinput1_3/tests/xinput.c @@ -29,6 +29,7 @@ static DWORD (WINAPI *pXInputSetState)(DWORD, XINPUT_VIBRATION*); static void (WINAPI *pXInputEnable)(BOOL); static DWORD (WINAPI *pXInputGetKeystroke)(DWORD, DWORD, PXINPUT_KEYSTROKE); static DWORD (WINAPI *pXInputGetDSoundAudioDeviceGuids)(DWORD, GUID*, GUID*); +static DWORD (WINAPI *pXInputGetBatteryInformation)(DWORD, BYTE, XINPUT_BATTERY_INFORMATION*); static void test_set_state(void) { @@ -168,6 +169,30 @@ static void test_get_dsoundaudiodevice(void) ok(result == ERROR_BAD_ARGUMENTS, "XInputGetDSoundAudioDeviceGuids returned (%d)\n", result); } +static void test_get_batteryinformation(void) +{ + DWORD controllerNum; + DWORD result; + XINPUT_BATTERY_INFORMATION batteryInfo; + + for(controllerNum=0; controllerNum < XUSER_MAX_COUNT; controllerNum++) + { + ZeroMemory(&batteryInfo, sizeof(XINPUT_BATTERY_INFORMATION)); + + result = pXInputGetBatteryInformation(controllerNum, BATTERY_DEVTYPE_GAMEPAD, &batteryInfo); + ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputGetBatteryInformation failed with (%d)\n", result); + + if (ERROR_DEVICE_NOT_CONNECTED == result) + { + ok(batteryInfo.BatteryLevel == BATTERY_TYPE_DISCONNECTED, "Failed to report device as being disconnected."); + skip("Controller %d is not connected\n", controllerNum); + } + } + + result = pXInputGetBatteryInformation(XUSER_MAX_COUNT+1, BATTERY_DEVTYPE_GAMEPAD, &batteryInfo); + ok(result == ERROR_BAD_ARGUMENTS, "XInputGetBatteryInformation returned (%d)\n", result); +} + START_TEST(xinput) { HMODULE hXinput; @@ -185,12 +210,14 @@ START_TEST(xinput) pXInputGetKeystroke = (void*)GetProcAddress(hXinput, "XInputGetKeystroke"); pXInputGetCapabilities = (void*)GetProcAddress(hXinput, "XInputGetCapabilities"); pXInputGetDSoundAudioDeviceGuids = (void*)GetProcAddress(hXinput, "XInputGetDSoundAudioDeviceGuids"); + pXInputGetBatteryInformation = (void*)GetProcAddress(hXinput, "XInputGetBatteryInformation"); test_set_state(); test_get_state(); test_get_keystroke(); test_get_capabilities(); test_get_dsoundaudiodevice(); + test_get_batteryinformation(); FreeLibrary(hXinput); }
1
0
0
0
Andrew Fenn : xinput1_3: Added test for XInputGetDSoundAudioDeviceGuids.
by Alexandre Julliard
08 Jan '09
08 Jan '09
Module: wine Branch: master Commit: ab0d420dd2bee614945484e79e5bb8154352ba77 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ab0d420dd2bee614945484e79…
Author: Andrew Fenn <andrewfenn(a)gmail.com> Date: Thu Jan 8 01:46:30 2009 +0700 xinput1_3: Added test for XInputGetDSoundAudioDeviceGuids. --- dlls/xinput1_3/tests/xinput.c | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/dlls/xinput1_3/tests/xinput.c b/dlls/xinput1_3/tests/xinput.c index c137b0c..f597ed0 100644 --- a/dlls/xinput1_3/tests/xinput.c +++ b/dlls/xinput1_3/tests/xinput.c @@ -28,6 +28,7 @@ static DWORD (WINAPI *pXInputGetCapabilities)(DWORD,DWORD,XINPUT_CAPABILITIES*); static DWORD (WINAPI *pXInputSetState)(DWORD, XINPUT_VIBRATION*); static void (WINAPI *pXInputEnable)(BOOL); static DWORD (WINAPI *pXInputGetKeystroke)(DWORD, DWORD, PXINPUT_KEYSTROKE); +static DWORD (WINAPI *pXInputGetDSoundAudioDeviceGuids)(DWORD, GUID*, GUID*); static void test_set_state(void) { @@ -145,6 +146,28 @@ static void test_get_capabilities(void) ok(result == ERROR_BAD_ARGUMENTS, "XInputGetCapabilities returned (%d)\n", result); } +static void test_get_dsoundaudiodevice(void) +{ + DWORD controllerNum; + DWORD result; + GUID soundRender; + GUID soundCapture; + + for(controllerNum=0; controllerNum < XUSER_MAX_COUNT; controllerNum++) + { + result = pXInputGetDSoundAudioDeviceGuids(controllerNum, &soundRender, &soundCapture); + ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputGetDSoundAudioDeviceGuids failed with (%d)\n", result); + + if (ERROR_DEVICE_NOT_CONNECTED == result) + { + skip("Controller %d is not connected\n", controllerNum); + } + } + + result = pXInputGetDSoundAudioDeviceGuids(XUSER_MAX_COUNT+1, &soundRender, &soundCapture); + ok(result == ERROR_BAD_ARGUMENTS, "XInputGetDSoundAudioDeviceGuids returned (%d)\n", result); +} + START_TEST(xinput) { HMODULE hXinput; @@ -161,9 +184,13 @@ START_TEST(xinput) pXInputGetState = (void*)GetProcAddress(hXinput, "XInputGetState"); pXInputGetKeystroke = (void*)GetProcAddress(hXinput, "XInputGetKeystroke"); pXInputGetCapabilities = (void*)GetProcAddress(hXinput, "XInputGetCapabilities"); + pXInputGetDSoundAudioDeviceGuids = (void*)GetProcAddress(hXinput, "XInputGetDSoundAudioDeviceGuids"); + test_set_state(); test_get_state(); test_get_keystroke(); test_get_capabilities(); + test_get_dsoundaudiodevice(); + FreeLibrary(hXinput); }
1
0
0
0
Andrew Fenn : xinput1_3: Added stub for XInputGetDSoundAudioDeviceGuids.
by Alexandre Julliard
08 Jan '09
08 Jan '09
Module: wine Branch: master Commit: f58aae7b690b5e72c5cdbc468e2c9a3b30380d2f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f58aae7b690b5e72c5cdbc468…
Author: Andrew Fenn <andrewfenn(a)gmail.com> Date: Thu Jan 8 01:45:57 2009 +0700 xinput1_3: Added stub for XInputGetDSoundAudioDeviceGuids. --- dlls/xinput1_3/xinput1_3.spec | 2 +- dlls/xinput1_3/xinput1_3_main.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/dlls/xinput1_3/xinput1_3.spec b/dlls/xinput1_3/xinput1_3.spec index f2d961c..c8e0f53 100644 --- a/dlls/xinput1_3/xinput1_3.spec +++ b/dlls/xinput1_3/xinput1_3.spec @@ -3,5 +3,5 @@ @ stdcall XInputGetState(long ptr) @ stdcall XInputGetKeystroke(long long ptr) @ stdcall XInputGetCapabilities(long long ptr) -@ stub XInputGetDSoundAudioDeviceGuids #(long ptr ptr) +@ stdcall XInputGetDSoundAudioDeviceGuids(long ptr ptr) @ stub XInputGetBatteryInformation diff --git a/dlls/xinput1_3/xinput1_3_main.c b/dlls/xinput1_3/xinput1_3_main.c index 636dcd1..1e69bc1 100644 --- a/dlls/xinput1_3/xinput1_3_main.c +++ b/dlls/xinput1_3/xinput1_3_main.c @@ -102,3 +102,15 @@ DWORD WINAPI XInputGetCapabilities(DWORD dwUserIndex, DWORD dwFlags, XINPUT_CAPA } return ERROR_BAD_ARGUMENTS; } + +DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD dwUserIndex, GUID* pDSoundRenderGuid, GUID* pDSoundCaptureGuid) +{ + FIXME("(%d %s %s) Stub!\n", dwUserIndex, debugstr_guid(pDSoundRenderGuid), debugstr_guid(pDSoundCaptureGuid)); + + if (dwUserIndex < XUSER_MAX_COUNT) + { + return ERROR_DEVICE_NOT_CONNECTED; + /* If controller exists then return ERROR_SUCCESS */ + } + return ERROR_BAD_ARGUMENTS; +}
1
0
0
0
Dylan Smith : richedit: Fixed implementation of WM_GETDLGCODE message.
by Alexandre Julliard
08 Jan '09
08 Jan '09
Module: wine Branch: master Commit: 573102ee8856ee142269316b44b4a939d83e5050 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=573102ee8856ee142269316b4…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Thu Jan 8 00:44:11 2009 -0500 richedit: Fixed implementation of WM_GETDLGCODE message. This fixes inconsistencies shown in the tests I added for the WM_GETDLGCODE. The tests covered different cases handled by the current implementation in order to show that the native implementation is simpler for all these cases. --- dlls/riched20/editor.c | 18 +++--------------- dlls/riched20/tests/editor.c | 26 +++++++++++++------------- 2 files changed, 16 insertions(+), 28 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 107dcea..5bfc0aa 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2956,21 +2956,9 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, return ME_StreamOut(editor, wParam, (EDITSTREAM *)lParam); case WM_GETDLGCODE: { - UINT code = DLGC_WANTCHARS|DLGC_WANTARROWS; - if(lParam && (((LPMSG)lParam)->message == WM_KEYDOWN)) - { - int vk = (int)((LPMSG)lParam)->wParam; - /* if style says we want return key */ - if((vk == VK_RETURN) && (GetWindowLongW(editor->hWnd, GWL_STYLE) & ES_WANTRETURN)) - { - code |= DLGC_WANTMESSAGE; - } - /* we always handle ctrl-tab */ - if((vk == VK_TAB) && (GetKeyState(VK_CONTROL) & 0x8000)) - { - code |= DLGC_WANTMESSAGE; - } - } + UINT code = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; + if (GetWindowLongW(editor->hWnd, GWL_STYLE) & ES_MULTILINE) + code |= DLGC_WANTMESSAGE; return code; } case EM_EMPTYUNDOBUFFER: diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index d9c5d78..11930ad 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -6025,7 +6025,7 @@ static void test_WM_GETDLGCODE(void) msg.hwnd = hwnd; res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, 0); expected = expected | DLGC_WANTMESSAGE; - todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", res, expected); DestroyWindow(hwnd); @@ -6043,7 +6043,7 @@ static void test_WM_GETDLGCODE(void) msg.hwnd = hwnd; res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); expected = expected | DLGC_WANTMESSAGE; - todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", res, expected); DestroyWindow(hwnd); @@ -6054,7 +6054,7 @@ static void test_WM_GETDLGCODE(void) msg.hwnd = hwnd; res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; - todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", res, expected); DestroyWindow(hwnd); @@ -6065,7 +6065,7 @@ static void test_WM_GETDLGCODE(void) msg.hwnd = hwnd; res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; - todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", res, expected); DestroyWindow(hwnd); @@ -6076,7 +6076,7 @@ static void test_WM_GETDLGCODE(void) msg.hwnd = hwnd; res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; - todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", res, expected); DestroyWindow(hwnd); @@ -6090,7 +6090,7 @@ static void test_WM_GETDLGCODE(void) msg.hwnd = hwnd; res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; - todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", res, expected); DestroyWindow(hwnd); @@ -6101,7 +6101,7 @@ static void test_WM_GETDLGCODE(void) msg.hwnd = hwnd; res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; - todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", res, expected); DestroyWindow(hwnd); @@ -6114,7 +6114,7 @@ static void test_WM_GETDLGCODE(void) msg.hwnd = hwnd; res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; - todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", res, expected); DestroyWindow(hwnd); @@ -6125,7 +6125,7 @@ static void test_WM_GETDLGCODE(void) msg.hwnd = hwnd; res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; - todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", res, expected); DestroyWindow(hwnd); @@ -6141,7 +6141,7 @@ static void test_WM_GETDLGCODE(void) msg.hwnd = hwnd; res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; - todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", res, expected); DestroyWindow(hwnd); @@ -6152,7 +6152,7 @@ static void test_WM_GETDLGCODE(void) msg.hwnd = hwnd; res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; - todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", res, expected); DestroyWindow(hwnd); @@ -6165,7 +6165,7 @@ static void test_WM_GETDLGCODE(void) msg.hwnd = hwnd; res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; - todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", res, expected); DestroyWindow(hwnd); @@ -6176,7 +6176,7 @@ static void test_WM_GETDLGCODE(void) msg.hwnd = hwnd; res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; - todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", res, expected); DestroyWindow(hwnd); }
1
0
0
0
Dylan Smith : richedit: Added tests for WM_GETDLGCODE message.
by Alexandre Julliard
08 Jan '09
08 Jan '09
Module: wine Branch: master Commit: c636b59bcf9af2c4ad8070940f16a31ad2054260 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c636b59bcf9af2c4ad8070940…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Thu Jan 8 00:44:05 2009 -0500 richedit: Added tests for WM_GETDLGCODE message. --- dlls/riched20/tests/editor.c | 172 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 172 insertions(+), 0 deletions(-) diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 9e2f5e4..d9c5d78 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -6010,6 +6010,177 @@ static void test_format_rect(void) DestroyWindow(hwnd); } +static void test_WM_GETDLGCODE(void) +{ + HWND hwnd; + UINT res, expected; + MSG msg; + + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_MULTILINE|ES_WANTRETURN|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, 0); + expected = expected | DLGC_WANTMESSAGE; + todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + msg.message = WM_KEYDOWN; + msg.wParam = VK_RETURN; + msg.lParam = MapVirtualKey(VK_RETURN, MAPVK_VK_TO_VSC) | 0x0001; + msg.pt.x = 0; + msg.pt.y = 0; + msg.time = GetTickCount(); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_MULTILINE|ES_WANTRETURN|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = expected | DLGC_WANTMESSAGE; + todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_MULTILINE|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; + todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_WANTRETURN|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; + todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; + todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + msg.wParam = VK_TAB; + msg.lParam = MapVirtualKey(VK_TAB, MAPVK_VK_TO_VSC) | 0x0001; + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_MULTILINE|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; + todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; + todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hold_key(VK_CONTROL); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_MULTILINE|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; + todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; + todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + release_key(VK_CONTROL); + + msg.wParam = 'a'; + msg.lParam = MapVirtualKey('a', MAPVK_VK_TO_VSC) | 0x0001; + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_MULTILINE|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; + todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; + todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + msg.message = WM_CHAR; + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + ES_MULTILINE|WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; + todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); + + hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, + WS_POPUP, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); + msg.hwnd = hwnd; + res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; + todo_wine ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); +} + START_TEST( editor ) { /* Must explicitly LoadLibrary(). The test has no references to functions in @@ -6063,6 +6234,7 @@ START_TEST( editor ) test_word_wrap(); test_auto_yscroll(); test_format_rect(); + test_WM_GETDLGCODE(); /* Set the environment variable WINETEST_RICHED20 to keep windows * responsive and open for 30 seconds. This is useful for debugging.
1
0
0
0
Henri Verbeet : wined3d: Enable GL_HALF_FLOAT_NV when NV_HALF_FLOAT is supported.
by Alexandre Julliard
08 Jan '09
08 Jan '09
Module: wine Branch: master Commit: 45a61d1ac4b88082d1d38201eba73047ca2ffb8e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=45a61d1ac4b88082d1d38201e…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Jan 8 10:19:17 2009 +0100 wined3d: Enable GL_HALF_FLOAT_NV when NV_HALF_FLOAT is supported. This makes more sense than the other way around. --- dlls/wined3d/utils.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 0acd3b4..cc09584 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -499,8 +499,8 @@ static WINED3DGLTYPE const glTypeLookupTemplate[WINED3DDECLTYPE_UNUSED] = {WINED3DDECLTYPE_USHORT4N, 4, GL_UNSIGNED_SHORT, 4, GL_TRUE, sizeof(short int)}, {WINED3DDECLTYPE_UDEC3, 3, GL_UNSIGNED_SHORT, 3, GL_FALSE, sizeof(short int)}, {WINED3DDECLTYPE_DEC3N, 3, GL_SHORT, 3, GL_TRUE, sizeof(short int)}, - {WINED3DDECLTYPE_FLOAT16_2, 2, GL_HALF_FLOAT_NV, 2, GL_FALSE, sizeof(GLhalfNV)}, - {WINED3DDECLTYPE_FLOAT16_4, 4, GL_HALF_FLOAT_NV, 4, GL_FALSE, sizeof(GLhalfNV)} + {WINED3DDECLTYPE_FLOAT16_2, 2, GL_FLOAT, 2, GL_FALSE, sizeof(GLhalfNV)}, + {WINED3DDECLTYPE_FLOAT16_4, 4, GL_FLOAT, 4, GL_FALSE, sizeof(GLhalfNV)} }; void init_type_lookup(WineD3D_GL_Info *gl_info) { @@ -511,12 +511,13 @@ void init_type_lookup(WineD3D_GL_Info *gl_info) { gl_info->glTypeLookup[WINED3DDECLTYPE_D3DCOLOR].format = GL_BGRA; } - if(!GL_SUPPORT(NV_HALF_FLOAT)) { + if (GL_SUPPORT(NV_HALF_FLOAT)) + { /* Do not change the size of the type, it is CPU side. We have to change the GPU-side information though. * It is the job of the vertex buffer code to make sure that the vbos have the right format */ - gl_info->glTypeLookup[WINED3DDECLTYPE_FLOAT16_2].glType = GL_FLOAT; - gl_info->glTypeLookup[WINED3DDECLTYPE_FLOAT16_4].glType = GL_FLOAT; + gl_info->glTypeLookup[WINED3DDECLTYPE_FLOAT16_2].glType = GL_HALF_FLOAT_NV; + gl_info->glTypeLookup[WINED3DDECLTYPE_FLOAT16_4].glType = GL_HALF_FLOAT_NV; } }
1
0
0
0
← Newer
1
...
96
97
98
99
100
101
102
...
135
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
Results per page:
10
25
50
100
200