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
Gabriel Ivăncescu : user32/listbox: Don' t try to paint non-visible items for multi-column listboxes.
by Alexandre Julliard
30 May '19
30 May '19
Module: wine Branch: master Commit: f748d6794d69677d45d34cda185114c588472009 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f748d6794d69677d45d34cda…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Thu May 30 13:42:19 2019 +0300 user32/listbox: Don't try to paint non-visible items for multi-column listboxes. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/listbox.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index 95621b8..52f01a7 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -1191,6 +1191,7 @@ static LRESULT LISTBOX_Paint( LB_DESCR *descr, HDC hdc ) rect.right += descr->column_width; rect.top = 0; col_pos = descr->page_size - 1; + if (rect.left >= descr->width) break; } else {
1
0
0
0
Gabriel Ivăncescu : comctl32/listbox: Don' t try to paint non-visible items for multi-column listboxes.
by Alexandre Julliard
30 May '19
30 May '19
Module: wine Branch: master Commit: ae425cdfbaf57339ab7ecffcc0be671748a96494 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ae425cdfbaf57339ab7ecffc…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Thu May 30 13:42:18 2019 +0300 comctl32/listbox: Don't try to paint non-visible items for multi-column listboxes. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/listbox.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c index e71b34d..8fd556c 100644 --- a/dlls/comctl32/listbox.c +++ b/dlls/comctl32/listbox.c @@ -1148,6 +1148,7 @@ static LRESULT LISTBOX_Paint( LB_DESCR *descr, HDC hdc ) rect.right += descr->column_width; rect.top = 0; col_pos = descr->page_size - 1; + if (rect.left >= descr->width) break; } else {
1
0
0
0
Zebediah Figura : winebus.sys: Avoid IoCreateDriver().
by Alexandre Julliard
30 May '19
30 May '19
Module: wine Branch: master Commit: 9af088243c9648aa6685fa757e61a985c8740e39 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9af088243c9648aa6685fa75…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed May 29 23:02:30 2019 -0500 winebus.sys: Avoid IoCreateDriver(). This is not a documented function, and anyway we don't need separate driver objects. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/bus.h | 6 +++--- dlls/winebus.sys/bus_iohid.c | 6 ++---- dlls/winebus.sys/bus_sdl.c | 5 ++--- dlls/winebus.sys/bus_udev.c | 6 ++---- dlls/winebus.sys/main.c | 12 +++--------- 5 files changed, 12 insertions(+), 23 deletions(-) diff --git a/dlls/winebus.sys/bus.h b/dlls/winebus.sys/bus.h index 4de723f..de8ddf7 100644 --- a/dlls/winebus.sys/bus.h +++ b/dlls/winebus.sys/bus.h @@ -19,9 +19,9 @@ typedef int(*enum_func)(DEVICE_OBJECT *device, void *context); /* Buses */ -NTSTATUS WINAPI udev_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry_path) DECLSPEC_HIDDEN; -NTSTATUS WINAPI iohid_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry_path) DECLSPEC_HIDDEN; -NTSTATUS WINAPI sdl_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry_path) DECLSPEC_HIDDEN; +NTSTATUS udev_driver_init(void) DECLSPEC_HIDDEN; +NTSTATUS iohid_driver_init(void) DECLSPEC_HIDDEN; +NTSTATUS sdl_driver_init(void) DECLSPEC_HIDDEN; void udev_driver_unload( void ) DECLSPEC_HIDDEN; void iohid_driver_unload( void ) DECLSPEC_HIDDEN; void sdl_driver_unload( void ) DECLSPEC_HIDDEN; diff --git a/dlls/winebus.sys/bus_iohid.c b/dlls/winebus.sys/bus_iohid.c index dcc0dcf..7933374 100644 --- a/dlls/winebus.sys/bus_iohid.c +++ b/dlls/winebus.sys/bus_iohid.c @@ -399,10 +399,8 @@ static DWORD CALLBACK runloop_thread(void *args) } -NTSTATUS WINAPI iohid_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry_path) +NTSTATUS iohid_driver_init(void) { - TRACE("(%p, %s)\n", driver, debugstr_w(registry_path->Buffer)); - hid_manager = IOHIDManagerCreate(kCFAllocatorDefault, 0L); if (!(run_loop_handle = CreateThread(NULL, 0, runloop_thread, NULL, 0, NULL))) { @@ -429,7 +427,7 @@ void iohid_driver_unload( void ) #else -NTSTATUS WINAPI iohid_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry_path) +NTSTATUS iohid_driver_init(void) { WARN("IOHID Support not compiled into Wine.\n"); return STATUS_NOT_IMPLEMENTED; diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c index 284ff48..1a938aa 100644 --- a/dlls/winebus.sys/bus_sdl.c +++ b/dlls/winebus.sys/bus_sdl.c @@ -1067,7 +1067,7 @@ void sdl_driver_unload( void ) TRACE("Unload Driver\n"); } -NTSTATUS WINAPI sdl_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry_path) +NTSTATUS sdl_driver_init(void) { static const WCHAR controller_modeW[] = {'M','a','p',' ','C','o','n','t','r','o','l','l','e','r','s',0}; static const UNICODE_STRING controller_mode = {sizeof(controller_modeW) - sizeof(WCHAR), sizeof(controller_modeW), (WCHAR*)controller_modeW}; @@ -1075,7 +1075,6 @@ NTSTATUS WINAPI sdl_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry_ HANDLE events[2]; DWORD result; - TRACE("(%p, %s)\n", driver, debugstr_w(registry_path->Buffer)); if (sdl_handle == NULL) { sdl_handle = wine_dlopen(SONAME_LIBSDL2, RTLD_NOW, NULL, 0); @@ -1151,7 +1150,7 @@ sym_not_found: #else -NTSTATUS WINAPI sdl_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry_path) +NTSTATUS sdl_driver_init(void) { WARN("compiled without SDL support\n"); return STATUS_NOT_IMPLEMENTED; diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index 716a437..a3255df 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -1451,7 +1451,7 @@ void udev_driver_unload( void ) TRACE("Unload Driver\n"); } -NTSTATUS WINAPI udev_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry_path) +NTSTATUS udev_driver_init(void) { HANDLE events[2]; DWORD result; @@ -1460,8 +1460,6 @@ NTSTATUS WINAPI udev_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry static const WCHAR input_disabledW[] = {'D','i','s','a','b','l','e','I','n','p','u','t',0}; static const UNICODE_STRING input_disabled = {sizeof(input_disabledW) - sizeof(WCHAR), sizeof(input_disabledW), (WCHAR*)input_disabledW}; - TRACE("(%p, %s)\n", driver, debugstr_w(registry_path->Buffer)); - if (!(udev_context = udev_new())) { ERR("Can't create udev object\n"); @@ -1504,7 +1502,7 @@ error: #else -NTSTATUS WINAPI udev_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry_path) +NTSTATUS udev_driver_init(void) { WARN("Wine was compiled without UDEV support\n"); return STATUS_NOT_IMPLEMENTED; diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c index f7cdc4d..73e3154 100644 --- a/dlls/winebus.sys/main.c +++ b/dlls/winebus.sys/main.c @@ -778,12 +778,6 @@ static void WINAPI driver_unload(DRIVER_OBJECT *driver) NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path ) { - static const WCHAR udevW[] = {'\\','D','r','i','v','e','r','\\','U','D','E','V',0}; - static UNICODE_STRING udev = {sizeof(udevW) - sizeof(WCHAR), sizeof(udevW), (WCHAR *)udevW}; - static const WCHAR iohidW[] = {'\\','D','r','i','v','e','r','\\','I','O','H','I','D',0}; - static UNICODE_STRING iohid = {sizeof(iohidW) - sizeof(WCHAR), sizeof(iohidW), (WCHAR *)iohidW}; - static const WCHAR sdlW[] = {'\\','D','r','i','v','e','r','\\','S','D','L','J','O','Y',0}; - static UNICODE_STRING sdl = {sizeof(sdlW) - sizeof(WCHAR), sizeof(sdlW), (WCHAR *)sdlW}; static const WCHAR SDL_enabledW[] = {'E','n','a','b','l','e',' ','S','D','L',0}; static const UNICODE_STRING SDL_enabled = {sizeof(SDL_enabledW) - sizeof(WCHAR), sizeof(SDL_enabledW), (WCHAR*)SDL_enabledW}; OBJECT_ATTRIBUTES attr = {0}; @@ -805,11 +799,11 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path ) if (check_bus_option(&SDL_enabled, 1)) { - if (IoCreateDriver(&sdl, sdl_driver_init) == STATUS_SUCCESS) + if (sdl_driver_init() == STATUS_SUCCESS) return STATUS_SUCCESS; } - IoCreateDriver(&udev, udev_driver_init); - IoCreateDriver(&iohid, iohid_driver_init); + udev_driver_init(); + iohid_driver_init(); return STATUS_SUCCESS; }
1
0
0
0
Zebediah Figura : winebus.sys: Move udev configuration values to the winebus service key.
by Alexandre Julliard
30 May '19
30 May '19
Module: wine Branch: master Commit: d525c736b9fd7d805fcae6cd0f18557dfa0058b5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d525c736b9fd7d805fcae6cd…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed May 29 23:02:29 2019 -0500 winebus.sys: Move udev configuration values to the winebus service key. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/bus.h | 4 +++- dlls/winebus.sys/bus_sdl.c | 30 ++++++++---------------------- dlls/winebus.sys/bus_udev.c | 4 ++-- dlls/winebus.sys/main.c | 40 ++++++++++++++++++++-------------------- 4 files changed, 33 insertions(+), 45 deletions(-) diff --git a/dlls/winebus.sys/bus.h b/dlls/winebus.sys/bus.h index c74221b..4de723f 100644 --- a/dlls/winebus.sys/bus.h +++ b/dlls/winebus.sys/bus.h @@ -50,5 +50,7 @@ void process_hid_report(DEVICE_OBJECT *device, BYTE *report, DWORD length) DECLS DEVICE_OBJECT* bus_enumerate_hid_devices(const platform_vtbl *vtbl, enum_func function, void* context) DECLSPEC_HIDDEN; /* General Bus Functions */ -DWORD check_bus_option(UNICODE_STRING *registry_path, const UNICODE_STRING *option, DWORD default_value) DECLSPEC_HIDDEN; +DWORD check_bus_option(const UNICODE_STRING *option, DWORD default_value) DECLSPEC_HIDDEN; BOOL is_xbox_gamepad(WORD vid, WORD pid) DECLSPEC_HIDDEN; + +HANDLE driver_key DECLSPEC_HIDDEN; diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c index c53402d..284ff48 100644 --- a/dlls/winebus.sys/bus_sdl.c +++ b/dlls/winebus.sys/bus_sdl.c @@ -993,14 +993,9 @@ static void process_device_event(SDL_Event *event) set_mapped_report_from_event(event); } -typedef struct _thread_args { - HANDLE event; - UNICODE_STRING *registry_path; -} thread_arguments; - static DWORD CALLBACK deviceloop_thread(void *args) { - thread_arguments *thread_args = args; + HANDLE init_done = args; SDL_Event event; if (pSDL_Init(SDL_INIT_GAMECONTROLLER|SDL_INIT_HAPTIC) < 0) @@ -1015,16 +1010,10 @@ static DWORD CALLBACK deviceloop_thread(void *args) /* Process mappings */ if (pSDL_GameControllerAddMapping != NULL) { - HANDLE key; - OBJECT_ATTRIBUTES attr; - WCHAR buffer[MAX_PATH]; - UNICODE_STRING regpath = {0, sizeof(buffer), buffer}; - static const WCHAR szPath[] = {'\\','m','a','p',0}; - - RtlCopyUnicodeString(®path, thread_args->registry_path); - RtlAppendUnicodeToString(®path, szPath); - InitializeObjectAttributes(&attr, ®path, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, NULL, NULL); - if (NtOpenKey(&key, KEY_ALL_ACCESS, &attr) == STATUS_SUCCESS) + HKEY key; + static const WCHAR szPath[] = {'m','a','p',0}; + + if (!RegOpenKeyExW(driver_key, szPath, 0, KEY_ENUMERATE_SUB_KEYS, &key)) { DWORD index = 0; CHAR *buffer = NULL; @@ -1063,7 +1052,7 @@ static DWORD CALLBACK deviceloop_thread(void *args) } } - SetEvent(thread_args->event); + SetEvent(init_done); while (1) while (pSDL_WaitEvent(&event) != 0) @@ -1085,7 +1074,6 @@ NTSTATUS WINAPI sdl_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry_ HANDLE events[2]; DWORD result; - thread_arguments args; TRACE("(%p, %s)\n", driver, debugstr_w(registry_path->Buffer)); if (sdl_handle == NULL) @@ -1136,13 +1124,11 @@ NTSTATUS WINAPI sdl_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry_ pSDL_JoystickGetVendor = wine_dlsym(sdl_handle, "SDL_JoystickGetVendor", NULL, 0); } - map_controllers = check_bus_option(registry_path, &controller_mode, 1); + map_controllers = check_bus_option(&controller_mode, 1); if (!(events[0] = CreateEventW(NULL, TRUE, FALSE, NULL))) return STATUS_UNSUCCESSFUL; - args.event = events[0]; - args.registry_path = registry_path; - if (!(events[1] = CreateThread(NULL, 0, deviceloop_thread, &args, 0, NULL))) + if (!(events[1] = CreateThread(NULL, 0, deviceloop_thread, events[0], 0, NULL))) { CloseHandle(events[0]); return STATUS_UNSUCCESSFUL; diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index 1f45f8c..716a437 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -1468,12 +1468,12 @@ NTSTATUS WINAPI udev_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry return STATUS_UNSUCCESSFUL; } - disable_hidraw = check_bus_option(registry_path, &hidraw_disabled, 0); + disable_hidraw = check_bus_option(&hidraw_disabled, 0); if (disable_hidraw) TRACE("UDEV hidraw devices disabled in registry\n"); #ifdef HAS_PROPER_INPUT_HEADER - disable_input = check_bus_option(registry_path, &input_disabled, 0); + disable_input = check_bus_option(&input_disabled, 0); if (disable_input) TRACE("UDEV input devices disabled in registry\n"); #endif diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c index bf13d2f..f7cdc4d 100644 --- a/dlls/winebus.sys/main.c +++ b/dlls/winebus.sys/main.c @@ -63,6 +63,8 @@ static const WORD PID_XBOX_CONTROLLERS[] = { static DRIVER_OBJECT *driver_obj; +HANDLE driver_key; + struct pnp_device { struct list entry; @@ -738,30 +740,19 @@ void process_hid_report(DEVICE_OBJECT *device, BYTE *report, DWORD length) LeaveCriticalSection(&ext->report_cs); } -DWORD check_bus_option(UNICODE_STRING *registry_path, const UNICODE_STRING *option, DWORD default_value) +DWORD check_bus_option(const UNICODE_STRING *option, DWORD default_value) { - OBJECT_ATTRIBUTES attr; - HANDLE key; - DWORD output = default_value; + char buffer[FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[sizeof(DWORD)])]; + KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION*)buffer; + DWORD size; - InitializeObjectAttributes(&attr, registry_path, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, NULL, NULL); - if (NtOpenKey(&key, KEY_ALL_ACCESS, &attr) == STATUS_SUCCESS) + if (NtQueryValueKey(driver_key, option, KeyValuePartialInformation, info, sizeof(buffer), &size) == STATUS_SUCCESS) { - DWORD size; - char buffer[FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[sizeof(DWORD)])]; - - KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION*)buffer; - - if (NtQueryValueKey(key, option, KeyValuePartialInformation, info, sizeof(buffer), &size) == STATUS_SUCCESS) - { - if (info->Type == REG_DWORD) - output = *(DWORD*)info->Data; - } - - NtClose(key); + if (info->Type == REG_DWORD) + return *(DWORD*)info->Data; } - return output; + return default_value; } BOOL is_xbox_gamepad(WORD vid, WORD pid) @@ -782,6 +773,7 @@ static void WINAPI driver_unload(DRIVER_OBJECT *driver) udev_driver_unload(); iohid_driver_unload(); sdl_driver_unload(); + NtClose(driver_key); } NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path ) @@ -794,16 +786,24 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path ) static UNICODE_STRING sdl = {sizeof(sdlW) - sizeof(WCHAR), sizeof(sdlW), (WCHAR *)sdlW}; static const WCHAR SDL_enabledW[] = {'E','n','a','b','l','e',' ','S','D','L',0}; static const UNICODE_STRING SDL_enabled = {sizeof(SDL_enabledW) - sizeof(WCHAR), sizeof(SDL_enabledW), (WCHAR*)SDL_enabledW}; + OBJECT_ATTRIBUTES attr = {0}; + NTSTATUS ret; TRACE( "(%p, %s)\n", driver, debugstr_w(path->Buffer) ); + attr.Length = sizeof(attr); + attr.ObjectName = path; + attr.Attributes = OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE; + if ((ret = NtOpenKey(&driver_key, KEY_ALL_ACCESS, &attr)) != STATUS_SUCCESS) + ERR("Failed to open driver key, status %#x.\n", ret); + driver_obj = driver; driver->MajorFunction[IRP_MJ_PNP] = common_pnp_dispatch; driver->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = hid_internal_dispatch; driver->DriverUnload = driver_unload; - if (check_bus_option(path, &SDL_enabled, 1)) + if (check_bus_option(&SDL_enabled, 1)) { if (IoCreateDriver(&sdl, sdl_driver_init) == STATUS_SUCCESS) return STATUS_SUCCESS;
1
0
0
0
Zebediah Figura : winebus.sys: Use the winebus driver to create all devices.
by Alexandre Julliard
30 May '19
30 May '19
Module: wine Branch: master Commit: 50b9456e878f57d8c850282d77e74534c57a181e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=50b9456e878f57d8c850282d…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed May 29 23:02:28 2019 -0500 winebus.sys: Use the winebus driver to create all devices. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/bus.h | 4 +--- dlls/winebus.sys/bus_iohid.c | 24 ++++++++---------------- dlls/winebus.sys/bus_sdl.c | 16 +++------------- dlls/winebus.sys/bus_udev.c | 10 ++-------- dlls/winebus.sys/main.c | 20 +++++++++++++------- 5 files changed, 27 insertions(+), 47 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=50b9456e878f57d8c850…
1
0
0
0
Zebediah Figura : quartz/filesource: Use BaseFilterImpl_QueryInterface().
by Alexandre Julliard
30 May '19
30 May '19
Module: wine Branch: master Commit: ca8b7cf3bf26481572c972c260f99e027ec167ae URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ca8b7cf3bf26481572c972c2…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed May 29 20:52:57 2019 -0500 quartz/filesource: Use BaseFilterImpl_QueryInterface(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filesource.c | 51 +++++++++++++++--------------------------------- 1 file changed, 16 insertions(+), 35 deletions(-) diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index bb0f162..11fdbdc 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -425,10 +425,25 @@ static void async_reader_destroy(BaseFilter *iface) CoTaskMemFree(filter); } +static HRESULT async_reader_query_interface(BaseFilter *iface, REFIID iid, void **out) +{ + AsyncReader *filter = impl_from_BaseFilter(iface); + + if (IsEqualGUID(iid, &IID_IFileSourceFilter)) + { + *out = &filter->IFileSourceFilter_iface; + IUnknown_AddRef((IUnknown *)*out); + return S_OK; + } + + return E_NOINTERFACE; +} + static const BaseFilterFuncTable BaseFuncTable = { .filter_get_pin = async_reader_get_pin, .filter_destroy = async_reader_destroy, + .filter_query_interface = async_reader_query_interface, }; HRESULT AsyncReader_create(IUnknown * pUnkOuter, LPVOID * ppv) @@ -458,40 +473,6 @@ HRESULT AsyncReader_create(IUnknown * pUnkOuter, LPVOID * ppv) return S_OK; } -/** IUnknown methods **/ - -static HRESULT WINAPI AsyncReader_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv) -{ - AsyncReader *This = impl_from_IBaseFilter(iface); - - TRACE("%p->(%s, %p)\n", This, qzdebugstr_guid(riid), ppv); - - *ppv = NULL; - - if (IsEqualIID(riid, &IID_IUnknown)) - *ppv = &This->filter.IBaseFilter_iface; - else if (IsEqualIID(riid, &IID_IPersist)) - *ppv = &This->filter.IBaseFilter_iface; - else if (IsEqualIID(riid, &IID_IMediaFilter)) - *ppv = &This->filter.IBaseFilter_iface; - else if (IsEqualIID(riid, &IID_IBaseFilter)) - *ppv = &This->filter.IBaseFilter_iface; - else if (IsEqualIID(riid, &IID_IFileSourceFilter)) - *ppv = &This->IFileSourceFilter_iface; - - if (*ppv) - { - IUnknown_AddRef((IUnknown *)(*ppv)); - return S_OK; - } - - if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IMediaSeeking) && - !IsEqualIID(riid, &IID_IVideoWindow) && !IsEqualIID(riid, &IID_IBasicAudio)) - FIXME("No interface for %s!\n", qzdebugstr_guid(riid)); - - return E_NOINTERFACE; -} - /** IMediaFilter methods **/ static HRESULT WINAPI AsyncReader_Stop(IBaseFilter * iface) @@ -529,7 +510,7 @@ static HRESULT WINAPI AsyncReader_Run(IBaseFilter * iface, REFERENCE_TIME tStart static const IBaseFilterVtbl AsyncReader_Vtbl = { - AsyncReader_QueryInterface, + BaseFilterImpl_QueryInterface, BaseFilterImpl_AddRef, BaseFilterImpl_Release, BaseFilterImpl_GetClassID,
1
0
0
0
Michael Stefaniuc : ole32/tests: Avoid a cast from COM object to interface.
by Alexandre Julliard
30 May '19
30 May '19
Module: wine Branch: master Commit: a2d26ae8227c04b8ae8add191587e440aeaa9c21 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a2d26ae8227c04b8ae8add19…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed May 29 22:47:27 2019 +0200 ole32/tests: Avoid a cast from COM object to interface. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/tests/ole_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ole32/tests/ole_server.c b/dlls/ole32/tests/ole_server.c index 2f5a3ca..83f7c66 100644 --- a/dlls/ole32/tests/ole_server.c +++ b/dlls/ole32/tests/ole_server.c @@ -244,7 +244,7 @@ static void ole_server(void) if (hr == S_OK) { trace("server: registering class object\n"); - hr = CoRegisterClassObject(&CLSID_WineTestObject, (IUnknown *)&factory, + hr = CoRegisterClassObject(&CLSID_WineTestObject, (IUnknown *)&factory.IClassFactory_iface, CLSCTX_SERVER, REGCLS_MULTIPLEUSE, &key); if (hr == S_OK) {
1
0
0
0
Alexandre Julliard : kernel32: Simplify K32GetPerformanceInfo().
by Alexandre Julliard
30 May '19
30 May '19
Module: wine Branch: master Commit: 32582a780e35c04ccd75aa43306b2f94998e99df URL:
https://source.winehq.org/git/wine.git/?a=commit;h=32582a780e35c04ccd75aa43…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 30 21:53:05 2019 +0200 kernel32: Simplify K32GetPerformanceInfo(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/cpu.c | 78 +++++++++++++++++++++++------------------------------ 1 file changed, 34 insertions(+), 44 deletions(-) diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c index 9445d0b..7668a10 100644 --- a/dlls/kernel32/cpu.c +++ b/dlls/kernel32/cpu.c @@ -209,14 +209,10 @@ BOOL WINAPI IsProcessorFeaturePresent ( DWORD feature ) */ BOOL WINAPI K32GetPerformanceInfo(PPERFORMANCE_INFORMATION info, DWORD size) { - union - { - SYSTEM_PERFORMANCE_INFORMATION performance; - SYSTEM_PROCESS_INFORMATION process; - SYSTEM_BASIC_INFORMATION basic; - } *sysinfo; - SYSTEM_PROCESS_INFORMATION *spi; - DWORD process_info_size; + SYSTEM_PERFORMANCE_INFORMATION perf; + SYSTEM_BASIC_INFORMATION basic; + SYSTEM_PROCESS_INFORMATION *process, *spi; + DWORD info_size; NTSTATUS status; TRACE( "(%p, %d)\n", info, size ); @@ -227,62 +223,56 @@ BOOL WINAPI K32GetPerformanceInfo(PPERFORMANCE_INFORMATION info, DWORD size) return FALSE; } - memset( info, 0, sizeof(*info) ); - info->cb = sizeof(*info); + status = NtQuerySystemInformation( SystemPerformanceInformation, &perf, sizeof(perf), NULL ); + if (status) goto err; + status = NtQuerySystemInformation( SystemBasicInformation, &basic, sizeof(basic), NULL ); + if (status) goto err; + + info->cb = sizeof(*info); + info->CommitTotal = perf.TotalCommittedPages; + info->CommitLimit = perf.TotalCommitLimit; + info->CommitPeak = perf.PeakCommitment; + info->PhysicalTotal = basic.MmNumberOfPhysicalPages; + info->PhysicalAvailable = perf.AvailablePages; + info->SystemCache = 0; + info->KernelTotal = perf.PagedPoolUsage + perf.NonPagedPoolUsage; + info->KernelPaged = perf.PagedPoolUsage; + info->KernelNonpaged = perf.NonPagedPoolUsage; + info->PageSize = basic.PageSize; /* fields from SYSTEM_PROCESS_INFORMATION */ - NtQuerySystemInformation( SystemProcessInformation, NULL, 0, &process_info_size ); + NtQuerySystemInformation( SystemProcessInformation, NULL, 0, &info_size ); for (;;) { - sysinfo = HeapAlloc( GetProcessHeap(), 0, max(process_info_size, sizeof(*sysinfo)) ); - if (!sysinfo) + process = HeapAlloc( GetProcessHeap(), 0, info_size ); + if (!process) { SetLastError( ERROR_OUTOFMEMORY ); return FALSE; } - status = NtQuerySystemInformation( SystemProcessInformation, &sysinfo->process, - process_info_size, &process_info_size ); + status = NtQuerySystemInformation( SystemProcessInformation, process, info_size, &info_size ); if (!status) break; + HeapFree( GetProcessHeap(), 0, process ); if (status != STATUS_INFO_LENGTH_MISMATCH) goto err; - HeapFree( GetProcessHeap(), 0, sysinfo ); } - for (spi = &sysinfo->process;; spi = (SYSTEM_PROCESS_INFORMATION *)(((PCHAR)spi) + spi->NextEntryOffset)) + + info->HandleCount = info->ProcessCount = info->ThreadCount = 0; + spi = process; + for (;;) { info->ProcessCount++; info->HandleCount += spi->HandleCount; info->ThreadCount += spi->dwThreadCount; if (spi->NextEntryOffset == 0) break; + spi = (SYSTEM_PROCESS_INFORMATION *)((char *)spi + spi->NextEntryOffset); } - - /* fields from SYSTEM_PERFORMANCE_INFORMATION */ - status = NtQuerySystemInformation( SystemPerformanceInformation, &sysinfo->performance, - sizeof(sysinfo->performance), NULL ); - if (status) goto err; - info->CommitTotal = sysinfo->performance.TotalCommittedPages; - info->CommitLimit = sysinfo->performance.TotalCommitLimit; - info->CommitPeak = sysinfo->performance.PeakCommitment; - info->PhysicalAvailable = sysinfo->performance.AvailablePages; - info->KernelTotal = sysinfo->performance.PagedPoolUsage + - sysinfo->performance.NonPagedPoolUsage; - info->KernelPaged = sysinfo->performance.PagedPoolUsage; - info->KernelNonpaged = sysinfo->performance.NonPagedPoolUsage; - - /* fields from SYSTEM_BASIC_INFORMATION */ - status = NtQuerySystemInformation( SystemBasicInformation, &sysinfo->basic, - sizeof(sysinfo->basic), NULL ); - if (status) goto err; - info->PhysicalTotal = sysinfo->basic.MmNumberOfPhysicalPages; - info->PageSize = sysinfo->basic.PageSize; + HeapFree( GetProcessHeap(), 0, process ); + return TRUE; err: - HeapFree( GetProcessHeap(), 0, sysinfo ); - if (status) - { - SetLastError( RtlNtStatusToDosError( status ) ); - return FALSE; - } - return TRUE; + SetLastError( RtlNtStatusToDosError( status ) ); + return FALSE; } /***********************************************************************
1
0
0
0
Alexandre Julliard : oleacc/tests: Preserve the full 64 bits of the LRESULT value.
by Alexandre Julliard
30 May '19
30 May '19
Module: wine Branch: master Commit: 749243b869362a146ba405eb7efe32f0e8f9e7e3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=749243b869362a146ba405eb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 30 15:04:47 2019 +0200 oleacc/tests: Preserve the full 64 bits of the LRESULT value. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleacc/tests/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/oleacc/tests/main.c b/dlls/oleacc/tests/main.c index c62fa79..685e9b7 100644 --- a/dlls/oleacc/tests/main.c +++ b/dlls/oleacc/tests/main.c @@ -543,7 +543,7 @@ static void test_LresultFromObject(const char *name) ok(SUCCEEDED(lres), "got %lx\n", lres); ok(Object_ref > 1, "Object_ref = %d\n", Object_ref); - sprintf(cmdline, "\"%s\" main ObjectFromLresult %lx", name, lres); + sprintf(cmdline, "\"%s\" main ObjectFromLresult %s", name, wine_dbgstr_longlong(lres)); memset(&startup, 0, sizeof(startup)); startup.cb = sizeof(startup); CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &proc); @@ -992,7 +992,7 @@ START_TEST(main) HRESULT hres; LRESULT lres; - sscanf(argv[3], "%lx", &lres); + lres = strtoll( argv[3], NULL, 16 ); hres = ObjectFromLresult(lres, &IID_IUnknown, 0, (void**)&unk); ok(hres == S_OK, "hres = %x\n", hres); IUnknown_Release(unk);
1
0
0
0
Alexandre Julliard : mf/tests: Initialize variable to avoid spurious test failure.
by Alexandre Julliard
30 May '19
30 May '19
Module: wine Branch: master Commit: 838965a75b77cd0cfa6721ec2cf15653cf7dd496 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=838965a75b77cd0cfa6721ec…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 30 15:04:34 2019 +0200 mf/tests: Initialize variable to avoid spurious test failure. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/tests/mf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 18aafe2..f37ac7c 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -1237,6 +1237,7 @@ todo_wine { ok(hr == S_OK, "Failed to get attribute key, hr %#x.\n", hr); ok(IsEqualGUID(&guid, &MF_TOPOLOGY_RESOLUTION_STATUS), "Unexpected key %s.\n", wine_dbgstr_guid(&guid)); } + value = 0xdeadbeef; hr = IMFTopology_GetUINT32(full_topology, &MF_TOPOLOGY_RESOLUTION_STATUS, &value); todo_wine { ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr);
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
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