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
September 2021
----- 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
1030 discussions
Start a n
N
ew thread
Rémi Bernon : winebus.sys: Use Rtl heap functions.
by Alexandre Julliard
16 Sep '21
16 Sep '21
Module: wine Branch: master Commit: 35a6148acff836fe442ce78016dc7f0f4f4b0291 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=35a6148acff836fe442ce780…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Sep 16 10:17:56 2021 +0200 winebus.sys: Use Rtl heap functions. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/bus_iohid.c | 2 +- dlls/winebus.sys/bus_sdl.c | 8 ++++---- dlls/winebus.sys/bus_udev.c | 12 ++++++------ dlls/winebus.sys/hid.c | 8 ++++---- dlls/winebus.sys/main.c | 30 +++++++++++++++--------------- dlls/winebus.sys/unixlib.c | 14 +++++++------- 6 files changed, 37 insertions(+), 37 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=35a6148acff836fe442c…
1
0
0
0
Rémi Bernon : winebus.sys: Load SDL bus mappings before calling bus_init.
by Alexandre Julliard
16 Sep '21
16 Sep '21
Module: wine Branch: master Commit: 0017b5eb636ee4963636eaf83ae34f6077d695fd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0017b5eb636ee4963636eaf8…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Sep 16 10:17:55 2021 +0200 winebus.sys: Load SDL bus mappings before calling bus_init. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/bus.h | 30 --------------- dlls/winebus.sys/bus_iohid.c | 1 - dlls/winebus.sys/bus_sdl.c | 69 +++++++++------------------------- dlls/winebus.sys/bus_udev.c | 1 - dlls/winebus.sys/main.c | 88 ++++++++++++++++++++++++++++++++++++++++++-- dlls/winebus.sys/unixlib.h | 3 ++ 6 files changed, 105 insertions(+), 87 deletions(-) diff --git a/dlls/winebus.sys/bus.h b/dlls/winebus.sys/bus.h deleted file mode 100644 index 96503a8267f..00000000000 --- a/dlls/winebus.sys/bus.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2016 Aric Stewart - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include <stdarg.h> - -#include <windef.h> -#include <winbase.h> -#include <winternl.h> -#include <ddk/wdm.h> -#include <ddk/hidclass.h> -#include <hidusage.h> - -#include "unixlib.h" - -extern HANDLE driver_key DECLSPEC_HIDDEN; diff --git a/dlls/winebus.sys/bus_iohid.c b/dlls/winebus.sys/bus_iohid.c index f3b55cc0f70..6d3f621a15a 100644 --- a/dlls/winebus.sys/bus_iohid.c +++ b/dlls/winebus.sys/bus_iohid.c @@ -89,7 +89,6 @@ #include "ddk/hidtypes.h" #include "wine/debug.h" -#include "bus.h" #include "unix_private.h" WINE_DEFAULT_DEBUG_CHANNEL(plugplay); diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c index bc7abcb933b..ff3a7ca09d8 100644 --- a/dlls/winebus.sys/bus_sdl.c +++ b/dlls/winebus.sys/bus_sdl.c @@ -50,7 +50,6 @@ # define LE_WORD(x) (x) #endif -#include "bus.h" #include "unix_private.h" WINE_DEFAULT_DEBUG_CHANNEL(plugplay); @@ -815,59 +814,11 @@ static void process_device_event(SDL_Event *event) LeaveCriticalSection(&sdl_cs); } -static void sdl_load_mappings(void) +NTSTATUS sdl_bus_init(void *args) { - HKEY key; - static const WCHAR szPath[] = {'m','a','p',0}; const char *mapping; + int i; - if ((mapping = getenv("SDL_GAMECONTROLLERCONFIG"))) - { - TRACE("Setting environment mapping %s\n", debugstr_a(mapping)); - if (pSDL_GameControllerAddMapping(mapping) < 0) - WARN("Failed to add environment mapping %s\n", pSDL_GetError()); - } - else if (!RegOpenKeyExW(driver_key, szPath, 0, KEY_QUERY_VALUE, &key)) - { - DWORD index = 0; - CHAR *buffer = NULL; - DWORD buffer_len = 0; - LSTATUS rc; - - do - { - CHAR name[255]; - DWORD name_len; - DWORD type; - DWORD data_len = buffer_len; - - name_len = sizeof(name); - rc = RegEnumValueA(key, index, name, &name_len, NULL, &type, (LPBYTE)buffer, &data_len); - if (rc == ERROR_MORE_DATA || buffer == NULL) - { - if (buffer) buffer = HeapReAlloc(GetProcessHeap(), 0, buffer, data_len); - else buffer = HeapAlloc(GetProcessHeap(), 0, data_len); - buffer_len = data_len; - - name_len = sizeof(name); - rc = RegEnumValueA(key, index, name, &name_len, NULL, &type, (LPBYTE)buffer, &data_len); - } - - if (rc == STATUS_SUCCESS) - { - TRACE("Setting registry mapping %s\n", debugstr_a(buffer)); - if (pSDL_GameControllerAddMapping(buffer) < 0) - WARN("Failed to add registry mapping %s\n", pSDL_GetError()); - index++; - } - } while (rc == STATUS_SUCCESS); - HeapFree(GetProcessHeap(), 0, buffer); - NtClose(key); - } -} - -NTSTATUS sdl_bus_init(void *args) -{ TRACE("args %p\n", args); options = *(struct sdl_bus_options *)args; @@ -942,7 +893,21 @@ NTSTATUS sdl_bus_init(void *args) pSDL_GameControllerEventState(SDL_ENABLE); /* Process mappings */ - if (pSDL_GameControllerAddMapping != NULL) sdl_load_mappings(); + if (pSDL_GameControllerAddMapping) + { + if ((mapping = getenv("SDL_GAMECONTROLLERCONFIG"))) + { + TRACE("Setting environment mapping %s\n", debugstr_a(mapping)); + if (pSDL_GameControllerAddMapping(mapping) < 0) + WARN("Failed to add environment mapping %s\n", pSDL_GetError()); + } + else for (i = 0; i < options.mappings_count; ++i) + { + TRACE("Setting registry mapping %s\n", debugstr_a(options.mappings[i])); + if (pSDL_GameControllerAddMapping(options.mappings[i]) < 0) + WARN("Failed to add registry mapping %s\n", pSDL_GetError()); + } + } return STATUS_SUCCESS; diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index bfeb7bfc09b..b8b3a0f0a84 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -79,7 +79,6 @@ #define LE_DWORD(x) (x) #endif -#include "bus.h" #include "unix_private.h" WINE_DEFAULT_DEBUG_CHANNEL(plugplay); diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c index f1b0430509a..4528673f880 100644 --- a/dlls/winebus.sys/main.c +++ b/dlls/winebus.sys/main.c @@ -34,7 +34,6 @@ #include "wine/list.h" #include "wine/unixlib.h" -#include "bus.h" #include "unixlib.h" WINE_DEFAULT_DEBUG_CHANNEL(plugplay); @@ -66,7 +65,7 @@ static DEVICE_OBJECT *keyboard_obj; static DEVICE_OBJECT *bus_pdo; static DEVICE_OBJECT *bus_fdo; -HANDLE driver_key; +static HANDLE driver_key; enum device_state { @@ -630,6 +629,85 @@ static NTSTATUS bus_main_thread_start(struct bus_main_params *bus) return STATUS_SUCCESS; } +static void sdl_bus_free_mappings(struct sdl_bus_options *options) +{ + DWORD count = options->mappings_count; + char **mappings = options->mappings; + + while (count) HeapFree(GetProcessHeap(), 0, mappings[--count]); + HeapFree(GetProcessHeap(), 0, mappings); +} + +static void sdl_bus_load_mappings(struct sdl_bus_options *options) +{ + static const WCHAR szPath[] = {'m','a','p',0}; + + ULONG idx = 0, len, count = 0, capacity, info_size, info_max_size; + KEY_VALUE_FULL_INFORMATION *info; + OBJECT_ATTRIBUTES attr = {0}; + char **mappings = NULL; + UNICODE_STRING path; + NTSTATUS status; + HANDLE key; + + options->mappings_count = 0; + options->mappings = NULL; + + RtlInitUnicodeString(&path, szPath); + InitializeObjectAttributes(&attr, &path, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, driver_key, NULL); + status = NtOpenKey(&key, KEY_ALL_ACCESS, &attr); + if (status) return; + + capacity = 1024; + mappings = HeapAlloc(GetProcessHeap(), 0, capacity * sizeof(*mappings)); + info_max_size = offsetof(KEY_VALUE_FULL_INFORMATION, Name) + 512; + info = HeapAlloc(GetProcessHeap(), 0, info_max_size); + + while (!status && info && mappings) + { + status = NtEnumerateValueKey(key, idx, KeyValueFullInformation, info, info_max_size, &info_size); + while (status == STATUS_BUFFER_OVERFLOW) + { + info_max_size = info_size; + if (!(info = HeapReAlloc(GetProcessHeap(), 0, info, info_max_size))) break; + status = NtEnumerateValueKey(key, idx, KeyValueFullInformation, info, info_max_size, &info_size); + } + + if (status == STATUS_NO_MORE_ENTRIES) + { + options->mappings_count = count; + options->mappings = mappings; + goto done; + } + + idx++; + if (status) break; + if (info->Type != REG_SZ) continue; + + RtlUnicodeToMultiByteSize(&len, (WCHAR *)((char *)info + info->DataOffset), info_size - info->DataOffset); + if (!len) continue; + + if (!(mappings[count++] = HeapAlloc(GetProcessHeap(), 0, len + 1))) break; + if (count > capacity) + { + capacity = capacity * 3 / 2; + if (!(mappings = HeapReAlloc(GetProcessHeap(), 0, mappings, capacity * sizeof(*mappings)))) + break; + } + + RtlUnicodeToMultiByteN(mappings[count], len, NULL, (WCHAR *)((char *)info + info->DataOffset), + info_size - info->DataOffset); + if (mappings[len - 1]) mappings[len] = 0; + } + + if (mappings) while (count) HeapFree(GetProcessHeap(), 0, mappings[--count]); + HeapFree(GetProcessHeap(), 0, mappings); + +done: + HeapFree(GetProcessHeap(), 0, info); + NtClose(key); +} + static NTSTATUS sdl_driver_init(void) { static const WCHAR bus_name[] = {'S','D','L',0}; @@ -643,11 +721,15 @@ static NTSTATUS sdl_driver_init(void) .init_code = sdl_init, .wait_code = sdl_wait, }; + NTSTATUS status; bus_options.map_controllers = check_bus_option(&controller_mode, 1); if (!bus_options.map_controllers) TRACE("SDL controller to XInput HID gamepad mapping disabled\n"); + sdl_bus_load_mappings(&bus_options); - return bus_main_thread_start(&bus); + status = bus_main_thread_start(&bus); + sdl_bus_free_mappings(&bus_options); + return status; } static NTSTATUS udev_driver_init(void) diff --git a/dlls/winebus.sys/unixlib.h b/dlls/winebus.sys/unixlib.h index ccca8d12e8b..55ba42500cf 100644 --- a/dlls/winebus.sys/unixlib.h +++ b/dlls/winebus.sys/unixlib.h @@ -49,6 +49,9 @@ struct device_desc struct sdl_bus_options { BOOL map_controllers; + /* freed after bus_init */ + DWORD mappings_count; + char **mappings; }; struct udev_bus_options
1
0
0
0
Rémi Bernon : winebus.sys: Move is_xbox_gamepad to unixlib.c.
by Alexandre Julliard
16 Sep '21
16 Sep '21
Module: wine Branch: master Commit: 7032b41747a1f75d3d200d7dad06754d78106a8b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7032b41747a1f75d3d200d7d…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Sep 16 10:17:54 2021 +0200 winebus.sys: Move is_xbox_gamepad to unixlib.c. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/bus.h | 3 --- dlls/winebus.sys/main.c | 38 -------------------------------------- dlls/winebus.sys/unix_private.h | 2 ++ dlls/winebus.sys/unixlib.c | 19 +++++++++++++++++++ 4 files changed, 21 insertions(+), 41 deletions(-) diff --git a/dlls/winebus.sys/bus.h b/dlls/winebus.sys/bus.h index df53508d2c0..96503a8267f 100644 --- a/dlls/winebus.sys/bus.h +++ b/dlls/winebus.sys/bus.h @@ -27,7 +27,4 @@ #include "unixlib.h" -/* General Bus Functions */ -BOOL is_xbox_gamepad(WORD vid, WORD pid) DECLSPEC_HIDDEN; - extern HANDLE driver_key DECLSPEC_HIDDEN; diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c index a80bd8a186e..f1b0430509a 100644 --- a/dlls/winebus.sys/main.c +++ b/dlls/winebus.sys/main.c @@ -57,31 +57,6 @@ __ASM_STDCALL_FUNC( wrap_fastcall_func1, 8, #endif -struct product_desc -{ - WORD vid; - WORD pid; -}; - -#define VID_MICROSOFT 0x045e - -static const struct product_desc XBOX_CONTROLLERS[] = -{ - {VID_MICROSOFT, 0x0202}, /* Xbox Controller */ - {VID_MICROSOFT, 0x0285}, /* Xbox Controller S */ - {VID_MICROSOFT, 0x0289}, /* Xbox Controller S */ - {VID_MICROSOFT, 0x028e}, /* Xbox360 Controller */ - {VID_MICROSOFT, 0x028f}, /* Xbox360 Wireless Controller */ - {VID_MICROSOFT, 0x02d1}, /* Xbox One Controller */ - {VID_MICROSOFT, 0x02dd}, /* Xbox One Controller (Covert Forces/Firmware 2015) */ - {VID_MICROSOFT, 0x02e0}, /* Xbox One X Controller */ - {VID_MICROSOFT, 0x02e3}, /* Xbox One Elite Controller */ - {VID_MICROSOFT, 0x02e6}, /* Wireless XBox Controller Dongle */ - {VID_MICROSOFT, 0x02ea}, /* Xbox One S Controller */ - {VID_MICROSOFT, 0x02fd}, /* Xbox One S Controller (Firmware 2017) */ - {VID_MICROSOFT, 0x0719}, /* Xbox 360 Wireless Adapter */ -}; - static DRIVER_OBJECT *driver_obj; static DEVICE_OBJECT *mouse_obj; @@ -1021,19 +996,6 @@ static NTSTATUS WINAPI hid_internal_dispatch(DEVICE_OBJECT *device, IRP *irp) return status; } -BOOL is_xbox_gamepad(WORD vid, WORD pid) -{ - int i; - - if (vid != VID_MICROSOFT) - return FALSE; - - for (i = 0; i < ARRAY_SIZE(XBOX_CONTROLLERS); i++) - if (pid == XBOX_CONTROLLERS[i].pid) return TRUE; - - return FALSE; -} - static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *pdo) { NTSTATUS ret; diff --git a/dlls/winebus.sys/unix_private.h b/dlls/winebus.sys/unix_private.h index f2af846473a..cdc2be9b318 100644 --- a/dlls/winebus.sys/unix_private.h +++ b/dlls/winebus.sys/unix_private.h @@ -89,4 +89,6 @@ extern BOOL hid_descriptor_add_axes(struct hid_descriptor *desc, BYTE count, USA extern BOOL hid_descriptor_add_haptics(struct hid_descriptor *desc) DECLSPEC_HIDDEN; +BOOL is_xbox_gamepad(WORD vid, WORD pid) DECLSPEC_HIDDEN; + #endif /* __WINEBUS_UNIX_PRIVATE_H */ diff --git a/dlls/winebus.sys/unixlib.c b/dlls/winebus.sys/unixlib.c index b6fcdf18ffe..57e81d3cba8 100644 --- a/dlls/winebus.sys/unixlib.c +++ b/dlls/winebus.sys/unixlib.c @@ -34,6 +34,25 @@ WINE_DEFAULT_DEBUG_CHANNEL(plugplay); +BOOL is_xbox_gamepad(WORD vid, WORD pid) +{ + if (vid != 0x045e) return FALSE; + if (pid == 0x0202) return TRUE; /* Xbox Controller */ + if (pid == 0x0285) return TRUE; /* Xbox Controller S */ + if (pid == 0x0289) return TRUE; /* Xbox Controller S */ + if (pid == 0x028e) return TRUE; /* Xbox360 Controller */ + if (pid == 0x028f) return TRUE; /* Xbox360 Wireless Controller */ + if (pid == 0x02d1) return TRUE; /* Xbox One Controller */ + if (pid == 0x02dd) return TRUE; /* Xbox One Controller (Covert Forces/Firmware 2015) */ + if (pid == 0x02e0) return TRUE; /* Xbox One X Controller */ + if (pid == 0x02e3) return TRUE; /* Xbox One Elite Controller */ + if (pid == 0x02e6) return TRUE; /* Wireless XBox Controller Dongle */ + if (pid == 0x02ea) return TRUE; /* Xbox One S Controller */ + if (pid == 0x02fd) return TRUE; /* Xbox One S Controller (Firmware 2017) */ + if (pid == 0x0719) return TRUE; /* Xbox 360 Wireless Adapter */ + return FALSE; +} + struct mouse_device { struct unix_device unix_device;
1
0
0
0
Rémi Bernon : winebus.sys: Remove the now useless device_compare callback.
by Alexandre Julliard
16 Sep '21
16 Sep '21
Module: wine Branch: master Commit: 2a2fc11d8cef6cac96b1348e51c9e623b96c31b2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2a2fc11d8cef6cac96b1348e…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Sep 16 10:17:53 2021 +0200 winebus.sys: Remove the now useless device_compare callback. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/bus_iohid.c | 11 ----------- dlls/winebus.sys/bus_sdl.c | 6 ------ dlls/winebus.sys/bus_udev.c | 9 --------- dlls/winebus.sys/unix_private.h | 1 - dlls/winebus.sys/unixlib.c | 20 -------------------- dlls/winebus.sys/unixlib.h | 7 ------- 6 files changed, 54 deletions(-) diff --git a/dlls/winebus.sys/bus_iohid.c b/dlls/winebus.sys/bus_iohid.c index 492d5a70ddb..f3b55cc0f70 100644 --- a/dlls/winebus.sys/bus_iohid.c +++ b/dlls/winebus.sys/bus_iohid.c @@ -161,16 +161,6 @@ static void iohid_device_destroy(struct unix_device *iface) { } -static int iohid_device_compare(struct unix_device *iface, void *context) -{ - struct platform_private *private = impl_from_unix_device(iface); - IOHIDDeviceRef dev2 = (IOHIDDeviceRef)context; - if (private->device != dev2) - return 1; - else - return 0; -} - static NTSTATUS iohid_device_start(struct unix_device *iface) { DWORD length; @@ -273,7 +263,6 @@ static void iohid_device_set_feature_report(struct unix_device *iface, HID_XFER_ static const struct unix_device_vtbl iohid_device_vtbl = { iohid_device_destroy, - iohid_device_compare, iohid_device_start, iohid_device_stop, iohid_device_get_report_descriptor, diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c index d48f9507abb..bc7abcb933b 100644 --- a/dlls/winebus.sys/bus_sdl.c +++ b/dlls/winebus.sys/bus_sdl.c @@ -497,11 +497,6 @@ static void sdl_device_destroy(struct unix_device *iface) { } -static int sdl_device_compare(struct unix_device *iface, void *context) -{ - return impl_from_unix_device(iface)->id - PtrToUlong(context); -} - static NTSTATUS sdl_device_start(struct unix_device *iface) { struct platform_private *ext = impl_from_unix_device(iface); @@ -596,7 +591,6 @@ static void sdl_device_set_feature_report(struct unix_device *iface, HID_XFER_PA static const struct unix_device_vtbl sdl_device_vtbl = { sdl_device_destroy, - sdl_device_compare, sdl_device_start, sdl_device_stop, sdl_device_get_reportdescriptor, diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index 8cbcabf25e8..bfeb7bfc09b 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -619,13 +619,6 @@ static void hidraw_device_destroy(struct unix_device *iface) udev_device_unref(private->udev_device); } -static int udev_device_compare(struct unix_device *iface, void *platform_dev) -{ - struct udev_device *dev1 = impl_from_unix_device(iface)->udev_device; - struct udev_device *dev2 = platform_dev; - return strcmp(udev_device_get_syspath(dev1), udev_device_get_syspath(dev2)); -} - static NTSTATUS hidraw_device_start(struct unix_device *iface) { EnterCriticalSection(&udev_cs); @@ -796,7 +789,6 @@ static void hidraw_device_set_feature_report(struct unix_device *iface, HID_XFER static const struct unix_device_vtbl hidraw_device_vtbl = { hidraw_device_destroy, - udev_device_compare, hidraw_device_start, hidraw_device_stop, hidraw_device_get_report_descriptor, @@ -898,7 +890,6 @@ static void lnxev_device_set_feature_report(struct unix_device *iface, HID_XFER_ static const struct unix_device_vtbl lnxev_device_vtbl = { lnxev_device_destroy, - udev_device_compare, lnxev_device_start, lnxev_device_stop, lnxev_device_get_report_descriptor, diff --git a/dlls/winebus.sys/unix_private.h b/dlls/winebus.sys/unix_private.h index 9b2c6d81fa2..f2af846473a 100644 --- a/dlls/winebus.sys/unix_private.h +++ b/dlls/winebus.sys/unix_private.h @@ -32,7 +32,6 @@ struct unix_device_vtbl { void (*destroy)(struct unix_device *iface); - int (*compare)(struct unix_device *iface, void *platform_dev); NTSTATUS (*start)(struct unix_device *iface); void (*stop)(struct unix_device *iface); NTSTATUS (*get_report_descriptor)(struct unix_device *iface, BYTE *buffer, DWORD length, DWORD *out_length); diff --git a/dlls/winebus.sys/unixlib.c b/dlls/winebus.sys/unixlib.c index 008fb6e77a2..b6fcdf18ffe 100644 --- a/dlls/winebus.sys/unixlib.c +++ b/dlls/winebus.sys/unixlib.c @@ -51,11 +51,6 @@ static void mouse_destroy(struct unix_device *iface) hid_descriptor_free(&impl->desc); } -static int mouse_compare(struct unix_device *iface, void *context) -{ - return 0; -} - static NTSTATUS mouse_start(struct unix_device *iface) { struct mouse_device *impl = mouse_from_unix_device(iface); @@ -111,7 +106,6 @@ static void mouse_set_feature_report(struct unix_device *iface, HID_XFER_PACKET static const struct unix_device_vtbl mouse_vtbl = { mouse_destroy, - mouse_compare, mouse_start, mouse_stop, mouse_get_report_descriptor, @@ -155,11 +149,6 @@ static void keyboard_destroy(struct unix_device *iface) hid_descriptor_free(&impl->desc); } -static int keyboard_compare(struct unix_device *iface, void *context) -{ - return 0; -} - static NTSTATUS keyboard_start(struct unix_device *iface) { struct keyboard_device *impl = keyboard_from_unix_device(iface); @@ -215,7 +204,6 @@ static void keyboard_set_feature_report(struct unix_device *iface, HID_XFER_PACK static const struct unix_device_vtbl keyboard_vtbl = { keyboard_destroy, - keyboard_compare, keyboard_start, keyboard_stop, keyboard_get_report_descriptor, @@ -275,13 +263,6 @@ static NTSTATUS unix_device_remove(void *args) return STATUS_SUCCESS; } -static NTSTATUS unix_device_compare(void *args) -{ - struct device_compare_params *params = args; - struct unix_device *iface = params->iface; - return iface->vtbl->compare(iface, params->context); -} - static NTSTATUS unix_device_start(void *args) { struct unix_device *iface = args; @@ -333,7 +314,6 @@ const unixlib_entry_t __wine_unix_call_funcs[] = mouse_device_create, keyboard_device_create, unix_device_remove, - unix_device_compare, unix_device_start, unix_device_get_report_descriptor, unix_device_set_output_report, diff --git a/dlls/winebus.sys/unixlib.h b/dlls/winebus.sys/unixlib.h index cd5f64cbb51..ccca8d12e8b 100644 --- a/dlls/winebus.sys/unixlib.h +++ b/dlls/winebus.sys/unixlib.h @@ -98,12 +98,6 @@ struct device_create_params struct unix_device *device; }; -struct device_compare_params -{ - struct unix_device *iface; - void *context; -}; - struct device_descriptor_params { struct unix_device *iface; @@ -133,7 +127,6 @@ enum unix_funcs mouse_create, keyboard_create, device_remove, - device_compare, device_start, device_get_report_descriptor, device_set_output_report,
1
0
0
0
Rémi Bernon : winebus.sys: Pass a unix_device pointer in every bus event.
by Alexandre Julliard
16 Sep '21
16 Sep '21
Module: wine Branch: master Commit: 421a6f53ad9682696f6c4116cadc7cb1bfd15963 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=421a6f53ad9682696f6c4116…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Sep 16 10:17:52 2021 +0200 winebus.sys: Pass a unix_device pointer in every bus event. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/bus_iohid.c | 38 +++++++++++++++++++++++++++-- dlls/winebus.sys/bus_sdl.c | 4 +++- dlls/winebus.sys/bus_udev.c | 25 ++++++++++++------- dlls/winebus.sys/main.c | 53 +++++++---------------------------------- dlls/winebus.sys/unix_private.h | 2 +- dlls/winebus.sys/unixlib.c | 17 +++++++------ dlls/winebus.sys/unixlib.h | 9 +------ 7 files changed, 75 insertions(+), 73 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=421a6f53ad9682696f6c…
1
0
0
0
Dmitry Timoshkov : riched20: Don't create custom heap.
by Alexandre Julliard
16 Sep '21
16 Sep '21
Module: wine Branch: master Commit: 8bff437e9d5e047e689d8b32f62995785c0cd48e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8bff437e9d5e047e689d8b32…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Sep 15 18:59:47 2021 +0300 riched20: Don't create custom heap. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 1 - dlls/riched20/editor.h | 1 - dlls/riched20/txthost.c | 2 -- 3 files changed, 4 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index cc02604767e..3bf499681ed 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -246,7 +246,6 @@ static BOOL ME_UpdateLinkAttribute(ME_TextEditor *editor, ME_Cursor *start, int HINSTANCE dll_instance = NULL; BOOL me_debug = FALSE; -HANDLE me_heap = NULL; static ME_TextBuffer *ME_MakeText(void) { ME_TextBuffer *buf = heap_alloc(sizeof(*buf)); diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index fdf3e068fe9..7bdd1bf5efe 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -23,7 +23,6 @@ struct _RTF_Info; extern HINSTANCE dll_instance DECLSPEC_HIDDEN; -extern HANDLE me_heap DECLSPEC_HIDDEN; #define RUN_IS_HIDDEN(run) ((run)->style->fmt.dwMask & CFM_HIDDEN \ && (run)->style->fmt.dwEffects & CFE_HIDDEN) diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index 6d2221e4d69..e18ec9490c0 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -1639,7 +1639,6 @@ BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved ) case DLL_PROCESS_ATTACH: dll_instance = instance; DisableThreadLibraryCalls( instance ); - me_heap = HeapCreate( 0, 0x10000, 0 ); if (!register_classes( instance )) return FALSE; LookupInit(); break; @@ -1653,7 +1652,6 @@ BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved ) if (listbox_registered) UnregisterClassW( L"REListBox20W", 0 ); if (combobox_registered) UnregisterClassW( L"REComboBox20W", 0 ); LookupCleanup(); - HeapDestroy( me_heap ); release_typelib(); break; }
1
0
0
0
Connor McAdams : user32/tests: Add missing winevents to test_setwindowpos() message sequences.
by Alexandre Julliard
15 Sep '21
15 Sep '21
Module: wine Branch: master Commit: f232252951fec637758f6b2c4eeda1c0e0650310 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f232252951fec637758f6b2c…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed Sep 15 03:00:16 2021 -0400 user32/tests: Add missing winevents to test_setwindowpos() message sequences. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/msg.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 7a101407e2b..4c9f1dc6913 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -5212,6 +5212,7 @@ static const struct message WmZOrder[] = { { WM_WINDOWPOSCHANGING, sent|wparam, 0, 0 }, { WM_GETMINMAXINFO, sent|defwinproc|wparam, 0, 0 }, { HCBT_ACTIVATE, hook }, + { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam, 3, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOREDRAW|SWP_NOMOVE|SWP_NOSIZE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE, 0 }, @@ -5225,10 +5226,12 @@ static const struct message WmZOrder[] = { { HCBT_SETFOCUS, hook }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_GETTEXT, sent|optional }, { WM_NCCALCSIZE, sent|optional }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* Win7 sends it, but Win8+ doesn't. */ { 0 } }; @@ -5996,6 +5999,8 @@ static const struct message WmFrameChanged[] = { { WM_WINDOWPOSCHANGED, sent|wparam|lparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOREDRAW |SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE, 0xf }, { WM_GETTEXT, sent|optional }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* Win7 seems to send this twice. */ { 0 } }; @@ -6006,6 +6011,8 @@ static const struct message WmFrameChanged_move[] = { |SWP_NOSIZE|SWP_NOCLIENTSIZE, 0x3 }, { WM_MOVE, sent|defwinproc, 0 }, { WM_GETTEXT, sent|optional }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* Win7 seems to send this twice. */ { 0 } }; @@ -18443,6 +18450,7 @@ START_TEST(msg) test_WaitForInputIdle( test_argv[0] ); test_scrollwindowex(); test_messages(); + test_setwindowpos(); /* Fix message sequences before removing 4 lines below */ if (pUnhookWinEvent && hEvent_hook) @@ -18453,7 +18461,6 @@ START_TEST(msg) } hEvent_hook = 0; - test_setwindowpos(); test_showwindow(); invisible_parent_tests(); test_mdi_messages();
1
0
0
0
Connor McAdams : user32/tests: Add missing winevents to test_messages() message sequences.
by Alexandre Julliard
15 Sep '21
15 Sep '21
Module: wine Branch: master Commit: 633dbf3b79fbd2266aa1716ad28bda14aa1e57b0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=633dbf3b79fbd2266aa1716a…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed Sep 15 03:00:15 2021 -0400 user32/tests: Add missing winevents to test_messages() message sequences. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/msg.c | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=633dbf3b79fbd2266aa1…
1
0
0
0
Connor McAdams : user32/tests: Fix existing winevents in test_messages() message sequences.
by Alexandre Julliard
15 Sep '21
15 Sep '21
Module: wine Branch: master Commit: 2583d85fcf4354d8b435a9fc8eca93eb00179742 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2583d85fcf4354d8b435a9fc…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed Sep 15 03:00:14 2021 -0400 user32/tests: Fix existing winevents in test_messages() message sequences. Set the appropriate message flags for the existing WinEvents in the test_messages() message sequences. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/msg.c | 204 ++++++++++++++++++++++++------------------------ 1 file changed, 102 insertions(+), 102 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=2583d85fcf4354d8b435…
1
0
0
0
Connor McAdams : user32/tests: Fix occasional failure in test_messages() message sequences.
by Alexandre Julliard
15 Sep '21
15 Sep '21
Module: wine Branch: master Commit: 90ab555bbc31a88e07e102852a12a4d9ffc45c5b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=90ab555bbc31a88e07e10285…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed Sep 15 03:00:13 2021 -0400 user32/tests: Fix occasional failure in test_messages() message sequences. Some window messages in the WmShowPopupExtremeLocationSeq message sequence aren't always sent on Win8+. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 8e523edd5ba..e7728ee151f 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -1108,8 +1108,8 @@ static const struct message WmShowPopupExtremeLocationSeq[] = { { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { HCBT_SETFOCUS, hook }, { WM_SETFOCUS, sent|defwinproc }, - { WM_NCPAINT, sent|wparam, 1 }, - { WM_ERASEBKGND, sent }, + { WM_NCPAINT, sent|wparam|optional, 1 }, /* Not always sent on Win8+ */ + { WM_ERASEBKGND, sent|optional }, /* Not always sent on Win8+ */ { WM_WINDOWPOSCHANGED, sent }, /* occasionally received on test machines */ { WM_NCPAINT, sent|optional },
1
0
0
0
← Newer
1
...
52
53
54
55
56
57
58
...
103
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
Results per page:
10
25
50
100
200