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 2019
----- 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
1019 discussions
Start a n
N
ew thread
Nikolay Sivov : kernelbase: Duplicate some of strings functions from shlwapi.
by Alexandre Julliard
15 May '19
15 May '19
Module: wine Branch: master Commit: 56f53743a9b7c6d616b5a7881a1713b674e0ba98 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=56f53743a9b7c6d616b5a788…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 15 14:57:05 2019 +0300 kernelbase: Duplicate some of strings functions from shlwapi. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/Makefile.in | 3 +- dlls/kernelbase/kernelbase.spec | 78 +++--- dlls/kernelbase/string.c | 519 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 560 insertions(+), 40 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=56f53743a9b7c6d616b5…
1
0
0
0
Nikolay Sivov : kernelbase: Add QISearch().
by Alexandre Julliard
15 May '19
15 May '19
Module: wine Branch: master Commit: 46e727ae49efc66088f62753f66fbd52fae49e4c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=46e727ae49efc66088f62753…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 15 14:57:04 2019 +0300 kernelbase: Add QISearch(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/Makefile.in | 1 + dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/main.c | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/dlls/kernelbase/Makefile.in b/dlls/kernelbase/Makefile.in index a7db45e..88ba774 100644 --- a/dlls/kernelbase/Makefile.in +++ b/dlls/kernelbase/Makefile.in @@ -1,4 +1,5 @@ MODULE = kernelbase.dll +IMPORTS = uuid C_SRCS = \ main.c \ diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index e586f50..7108c40 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1191,7 +1191,7 @@ # @ stub PublishStateChangeNotification @ stdcall PulseEvent(long) kernel32.PulseEvent @ stdcall PurgeComm(long long) kernel32.PurgeComm -@ stdcall QISearch(long long long long) shlwapi.QISearch +@ stdcall QISearch(ptr ptr ptr ptr) @ stdcall QueryActCtxSettingsW(long ptr wstr wstr ptr long ptr) kernel32.QueryActCtxSettingsW @ stdcall QueryActCtxW(long ptr ptr long ptr long ptr) kernel32.QueryActCtxW @ stdcall QueryDepthSList(ptr) kernel32.QueryDepthSList diff --git a/dlls/kernelbase/main.c b/dlls/kernelbase/main.c index 5192dfb..3fce236 100644 --- a/dlls/kernelbase/main.c +++ b/dlls/kernelbase/main.c @@ -17,10 +17,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define COBJMACROS + #include "ntstatus.h" #define WIN32_NO_STATUS #include "windows.h" #include "appmodel.h" +#include "shlwapi.h" #include "wine/debug.h" #include "winternl.h" @@ -125,3 +128,40 @@ BOOL WINAPI WaitOnAddress(volatile void *addr, void *cmp, SIZE_T size, DWORD tim return TRUE; } + +HRESULT WINAPI QISearch(void *base, const QITAB *table, REFIID riid, void **obj) +{ + const QITAB *ptr; + IUnknown *unk; + + TRACE("%p, %p, %s, %p\n", base, table, debugstr_guid(riid), obj); + + if (!obj) + return E_POINTER; + + for (ptr = table; ptr->piid; ++ptr) + { + TRACE("trying (offset %d) %s\n", ptr->dwOffset, debugstr_guid(ptr->piid)); + if (IsEqualIID(riid, ptr->piid)) + { + unk = (IUnknown *)((BYTE *)base + ptr->dwOffset); + TRACE("matched, returning (%p)\n", unk); + *obj = unk; + IUnknown_AddRef(unk); + return S_OK; + } + } + + if (IsEqualIID(riid, &IID_IUnknown)) + { + unk = (IUnknown *)((BYTE *)base + table->dwOffset); + TRACE("returning first for IUnknown (%p)\n", unk); + *obj = unk; + IUnknown_AddRef(unk); + return S_OK; + } + + WARN("Not found %s.\n", debugstr_guid(riid)); + *obj = NULL; + return E_NOINTERFACE; +}
1
0
0
0
Nikolay Sivov : kernelbase: Duplicate more path API from shlwapi.
by Alexandre Julliard
15 May '19
15 May '19
Module: wine Branch: master Commit: cb95cbc386d9dd56180961c437c8f884beca4866 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cb95cbc386d9dd56180961c4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 15 14:57:03 2019 +0300 kernelbase: Duplicate more path API from shlwapi. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/kernelbase.spec | 52 ++-- dlls/kernelbase/path.c | 560 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 585 insertions(+), 27 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=cb95cbc386d9dd561809…
1
0
0
0
Piotr Caban : winebus.sys: Correctly set HID device input number in device endpoint path.
by Alexandre Julliard
15 May '19
15 May '19
Module: wine Branch: master Commit: 8cd6d6163983d9ea07fb9e6eb4e263f8a8ffb1f6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8cd6d6163983d9ea07fb9e6e…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed May 15 14:56:05 2019 +0200 winebus.sys: Correctly set HID device input number in device endpoint path. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/bus.h | 2 +- dlls/winebus.sys/bus_iohid.c | 3 ++- dlls/winebus.sys/bus_sdl.c | 3 ++- dlls/winebus.sys/bus_udev.c | 15 +++++++++++---- dlls/winebus.sys/main.c | 38 ++++++++++++++++++++++++++------------ 5 files changed, 42 insertions(+), 19 deletions(-) diff --git a/dlls/winebus.sys/bus.h b/dlls/winebus.sys/bus.h index 16e9bf7..df39fb9 100644 --- a/dlls/winebus.sys/bus.h +++ b/dlls/winebus.sys/bus.h @@ -43,7 +43,7 @@ void *get_platform_private(DEVICE_OBJECT *device) DECLSPEC_HIDDEN; /* HID Plug and Play Bus */ NTSTATUS WINAPI common_pnp_dispatch(DEVICE_OBJECT *device, IRP *irp) DECLSPEC_HIDDEN; DEVICE_OBJECT *bus_create_hid_device(DRIVER_OBJECT *driver, const WCHAR *busidW, WORD vid, WORD pid, - DWORD version, DWORD uid, const WCHAR *serialW, BOOL is_gamepad, + WORD input, DWORD version, DWORD uid, const WCHAR *serialW, BOOL is_gamepad, const GUID *class, const platform_vtbl *vtbl, DWORD platform_data_size) DECLSPEC_HIDDEN; DEVICE_OBJECT *bus_find_hid_device(const platform_vtbl *vtbl, void *platform_dev) DECLSPEC_HIDDEN; void bus_remove_hid_device(DEVICE_OBJECT *device) DECLSPEC_HIDDEN; diff --git a/dlls/winebus.sys/bus_iohid.c b/dlls/winebus.sys/bus_iohid.c index 41a383d..86f32b6 100644 --- a/dlls/winebus.sys/bus_iohid.c +++ b/dlls/winebus.sys/bus_iohid.c @@ -345,7 +345,8 @@ static void handle_DeviceMatchingCallback(void *context, IOReturn result, void * } } - device = bus_create_hid_device(iohid_driver_obj, busidW, vid, pid, version, uid, str?serial_string:NULL, is_gamepad, &GUID_DEVCLASS_IOHID, &iohid_vtbl, sizeof(struct platform_private)); + device = bus_create_hid_device(iohid_driver_obj, busidW, vid, pid, -1, version, uid, str?serial_string:NULL, + is_gamepad, &GUID_DEVCLASS_IOHID, &iohid_vtbl, sizeof(struct platform_private)); if (!device) ERR("Failed to create device\n"); else diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c index cd69f83..01eb36e 100644 --- a/dlls/winebus.sys/bus_sdl.c +++ b/dlls/winebus.sys/bus_sdl.c @@ -941,7 +941,8 @@ static void try_add_device(SDL_JoystickID index) is_xbox_gamepad = (axis_count == 6 && button_count >= 14); } - device = bus_create_hid_device(sdl_driver_obj, sdl_busidW, vid, pid, version, id, serial, is_xbox_gamepad, &GUID_DEVCLASS_SDL, &sdl_vtbl, sizeof(struct platform_private)); + device = bus_create_hid_device(sdl_driver_obj, sdl_busidW, vid, pid, -1, version, id, serial, + is_xbox_gamepad, &GUID_DEVCLASS_SDL, &sdl_vtbl, sizeof(struct platform_private)); if (device) { diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index be953db..bb6c932 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -1064,7 +1064,7 @@ static int check_same_device(DEVICE_OBJECT *device, void* context) } static int parse_uevent_info(const char *uevent, DWORD *vendor_id, - DWORD *product_id, WCHAR **serial_number) + DWORD *product_id, WORD *input, WCHAR **serial_number) { DWORD bus_type; char *tmp; @@ -1110,6 +1110,12 @@ static int parse_uevent_info(const char *uevent, DWORD *vendor_id, found_serial = 1; } } + else if (strcmp(key, "HID_PHYS") == 0) + { + const char *input_no = strstr(value, "input"); + if (input_no) + *input = atoi(input_no+5 ); + } next_line: line = strtok_r(NULL, "\n", &saveptr); @@ -1128,6 +1134,7 @@ static void try_add_device(struct udev_device *dev) const char *devnode; WCHAR *serial = NULL; BOOL is_gamepad = FALSE; + WORD input = -1; int fd; static const CHAR *base_serial = "0000"; @@ -1162,7 +1169,7 @@ static void try_add_device(struct udev_device *dev) } #endif parse_uevent_info(udev_device_get_sysattr_value(hiddev, "uevent"), - &vid, &pid, &serial); + &vid, &pid, &input, &serial); if (serial == NULL) serial = strdupAtoW(base_serial); } @@ -1205,13 +1212,13 @@ static void try_add_device(struct udev_device *dev) if (strcmp(subsystem, "hidraw") == 0) { - device = bus_create_hid_device(udev_driver_obj, hidraw_busidW, vid, pid, version, 0, serial, is_gamepad, + device = bus_create_hid_device(udev_driver_obj, hidraw_busidW, vid, pid, input, version, 0, serial, is_gamepad, &GUID_DEVCLASS_HIDRAW, &hidraw_vtbl, sizeof(struct platform_private)); } #ifdef HAS_PROPER_INPUT_HEADER else if (strcmp(subsystem, "input") == 0) { - device = bus_create_hid_device(udev_driver_obj, lnxev_busidW, vid, pid, version, 0, serial, is_gamepad, + device = bus_create_hid_device(udev_driver_obj, lnxev_busidW, vid, pid, input, version, 0, serial, is_gamepad, &GUID_DEVCLASS_LINUXEVENT, &lnxev_vtbl, sizeof(struct wine_input_private)); } #endif diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c index 094a25d..0abadf4 100644 --- a/dlls/winebus.sys/main.c +++ b/dlls/winebus.sys/main.c @@ -71,7 +71,7 @@ struct device_extension { struct pnp_device *pnp_device; - WORD vid, pid; + WORD vid, pid, input; DWORD uid, version, index; BOOL is_gamepad; WCHAR *serial; @@ -119,15 +119,15 @@ void *get_platform_private(DEVICE_OBJECT *device) return ext->platform_private; } -static DWORD get_vidpid_index(WORD vid, WORD pid) +static DWORD get_device_index(WORD vid, WORD pid, WORD input) { struct pnp_device *ptr; - DWORD index = 1; + DWORD index = 0; LIST_FOR_EACH_ENTRY(ptr, &pnp_devset, struct pnp_device, entry) { struct device_extension *ext = (struct device_extension *)ptr->device->DeviceExtension; - if (ext->vid == vid && ext->pid == pid) + if (ext->vid == vid && ext->pid == pid && ext->input == input) index = max(ext->index + 1, index); } @@ -136,16 +136,28 @@ static DWORD get_vidpid_index(WORD vid, WORD pid) static WCHAR *get_instance_id(DEVICE_OBJECT *device) { - static const WCHAR formatW[] = {'%','s','\\','V','i','d','_','%','0','4','x','&', 'P','i','d','_','%','0','4','x','&', - '%','s','_','%','i','\\','%','i','&','%','s','&','%','x',0}; + static const WCHAR formatW[] = {'%','s','\\','v','i','d','_','%','0','4','x','&','p','i','d','_','%','0','4','x', + '\\','%','i','&','%','s','&','%','x','&','%','i',0}; + static const WCHAR format_inputW[] = {'%','s','\\','v','i','d','_','%','0','4','x','&','p','i','d','_','%','0','4','x','&', + '%','s','_','%','i','\\','%','i','&','%','s','&','%','x','&','%','i',0}; struct device_extension *ext = (struct device_extension *)device->DeviceExtension; const WCHAR *serial = ext->serial ? ext->serial : zero_serialW; DWORD len = strlenW(ext->busid) + strlenW(serial) + 64; WCHAR *dst; if ((dst = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) - sprintfW(dst, formatW, ext->busid, ext->vid, ext->pid, ext->is_gamepad ? igW : miW, - ext->index, ext->version, serial, ext->uid); + { + if (ext->input == (WORD)-1) + { + sprintfW(dst, formatW, ext->busid, ext->vid, ext->pid, + ext->version, serial, ext->uid, ext->index); + } + else + { + sprintfW(dst, format_inputW, ext->busid, ext->vid, ext->pid, ext->is_gamepad ? igW : miW, + ext->input, ext->version, serial, ext->uid, ext->index); + } + } return dst; } @@ -197,7 +209,7 @@ static WCHAR *get_compatible_ids(DEVICE_OBJECT *device) } DEVICE_OBJECT *bus_create_hid_device(DRIVER_OBJECT *driver, const WCHAR *busidW, WORD vid, WORD pid, - DWORD version, DWORD uid, const WCHAR *serialW, BOOL is_gamepad, + WORD input, DWORD version, DWORD uid, const WCHAR *serialW, BOOL is_gamepad, const GUID *class, const platform_vtbl *vtbl, DWORD platform_data_size) { static const WCHAR device_name_fmtW[] = {'\\','D','e','v','i','c','e','\\','%','s','#','%','p',0}; @@ -212,8 +224,9 @@ DEVICE_OBJECT *bus_create_hid_device(DRIVER_OBJECT *driver, const WCHAR *busidW, NTSTATUS status; DWORD length; - TRACE("(%p, %s, %04x, %04x, %u, %u, %s, %u, %s, %p, %u)\n", driver, debugstr_w(busidW), vid, pid, - version, uid, debugstr_w(serialW), is_gamepad, debugstr_guid(class), vtbl, platform_data_size); + TRACE("(%p, %s, %04x, %04x, %04x, %u, %u, %s, %u, %s, %p, %u)\n", driver, + debugstr_w(busidW), vid, pid, input, version, uid, debugstr_w(serialW), + is_gamepad, debugstr_guid(class), vtbl, platform_data_size); if (!(pnp_dev = HeapAlloc(GetProcessHeap(), 0, sizeof(*pnp_dev)))) return NULL; @@ -236,9 +249,10 @@ DEVICE_OBJECT *bus_create_hid_device(DRIVER_OBJECT *driver, const WCHAR *busidW, ext->pnp_device = pnp_dev; ext->vid = vid; ext->pid = pid; + ext->input = input; ext->uid = uid; ext->version = version; - ext->index = get_vidpid_index(vid, pid); + ext->index = get_device_index(vid, pid, input); ext->is_gamepad = is_gamepad; ext->serial = strdupW(serialW); ext->busid = busidW;
1
0
0
0
Piotr Caban : winebus.sys: Fix typo in endpoint name.
by Alexandre Julliard
15 May '19
15 May '19
Module: wine Branch: master Commit: 6a0005747ce696304f3a70453365eb854aeab729 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6a0005747ce696304f3a7045…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed May 15 14:55:58 2019 +0200 winebus.sys: Fix typo in endpoint name. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c index f9675b3..094a25d 100644 --- a/dlls/winebus.sys/main.c +++ b/dlls/winebus.sys/main.c @@ -101,7 +101,7 @@ static CRITICAL_SECTION device_list_cs = { &critsect_debug, -1, 0, 0, 0, 0 }; static struct list pnp_devset = LIST_INIT(pnp_devset); static const WCHAR zero_serialW[]= {'0','0','0','0',0}; -static const WCHAR imW[] = {'I','M',0}; +static const WCHAR miW[] = {'M','I',0}; static const WCHAR igW[] = {'I','G',0}; static inline WCHAR *strdupW(const WCHAR *src) @@ -144,7 +144,7 @@ static WCHAR *get_instance_id(DEVICE_OBJECT *device) WCHAR *dst; if ((dst = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) - sprintfW(dst, formatW, ext->busid, ext->vid, ext->pid, ext->is_gamepad ? igW : imW, + sprintfW(dst, formatW, ext->busid, ext->vid, ext->pid, ext->is_gamepad ? igW : miW, ext->index, ext->version, serial, ext->uid); return dst;
1
0
0
0
Huw Davies : kernel32: Forward GetSystemTimeAsFileTime() to NtQuerySystemTime().
by Alexandre Julliard
15 May '19
15 May '19
Module: wine Branch: master Commit: 71dc2514c3461448b411950e8722fb4e10c54a41 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=71dc2514c3461448b411950e…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed May 15 11:45:52 2019 +0100 kernel32: Forward GetSystemTimeAsFileTime() to NtQuerySystemTime(). This relies on FILETIME and LARGE_INTEGER having the same layout. On an i7-8700 CPU @ 3.20GHz with HZ=1000 it cuts the call cost from ~18ns to ~12ns. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/kernel32.spec | 2 +- dlls/kernel32/tests/time.c | 15 +++++++++++++++ dlls/kernel32/time.c | 21 --------------------- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 8346575..f887b1d 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -832,7 +832,7 @@ @ stdcall GetSystemRegistryQuota(ptr ptr) @ stdcall GetSystemTime(ptr) @ stdcall GetSystemTimeAdjustment(ptr ptr ptr) -@ stdcall GetSystemTimeAsFileTime(ptr) +@ stdcall GetSystemTimeAsFileTime(ptr) ntdll.NtQuerySystemTime @ stdcall GetSystemTimePreciseAsFileTime(ptr) @ stdcall GetSystemTimes(ptr ptr ptr) @ stdcall GetSystemWindowsDirectoryA(ptr long) diff --git a/dlls/kernel32/tests/time.c b/dlls/kernel32/tests/time.c index 8bbad2b..536f233 100644 --- a/dlls/kernel32/tests/time.c +++ b/dlls/kernel32/tests/time.c @@ -773,6 +773,20 @@ static ULONGLONG get_longlong_time(FILETIME *time) return uli.QuadPart; } +static void test_GetSystemTimeAsFileTime(void) +{ + LARGE_INTEGER t1, t2, t3; + FILETIME ft; + + NtQuerySystemTime( &t1 ); + GetSystemTimeAsFileTime( &ft ); + NtQuerySystemTime( &t3 ); + t2.QuadPart = get_longlong_time( &ft ); + + ok(t1.QuadPart <= t2.QuadPart, "out of order %s %s\n", wine_dbgstr_longlong(t1.QuadPart), wine_dbgstr_longlong(t2.QuadPart)); + ok(t2.QuadPart <= t3.QuadPart, "out of order %s %s\n", wine_dbgstr_longlong(t2.QuadPart), wine_dbgstr_longlong(t3.QuadPart)); +} + static void test_GetSystemTimePreciseAsFileTime(void) { FILETIME ft; @@ -1012,6 +1026,7 @@ START_TEST(time) test_FileTimeToDosDateTime(); test_GetCalendarInfo(); test_GetDynamicTimeZoneInformation(); + test_GetSystemTimeAsFileTime(); test_GetSystemTimePreciseAsFileTime(); test_GetTimeZoneInformationForYear(); } diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c index 8805c81..3affb72 100644 --- a/dlls/kernel32/time.c +++ b/dlls/kernel32/time.c @@ -751,27 +751,6 @@ BOOL WINAPI TzSpecificLocalTimeToSystemTime( /*********************************************************************** - * GetSystemTimeAsFileTime (KERNEL32.@) - * - * Get the current time in utc format. - * - * PARAMS - * time [out] Destination for the current utc time - * - * RETURNS - * Nothing. - */ -void WINAPI GetSystemTimeAsFileTime( FILETIME *time ) -{ - LARGE_INTEGER t; - - NtQuerySystemTime( &t ); - time->dwLowDateTime = t.u.LowPart; - time->dwHighDateTime = t.u.HighPart; -} - - -/*********************************************************************** * GetSystemTimePreciseAsFileTime (KERNEL32.@) * * Get the current time in utc format with greater accuracy.
1
0
0
0
Huw Davies : kernel32: Simplify is_not_current().
by Alexandre Julliard
15 May '19
15 May '19
Module: wine Branch: master Commit: a94a21026d39f3aac0d16856002efaed3607fc4e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a94a21026d39f3aac0d16856…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed May 15 11:45:51 2019 +0100 kernel32: Simplify is_not_current(). Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/profile.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c index 027693e..8310ad6 100644 --- a/dlls/kernel32/profile.c +++ b/dlls/kernel32/profile.c @@ -713,15 +713,15 @@ static void PROFILE_ReleaseFile(void) * two seconds, so files that are not at least two seconds old might * keep their time even on modification, so don't cache them. */ -static BOOL is_not_current(FILETIME * ft) +static BOOL is_not_current(FILETIME *ft) { - FILETIME Now; - LONGLONG ftll, nowll; - GetSystemTimeAsFileTime(&Now); + LARGE_INTEGER now; + LONGLONG ftll; + + NtQuerySystemTime( &now ); ftll = ((LONGLONG)ft->dwHighDateTime << 32) + ft->dwLowDateTime; - nowll = ((LONGLONG)Now.dwHighDateTime << 32) + Now.dwLowDateTime; - TRACE("%08x;%08x\n",(unsigned)ftll+21000000,(unsigned)nowll); - return ftll + 21000000 < nowll; + TRACE("%s; %s\n", wine_dbgstr_longlong(ftll), wine_dbgstr_longlong(now.QuadPart)); + return ftll + 21000000 < now.QuadPart; } /***********************************************************************
1
0
0
0
Huw Davies : kernel32: Simplify TIME_CompTimeZoneID() by passing time as LONGLONG.
by Alexandre Julliard
15 May '19
15 May '19
Module: wine Branch: master Commit: 3593f7da663e451a9a77d23268e8f81eb4e539cd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3593f7da663e451a9a77d232…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed May 15 11:45:50 2019 +0100 kernel32: Simplify TIME_CompTimeZoneID() by passing time as LONGLONG. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/time.c | 52 ++++++++++++++++++++++++---------------------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c index e7f5f0e..8805c81 100644 --- a/dlls/kernel32/time.c +++ b/dlls/kernel32/time.c @@ -146,7 +146,7 @@ static int TIME_DayLightCompareDate( const SYSTEMTIME *date, * * PARAMS * pTZinfo [in] The time zone data. - * lpFileTime [in] The system or local time. + * time [in] The system or local time. * islocal [in] it is local time. * * RETURNS @@ -156,14 +156,13 @@ static int TIME_DayLightCompareDate( const SYSTEMTIME *date, * TIME_ZONE_ID_DAYLIGHT Current time is daylight savings time */ static DWORD TIME_CompTimeZoneID ( const TIME_ZONE_INFORMATION *pTZinfo, - FILETIME *lpFileTime, BOOL islocal ) + LONGLONG time, BOOL islocal ) { int ret, year; BOOL beforeStandardDate, afterDaylightDate; DWORD retval = TIME_ZONE_ID_INVALID; - LONGLONG llTime = 0; /* initialized to prevent gcc complaining */ SYSTEMTIME SysTime; - FILETIME ftTemp; + FILETIME ft; if (pTZinfo->DaylightDate.wMonth != 0) { @@ -181,20 +180,17 @@ static DWORD TIME_CompTimeZoneID ( const TIME_ZONE_INFORMATION *pTZinfo, return TIME_ZONE_ID_INVALID; } - if (!islocal) { - llTime = filetime_to_longlong( lpFileTime ); - llTime -= pTZinfo->Bias * (LONGLONG)600000000; - longlong_to_filetime( llTime, &ftTemp ); - lpFileTime = &ftTemp; - } + if (!islocal) + time -= pTZinfo->Bias * (LONGLONG)600000000; - FileTimeToSystemTime(lpFileTime, &SysTime); + longlong_to_filetime( time, &ft ); + FileTimeToSystemTime( &ft, &SysTime ); year = SysTime.wYear; if (!islocal) { - llTime -= pTZinfo->DaylightBias * (LONGLONG)600000000; - longlong_to_filetime( llTime, &ftTemp ); - FileTimeToSystemTime(lpFileTime, &SysTime); + time -= pTZinfo->DaylightBias * (LONGLONG)600000000; + longlong_to_filetime( time, &ft ); + FileTimeToSystemTime( &ft, &SysTime ); } /* check for daylight savings */ @@ -208,14 +204,13 @@ static DWORD TIME_CompTimeZoneID ( const TIME_ZONE_INFORMATION *pTZinfo, beforeStandardDate = SysTime.wYear < year; if (!islocal) { - llTime -= ( pTZinfo->StandardBias - pTZinfo->DaylightBias ) - * (LONGLONG)600000000; - longlong_to_filetime( llTime, &ftTemp ); - FileTimeToSystemTime(lpFileTime, &SysTime); + time -= ( pTZinfo->StandardBias - pTZinfo->DaylightBias ) * (LONGLONG)600000000; + longlong_to_filetime( time, &ft ); + FileTimeToSystemTime( &ft, &SysTime ); } if(year == SysTime.wYear) { - ret = TIME_DayLightCompareDate( &SysTime, &pTZinfo->DaylightDate); + ret = TIME_DayLightCompareDate( &SysTime, &pTZinfo->DaylightDate ); if (ret == -2) return TIME_ZONE_ID_INVALID; @@ -224,7 +219,7 @@ static DWORD TIME_CompTimeZoneID ( const TIME_ZONE_INFORMATION *pTZinfo, afterDaylightDate = SysTime.wYear > year; retval = TIME_ZONE_ID_STANDARD; - if( pTZinfo->DaylightDate.wMonth < pTZinfo->StandardDate.wMonth ) { + if( pTZinfo->DaylightDate.wMonth < pTZinfo->StandardDate.wMonth ) { /* Northern hemisphere */ if( beforeStandardDate && afterDaylightDate ) retval = TIME_ZONE_ID_DAYLIGHT; @@ -254,9 +249,10 @@ static DWORD TIME_CompTimeZoneID ( const TIME_ZONE_INFORMATION *pTZinfo, */ static DWORD TIME_ZoneID( const TIME_ZONE_INFORMATION *pTzi ) { - FILETIME ftTime; - GetSystemTimeAsFileTime( &ftTime); - return TIME_CompTimeZoneID( pTzi, &ftTime, FALSE); + LARGE_INTEGER now; + + NtQuerySystemTime( &now ); + return TIME_CompTimeZoneID( pTzi, now.QuadPart, FALSE ); } /*********************************************************************** @@ -266,7 +262,7 @@ static DWORD TIME_ZoneID( const TIME_ZONE_INFORMATION *pTzi ) * * PARAMS * pTZinfo [in] The time zone data. - * lpFileTime [in] The system or local time. + * time [in] The system or local time. * islocal [in] It is local time. * pBias [out] The calculated bias in minutes. * @@ -274,10 +270,10 @@ static DWORD TIME_ZoneID( const TIME_ZONE_INFORMATION *pTzi ) * TRUE when the time zone bias was calculated. */ static BOOL TIME_GetTimezoneBias( const TIME_ZONE_INFORMATION *pTZinfo, - FILETIME *lpFileTime, BOOL islocal, LONG *pBias ) + LONGLONG time, BOOL islocal, LONG *pBias ) { LONG bias = pTZinfo->Bias; - DWORD tzid = TIME_CompTimeZoneID( pTZinfo, lpFileTime, islocal); + DWORD tzid = TIME_CompTimeZoneID( pTZinfo, time, islocal ); if( tzid == TIME_ZONE_ID_INVALID) return FALSE; @@ -700,7 +696,7 @@ BOOL WINAPI SystemTimeToTzSpecificLocalTime( if (!SystemTimeToFileTime(lpUniversalTime, &ft)) return FALSE; llTime = filetime_to_longlong( &ft ); - if (!TIME_GetTimezoneBias(&tzinfo, &ft, FALSE, &lBias)) + if (!TIME_GetTimezoneBias(&tzinfo, llTime, FALSE, &lBias)) return FALSE; /* convert minutes to 100-nanoseconds-ticks */ llTime -= (LONGLONG)lBias * 600000000; @@ -745,7 +741,7 @@ BOOL WINAPI TzSpecificLocalTimeToSystemTime( if (!SystemTimeToFileTime(lpLocalTime, &ft)) return FALSE; t = filetime_to_longlong( &ft ); - if (!TIME_GetTimezoneBias(&tzinfo, &ft, TRUE, &lBias)) + if (!TIME_GetTimezoneBias(&tzinfo, t, TRUE, &lBias)) return FALSE; /* convert minutes to 100-nanoseconds-ticks */ t += (LONGLONG)lBias * 600000000;
1
0
0
0
Huw Davies : kernel32: Replace macros with inline helpers.
by Alexandre Julliard
15 May '19
15 May '19
Module: wine Branch: master Commit: 9fbfcbe1bfb863fb13e770c630e1f57a109b690c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9fbfcbe1bfb863fb13e770c6…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed May 15 11:45:49 2019 +0100 kernel32: Replace macros with inline helpers. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/time.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c index 4174289..e7f5f0e 100644 --- a/dlls/kernel32/time.c +++ b/dlls/kernel32/time.c @@ -53,11 +53,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(time); #define CALINFO_MAX_YEAR 2029 -#define LL2FILETIME( ll, pft )\ - (pft)->dwLowDateTime = (UINT)(ll); \ - (pft)->dwHighDateTime = (UINT)((ll) >> 32); -#define FILETIME2LL( pft, ll) \ - ll = (((LONGLONG)((pft)->dwHighDateTime))<<32) + (pft)-> dwLowDateTime ; +static inline void longlong_to_filetime( LONGLONG t, FILETIME *ft ) +{ + ft->dwLowDateTime = (DWORD)t; + ft->dwHighDateTime = (DWORD)(t >> 32); +} + +static inline LONGLONG filetime_to_longlong( const FILETIME *ft ) +{ + return (((LONGLONG)ft->dwHighDateTime) << 32) + ft->dwLowDateTime; +} static const WCHAR mui_stdW[] = { 'M','U','I','_','S','t','d',0 }; static const WCHAR mui_dltW[] = { 'M','U','I','_','D','l','t',0 }; @@ -177,9 +182,9 @@ static DWORD TIME_CompTimeZoneID ( const TIME_ZONE_INFORMATION *pTZinfo, } if (!islocal) { - FILETIME2LL( lpFileTime, llTime ); + llTime = filetime_to_longlong( lpFileTime ); llTime -= pTZinfo->Bias * (LONGLONG)600000000; - LL2FILETIME( llTime, &ftTemp) + longlong_to_filetime( llTime, &ftTemp ); lpFileTime = &ftTemp; } @@ -188,7 +193,7 @@ static DWORD TIME_CompTimeZoneID ( const TIME_ZONE_INFORMATION *pTZinfo, if (!islocal) { llTime -= pTZinfo->DaylightBias * (LONGLONG)600000000; - LL2FILETIME( llTime, &ftTemp) + longlong_to_filetime( llTime, &ftTemp ); FileTimeToSystemTime(lpFileTime, &SysTime); } @@ -205,7 +210,7 @@ static DWORD TIME_CompTimeZoneID ( const TIME_ZONE_INFORMATION *pTZinfo, if (!islocal) { llTime -= ( pTZinfo->StandardBias - pTZinfo->DaylightBias ) * (LONGLONG)600000000; - LL2FILETIME( llTime, &ftTemp) + longlong_to_filetime( llTime, &ftTemp ); FileTimeToSystemTime(lpFileTime, &SysTime); } @@ -694,12 +699,12 @@ BOOL WINAPI SystemTimeToTzSpecificLocalTime( if (!SystemTimeToFileTime(lpUniversalTime, &ft)) return FALSE; - FILETIME2LL( &ft, llTime) + llTime = filetime_to_longlong( &ft ); if (!TIME_GetTimezoneBias(&tzinfo, &ft, FALSE, &lBias)) return FALSE; /* convert minutes to 100-nanoseconds-ticks */ llTime -= (LONGLONG)lBias * 600000000; - LL2FILETIME( llTime, &ft) + longlong_to_filetime( llTime, &ft ); return FileTimeToSystemTime(&ft, lpLocalTime); } @@ -739,12 +744,12 @@ BOOL WINAPI TzSpecificLocalTimeToSystemTime( if (!SystemTimeToFileTime(lpLocalTime, &ft)) return FALSE; - FILETIME2LL( &ft, t) + t = filetime_to_longlong( &ft ); if (!TIME_GetTimezoneBias(&tzinfo, &ft, TRUE, &lBias)) return FALSE; /* convert minutes to 100-nanoseconds-ticks */ t += (LONGLONG)lBias * 600000000; - LL2FILETIME( t, &ft) + longlong_to_filetime( t, &ft ); return FileTimeToSystemTime(&ft, lpUniversalTime); } @@ -884,8 +889,8 @@ BOOL WINAPI GetProcessTimes( HANDLE hprocess, LPFILETIME lpCreationTime, TIME_ClockTimeToFileTime(tms.tms_stime,lpKernelTime); if (NtQueryInformationProcess( hprocess, ProcessTimes, &pti, sizeof(pti), NULL)) return FALSE; - LL2FILETIME( pti.CreateTime.QuadPart, lpCreationTime); - LL2FILETIME( pti.ExitTime.QuadPart, lpExitTime); + longlong_to_filetime( pti.CreateTime.QuadPart, lpCreationTime ); + longlong_to_filetime( pti.ExitTime.QuadPart, lpExitTime ); return TRUE; }
1
0
0
0
Zebediah Figura : strmbase: Get rid of the "filterVtbl" parameter to TransformFilter_Construct().
by Alexandre Julliard
15 May '19
15 May '19
Module: wine Branch: master Commit: 0f9e4cd6600713628c92e3ceb40bd8aa38084f30 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0f9e4cd6600713628c92e3ce…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue May 14 19:42:00 2019 -0500 strmbase: Get rid of the "filterVtbl" parameter to TransformFilter_Construct(). Reordering some functions to avoid forward declarations. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/acmwrapper.c | 24 +---- dlls/quartz/avidec.c | 24 +---- dlls/strmbase/transform.c | 213 ++++++++++++++++++++++----------------- dlls/winegstreamer/gsttffilter.c | 23 +---- dlls/wineqtdecoder/qtvdecoder.c | 24 +---- include/wine/strmbase.h | 8 +- 6 files changed, 127 insertions(+), 189 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=0f9e4cd6600713628c92…
1
0
0
0
← Newer
1
...
51
52
53
54
55
56
57
...
102
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
Results per page:
10
25
50
100
200