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
November 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
951 discussions
Start a n
N
ew thread
Piotr Caban : msvcp_win: Add stub dll.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: 241455e84b93c2deaf2c300c007aa0612994f7d7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=241455e84b93c2deaf2c300c…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Nov 19 19:46:43 2021 +0100 msvcp_win: Add stub dll. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 2 + configure.ac | 1 + dlls/msvcp_win/Makefile.in | 1 + dlls/msvcp_win/msvcp_win.spec | 3761 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 3765 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=241455e84b93c2deaf2c…
1
0
0
0
Dmitry Timoshkov : comctl32: Add semi-stub for ImageList_WriteEx.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: c692c59c2e2f1a61352b7f1b55807e3b84bd98ed URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c692c59c2e2f1a61352b7f1b…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Nov 19 15:58:33 2021 +0300 comctl32: Add semi-stub for ImageList_WriteEx. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/comctl32.spec | 1 + dlls/comctl32/imagelist.c | 8 ++++++++ include/commctrl.h | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dlls/comctl32/comctl32.spec b/dlls/comctl32/comctl32.spec index e3b889b9bd3..73f25906205 100644 --- a/dlls/comctl32/comctl32.spec +++ b/dlls/comctl32/comctl32.spec @@ -188,6 +188,7 @@ @ stdcall ImageList_SetImageCount(ptr long) @ stdcall ImageList_SetOverlayImage(ptr long long) @ stdcall ImageList_Write(ptr ptr) +@ stdcall ImageList_WriteEx(ptr long ptr) @ stdcall InitCommonControlsEx(ptr) @ stdcall InitMUILanguage(long) @ stdcall InitializeFlatSB(long) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 307ccc0336c..8da8beec1e0 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -3058,6 +3058,14 @@ failed: return result; } +/************************************************************************* + * ImageList_WriteEx [COMCTL32.@] + */ +BOOL WINAPI ImageList_WriteEx(HIMAGELIST himl, DWORD flags, IStream *pstm) +{ + FIXME("%p %08x %p: semi-stub\n", himl, flags, pstm); + return ImageList_Write(himl, pstm); +} /************************************************************************* * ImageList_Write [COMCTL32.@] diff --git a/include/commctrl.h b/include/commctrl.h index 41abceb0138..025eb328c32 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -601,7 +601,8 @@ BOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT,INT); #ifdef __IStream_INTERFACE_DEFINED__ HIMAGELIST WINAPI ImageList_Read(LPSTREAM); -BOOL WINAPI ImageList_Write(HIMAGELIST, LPSTREAM); +BOOL WINAPI ImageList_Write(HIMAGELIST,IStream*); +BOOL WINAPI ImageList_WriteEx(HIMAGELIST,DWORD,IStream*); #endif #define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon)
1
0
0
0
Damjan Jovanovic : server: Implement vm counters on FreeBSD.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: 93852599c20f0ba7859ef9dcafa5fbc05cce86f1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=93852599c20f0ba7859ef9dc…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Fri Nov 19 17:31:39 2021 +0200 server: Implement vm counters on FreeBSD. Signed-off-by: Damjan Jovanovic <damjan.jov(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/Makefile.in | 2 +- server/process.c | 40 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/server/Makefile.in b/server/Makefile.in index 84e78d0aa56..739d0517339 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -49,6 +49,6 @@ MANPAGES = \ wineserver.fr.UTF-8.man.in \ wineserver.man.in -EXTRALIBS = $(LDEXECFLAGS) $(RT_LIBS) $(INOTIFY_LIBS) +EXTRALIBS = $(LDEXECFLAGS) $(RT_LIBS) $(INOTIFY_LIBS) $(PROCSTAT_LIBS) unicode_EXTRADEFS = -DNLSDIR="\"${nlsdir}\"" -DBIN_TO_NLSDIR=\"`${MAKEDEP} -R ${bindir} ${nlsdir}`\" diff --git a/server/process.c b/server/process.c index 343ad78270c..6d794ba5ead 100644 --- a/server/process.c +++ b/server/process.c @@ -36,6 +36,23 @@ #endif #include <unistd.h> #include <poll.h> +#ifdef HAVE_SYS_PARAM_H +# include <sys/param.h> +#endif +#ifdef HAVE_SYS_QUEUE_H +# include <sys/queue.h> +#endif +#ifdef HAVE_SYS_SYSCTL_H +# include <sys/sysctl.h> +#endif +#ifdef HAVE_SYS_USER_H +# define thread __unix_thread +# include <sys/user.h> +# undef thread +#endif +#ifdef HAVE_LIBPROCSTAT +# include <libprocstat.h> +#endif #include "ntstatus.h" #define WIN32_NO_STATUS @@ -1550,9 +1567,9 @@ DECL_HANDLER(get_process_vm_counters) struct process *process = get_process_from_handle( req->handle, PROCESS_QUERY_LIMITED_INFORMATION ); if (!process) return; -#ifdef linux if (process->unix_pid != -1) { +#ifdef linux FILE *f; char proc_path[32], line[256]; unsigned long value; @@ -1579,9 +1596,28 @@ DECL_HANDLER(get_process_vm_counters) fclose( f ); } else set_error( STATUS_ACCESS_DENIED ); +#elif defined(HAVE_LIBPROCSTAT) + struct procstat *procstat; + unsigned int count; + + if ((procstat = procstat_open_sysctl())) + { + struct kinfo_proc *kp = procstat_getprocs( procstat, KERN_PROC_PID, process->unix_pid, &count ); + if (kp) + { + reply->virtual_size = kp->ki_size; + reply->peak_virtual_size = reply->virtual_size; + reply->working_set_size = kp->ki_rssize << PAGE_SHIFT; + reply->peak_working_set_size = kp->ki_rusage.ru_maxrss * 1024; + procstat_freeprocs( procstat, kp ); + } + else set_error( STATUS_ACCESS_DENIED ); + procstat_close( procstat ); + } + else set_error( STATUS_ACCESS_DENIED ); +#endif } else set_error( STATUS_ACCESS_DENIED ); -#endif release_object( process ); }
1
0
0
0
Jinoh Kang : winedbg: Escape special characters in GDB packet reply.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: f3478b4ec933d511aeb1cf3275872e4d9bcb857c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f3478b4ec933d511aeb1cf32…
Author: Jinoh Kang <jinoh.kang.kr(a)gmail.com> Date: Fri Nov 19 22:41:24 2021 +0900 winedbg: Escape special characters in GDB packet reply. There are four special characters in GDB's remote serial protocol: - '$' (0x24): start of packet - '}' (0x7D): escape - '*' (0x2A): run-length encoding repeat count delimiter - '#' (0x23): end of packet; start of checksum In particular, the '#' and '}' characters are problematic since they are often used in library filenames. A few examples: - %SystemRoot%\assembly\NativeImages_v[.NET ver]\[module+hash]#\*\*.dll - {CLSID or UUID}\*\.dll To make GDB happy with those filenames, we scan for those characters and escape them properly. While we are at it, also remove the assert in the packet_reply function that checks for '$' and '#' in the packet payload. Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com> Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/winedbg/gdbproxy.c | 54 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/programs/winedbg/gdbproxy.c b/programs/winedbg/gdbproxy.c index 727b24c9adf..c1d0bda1a41 100644 --- a/programs/winedbg/gdbproxy.c +++ b/programs/winedbg/gdbproxy.c @@ -739,18 +739,55 @@ static void packet_reply_val(struct gdb_context* gdbctx, ULONG_PTR val, int len) } } -static inline void packet_reply_add(struct gdb_context* gdbctx, const char* str) +static const unsigned char gdb_special_chars_lookup_table[4] = { + /* The characters should be indexed by its value modulo table length. */ + + 0x24, /* $: 001001|00 */ + 0x7D, /* }: 011111|01 */ + 0x2A, /* *: 001010|10 */ + 0x23 /* #: 001000|11 */ +}; + +static inline BOOL is_gdb_special_char(unsigned char val) { - int len = strlen(str); - packet_reply_grow(gdbctx, len); - memcpy(&gdbctx->out_buf[gdbctx->out_len], str, len); - gdbctx->out_len += len; + /* A note on the GDB special character scanning code: + * + * We cannot use strcspn() since we plan to transmit binary data in + * packet reply, which can contain NULL (0x00) bytes. We also don't want + * to slow down memory dump transfers. Therefore, we use a tiny lookup + * table that contains all the four special characters to speed up scanning. + */ + const size_t length = ARRAY_SIZE(gdb_special_chars_lookup_table); + return gdb_special_chars_lookup_table[val % length] == val; +} + +static void packet_reply_add(struct gdb_context* gdbctx, const char* str) +{ + const unsigned char *ptr = (unsigned char *)str, *curr; + + while (*ptr) + { + curr = ptr; + + while (*ptr && !is_gdb_special_char(*ptr)) + ptr++; + + packet_reply_grow(gdbctx, ptr - curr); + memcpy(&gdbctx->out_buf[gdbctx->out_len], curr, ptr - curr); + gdbctx->out_len += ptr - curr; + if (!*ptr) break; + + packet_reply_grow(gdbctx, 2); + gdbctx->out_buf[gdbctx->out_len++] = 0x7D; + gdbctx->out_buf[gdbctx->out_len++] = 0x20 ^ *ptr++; + } } static void packet_reply_open(struct gdb_context* gdbctx) { assert(gdbctx->out_curr_packet == -1); - packet_reply_add(gdbctx, "$"); + packet_reply_grow(gdbctx, 1); + gdbctx->out_buf[gdbctx->out_len++] = '$'; gdbctx->out_curr_packet = gdbctx->out_len; } @@ -760,7 +797,8 @@ static void packet_reply_close(struct gdb_context* gdbctx) int plen; plen = gdbctx->out_len - gdbctx->out_curr_packet; - packet_reply_add(gdbctx, "#"); + packet_reply_grow(gdbctx, 1); + gdbctx->out_buf[gdbctx->out_len++] = '#'; cksum = checksum(&gdbctx->out_buf[gdbctx->out_curr_packet], plen); packet_reply_hex_to(gdbctx, &cksum, 1); gdbctx->out_curr_packet = -1; @@ -799,8 +837,6 @@ static enum packet_return packet_reply(struct gdb_context* gdbctx, const char* p { packet_reply_open(gdbctx); - assert(strchr(packet, '$') == NULL && strchr(packet, '#') == NULL); - packet_reply_add(gdbctx, packet); packet_reply_close(gdbctx);
1
0
0
0
Jinoh Kang : winedbg: Use unsigned int for offset/length in GDB qXfer handler.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: a4b55c620ca6954efff8f59a9ae96201ecdd657d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a4b55c620ca6954efff8f59a…
Author: Jinoh Kang <jinoh.kang.kr(a)gmail.com> Date: Fri Nov 19 22:41:12 2021 +0900 winedbg: Use unsigned int for offset/length in GDB qXfer handler. packet_query uses sscanf format "%x" to parse out offset and length values. Since %x corresponds to unsigned int in the C standard, adjust the variable types appropriately. Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com> Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/winedbg/gdbproxy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/programs/winedbg/gdbproxy.c b/programs/winedbg/gdbproxy.c index d3055340ead..727b24c9adf 100644 --- a/programs/winedbg/gdbproxy.c +++ b/programs/winedbg/gdbproxy.c @@ -772,7 +772,7 @@ static void packet_reply_open_xfer(struct gdb_context* gdbctx) packet_reply_add(gdbctx, "m"); } -static void packet_reply_close_xfer(struct gdb_context* gdbctx, int off, int len) +static void packet_reply_close_xfer(struct gdb_context* gdbctx, unsigned int off, unsigned int len) { int begin = gdbctx->out_curr_packet + 1; int plen; @@ -789,7 +789,7 @@ static void packet_reply_close_xfer(struct gdb_context* gdbctx, int off, int len } plen = gdbctx->out_len - begin; - if (len >= 0 && plen > len) gdbctx->out_len -= (plen - len); + if (plen > len) gdbctx->out_len -= (plen - len); else gdbctx->out_buf[gdbctx->out_curr_packet] = 'l'; packet_reply_close(gdbctx); @@ -1762,7 +1762,7 @@ static void packet_query_target_xml(struct gdb_context* gdbctx, struct backend_c static enum packet_return packet_query(struct gdb_context* gdbctx) { - int off, len; + unsigned int off, len; struct backend_cpu *cpu; switch (gdbctx->in_packet[0])
1
0
0
0
Jinoh Kang : winedbg: Replace packet_realloc() with realloc().
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: d8c07c139179b0949f58b73cb9f260fa0a2cfc6d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d8c07c139179b0949f58b73c…
Author: Jinoh Kang <jinoh.kang.kr(a)gmail.com> Date: Fri Nov 19 22:41:05 2021 +0900 winedbg: Replace packet_realloc() with realloc(). winedbg is now built with msvcrt, so just use realloc() directly instead of Win32 heap functions. Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com> Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/winedbg/gdbproxy.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/programs/winedbg/gdbproxy.c b/programs/winedbg/gdbproxy.c index cd736532dcf..d3055340ead 100644 --- a/programs/winedbg/gdbproxy.c +++ b/programs/winedbg/gdbproxy.c @@ -705,20 +705,12 @@ static int addr_width(struct gdb_context* gdbctx) enum packet_return {packet_error = 0x00, packet_ok = 0x01, packet_done = 0x02, packet_last_f = 0x80}; -static char* packet_realloc(char* buf, int size) -{ - if (!buf) - return HeapAlloc(GetProcessHeap(), 0, size); - return HeapReAlloc(GetProcessHeap(), 0, buf, size); - -} - static void packet_reply_grow(struct gdb_context* gdbctx, size_t size) { if (gdbctx->out_buf_alloc < gdbctx->out_len + size) { gdbctx->out_buf_alloc = ((gdbctx->out_len + size) / 32 + 1) * 32; - gdbctx->out_buf = packet_realloc(gdbctx->out_buf, gdbctx->out_buf_alloc); + gdbctx->out_buf = realloc(gdbctx->out_buf, gdbctx->out_buf_alloc); } } @@ -2096,7 +2088,7 @@ static int fetch_data(struct gdb_context* gdbctx) { #define STEP 128 if (gdbctx->in_len + STEP > gdbctx->in_buf_alloc) - gdbctx->in_buf = packet_realloc(gdbctx->in_buf, gdbctx->in_buf_alloc += STEP); + gdbctx->in_buf = realloc(gdbctx->in_buf, gdbctx->in_buf_alloc += STEP); #undef STEP len = recv(gdbctx->sock, gdbctx->in_buf + gdbctx->in_len, gdbctx->in_buf_alloc - gdbctx->in_len - 1, 0); if (len <= 0) break;
1
0
0
0
Jacek Caban : user32: Move register_builtin_classes call to GetDesktopWindow.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: 0487c826fb8433cdede71f27af71c43fe7445a0f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0487c826fb8433cdede71f27…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Nov 19 13:47:37 2021 +0100 user32: Move register_builtin_classes call to GetDesktopWindow. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/driver.c | 1 - dlls/user32/win.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c index 06b02adeab5..a1a64f42b6f 100644 --- a/dlls/user32/driver.c +++ b/dlls/user32/driver.c @@ -98,7 +98,6 @@ static const struct user_driver_funcs *load_driver(void) __wine_set_user_driver( &driver, WINE_GDI_DRIVER_VERSION ); } - register_builtin_classes(); return USER_Driver; } diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 9fd5a9aa5e6..221607b3169 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -252,6 +252,7 @@ static WND *create_window_handle( HWND parent, HWND owner, LPCWSTR name, else assert( full_parent == thread_info->top_window ); if (full_parent && !USER_Driver->pCreateDesktopWindow( thread_info->top_window )) ERR( "failed to create desktop window\n" ); + register_builtin_classes(); } else /* HWND_MESSAGE parent */ { @@ -2282,6 +2283,7 @@ HWND WINAPI GetDesktopWindow(void) if (!thread_info->top_window || !USER_Driver->pCreateDesktopWindow( thread_info->top_window )) ERR( "failed to create desktop window\n" ); + register_builtin_classes(); return thread_info->top_window; }
1
0
0
0
Jacek Caban : user32: Don't load cursor inside user lock in register_builtin.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: 898ce074066ea29dc8eedd37070161ede912dc25 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=898ce074066ea29dc8eedd37…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Nov 19 13:45:10 2021 +0100 user32: Don't load cursor inside user lock in register_builtin. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/class.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/user32/class.c b/dlls/user32/class.c index 622226f9e15..b37db675400 100644 --- a/dlls/user32/class.c +++ b/dlls/user32/class.c @@ -529,11 +529,18 @@ static CLASS *CLASS_RegisterClass( LPCWSTR name, UINT basename_offset, HINSTANCE static void register_builtin( const struct builtin_class_descr *descr ) { CLASS *classPtr; + HCURSOR cursor = 0; + + if (descr->cursor) cursor = LoadCursorA( 0, (LPSTR)descr->cursor ); if (!(classPtr = CLASS_RegisterClass( descr->name, 0, user32_module, FALSE, - descr->style, 0, descr->extra ))) return; + descr->style, 0, descr->extra ))) + { + if (cursor) DestroyCursor( cursor ); + return; + } - if (descr->cursor) classPtr->hCursor = LoadCursorA( 0, (LPSTR)descr->cursor ); + classPtr->hCursor = cursor; classPtr->hbrBackground = descr->brush; classPtr->winproc = BUILTIN_WINPROC( descr->proc ); release_class_ptr( classPtr );
1
0
0
0
Ivo Ivanov : dinput: Support creating effects using device managed reports.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: 02951f12a4a3b3110756cda8bfd6bd3e1dbb44fc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=02951f12a4a3b3110756cda8…
Author: Ivo Ivanov <logos128(a)gmail.com> Date: Fri Nov 19 12:37:20 2021 +0100 dinput: Support creating effects using device managed reports. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/joystick_hid.c | 81 ++++++++++++++++++++++++++++++++++++++++------ dlls/dinput8/tests/hid.c | 3 -- 2 files changed, 72 insertions(+), 12 deletions(-) diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index 21e430a819f..3d90e721fb6 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -174,6 +174,7 @@ struct hid_joystick char *input_report_buf; char *output_report_buf; + char *feature_report_buf; USAGE_AND_PAGE *usages_buf; ULONG usages_count; @@ -401,15 +402,54 @@ static const WCHAR *object_usage_to_string( DIDEVICEOBJECTINSTANCEW *instance ) } } -static HRESULT find_next_effect_id( struct hid_joystick *impl, ULONG *index ) +static HRESULT find_next_effect_id( struct hid_joystick *impl, DWORD *index, USAGE type ) { - ULONG i; + struct pid_device_pool *device_pool = &impl->pid_device_pool; + struct pid_new_effect *new_effect = &impl->pid_new_effect; + struct pid_block_load *block_load = &impl->pid_block_load; + ULONG i, count, report_len = impl->caps.FeatureReportByteLength; + NTSTATUS status; + USAGE usage; + + if (!device_pool->device_managed_caps) + { + for (i = 0; i < ARRAY_SIZE(impl->effect_inuse); ++i) + if (!impl->effect_inuse[i]) break; + if (i == ARRAY_SIZE(impl->effect_inuse)) return DIERR_DEVICEFULL; + impl->effect_inuse[i] = TRUE; + *index = i + 1; + } + else + { + status = HidP_InitializeReportForID( HidP_Feature, new_effect->id, impl->preparsed, + impl->feature_report_buf, report_len ); + if (status != HIDP_STATUS_SUCCESS) return status; + + count = 1; + status = HidP_SetUsages( HidP_Feature, HID_USAGE_PAGE_PID, new_effect->type_coll, + &type, &count, impl->preparsed, impl->feature_report_buf, report_len ); + if (status != HIDP_STATUS_SUCCESS) return status; + + if (!HidD_SetFeature( impl->device, impl->feature_report_buf, report_len )) return DIERR_INPUTLOST; - for (i = 0; i < ARRAY_SIZE(impl->effect_inuse); ++i) - if (!impl->effect_inuse[i]) break; - if (i == ARRAY_SIZE(impl->effect_inuse)) return DIERR_DEVICEFULL; - impl->effect_inuse[i] = TRUE; - *index = i + 1; + status = HidP_InitializeReportForID( HidP_Feature, block_load->id, impl->preparsed, + impl->feature_report_buf, report_len ); + if (status != HIDP_STATUS_SUCCESS) return status; + + if (!HidD_GetFeature( impl->device, impl->feature_report_buf, report_len )) return DIERR_INPUTLOST; + + count = 1; + status = HidP_GetUsages( HidP_Feature, HID_USAGE_PAGE_PID, block_load->status_coll, + &usage, &count, impl->preparsed, impl->feature_report_buf, report_len ); + if (status != HIDP_STATUS_SUCCESS) return status; + + if (count != 1 || usage == PID_USAGE_BLOCK_LOAD_ERROR) return DIERR_INPUTLOST; + if (usage == PID_USAGE_BLOCK_LOAD_FULL) return DIERR_DEVICEFULL; + + status = HidP_GetUsageValue( HidP_Feature, HID_USAGE_PAGE_PID, 0, PID_USAGE_EFFECT_BLOCK_INDEX, + index, impl->preparsed, impl->feature_report_buf, report_len ); + if (status != HIDP_STATUS_SUCCESS) return status; + } return DI_OK; } @@ -736,6 +776,7 @@ static void hid_joystick_release( IDirectInputDevice8W *iface ) if (!ref) { free( impl->usages_buf ); + free( impl->feature_report_buf ); free( impl->output_report_buf ); free( impl->input_report_buf ); HidD_FreePreparsedData( impl->preparsed ); @@ -1897,6 +1938,9 @@ HRESULT hid_joystick_create_device( IDirectInputImpl *dinput, const GUID *guid, size = impl->caps.OutputReportByteLength; if (!(buffer = malloc( size ))) goto failed; impl->output_report_buf = buffer; + size = impl->caps.FeatureReportByteLength; + if (!(buffer = malloc( size ))) goto failed; + impl->feature_report_buf = buffer; impl->usages_count = HidP_MaxUsageListLength( HidP_Input, 0, impl->preparsed ); size = impl->usages_count * sizeof(USAGE_AND_PAGE); if (!(usages = malloc( size ))) goto failed; @@ -2720,7 +2764,7 @@ static HRESULT WINAPI hid_joystick_effect_Download( IDirectInputEffect *iface ) hr = DIERR_NOTEXCLUSIVEACQUIRED; else if ((impl->flags & complete_mask) != complete_mask) hr = DIERR_INCOMPLETEEFFECT; - else if (!impl->index && SUCCEEDED(hr = find_next_effect_id( impl->joystick, &impl->index ))) + else if (!impl->index && SUCCEEDED(hr = find_next_effect_id( impl->joystick, &impl->index, impl->type ))) { if (!impl->type_specific_buf[0]) status = HIDP_STATUS_SUCCESS; else status = HidP_SetUsageValue( HidP_Output, HID_USAGE_PAGE_PID, 0, PID_USAGE_EFFECT_BLOCK_INDEX, @@ -2873,7 +2917,11 @@ static HRESULT WINAPI hid_joystick_effect_Unload( IDirectInputEffect *iface ) { struct hid_joystick_effect *impl = impl_from_IDirectInputEffect( iface ); struct hid_joystick *joystick = impl->joystick; + struct pid_device_pool *device_pool = &joystick->pid_device_pool; + struct pid_block_free *block_free = &joystick->pid_block_free; + ULONG report_len = joystick->caps.OutputReportByteLength; HRESULT hr = DI_OK; + NTSTATUS status; TRACE( "iface %p\n", iface ); @@ -2882,7 +2930,22 @@ static HRESULT WINAPI hid_joystick_effect_Unload( IDirectInputEffect *iface ) hr = DI_NOEFFECT; else if (SUCCEEDED(hr = IDirectInputEffect_Stop( iface ))) { - impl->joystick->effect_inuse[impl->index - 1] = FALSE; + if (!device_pool->device_managed_caps) + joystick->effect_inuse[impl->index - 1] = FALSE; + else if (block_free->id) + { + status = HidP_InitializeReportForID( HidP_Output, block_free->id, joystick->preparsed, + joystick->output_report_buf, report_len ); + + if (status != HIDP_STATUS_SUCCESS) hr = status; + else status = HidP_SetUsageValue( HidP_Output, HID_USAGE_PAGE_PID, 0, PID_USAGE_EFFECT_BLOCK_INDEX, + impl->index, joystick->preparsed, joystick->output_report_buf, report_len ); + + if (status != HIDP_STATUS_SUCCESS) hr = status; + else if (WriteFile( joystick->device, joystick->output_report_buf, report_len, NULL, NULL )) hr = DI_OK; + else hr = DIERR_INPUTLOST; + } + impl->index = 0; } LeaveCriticalSection( &joystick->base.crit ); diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index f7c8001881d..cbb202530ac 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -8445,7 +8445,6 @@ static void test_device_managed_effect(void) .report_id = 9, .report_len = 2, .report_buf = {9,0x03}, - .todo = TRUE, }, /* block load */ { @@ -8453,7 +8452,6 @@ static void test_device_managed_effect(void) .report_id = 10, .report_len = 3, .report_buf = {10,0x01,0x01}, - .todo = TRUE, }, /* set condition */ { @@ -8492,7 +8490,6 @@ static void test_device_managed_effect(void) .report_id = 11, .report_len = 2, .report_buf = {11,0x01}, - .todo = TRUE, }, }; static const DWORD expect_axes[3] =
1
0
0
0
Ivo Ivanov : dinput: Write PID_USAGE_PARAMETER_BLOCK_OFFSET in the set condition report.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: b510558cb69feb67666b35ed0a3caf0553ea99c7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b510558cb69feb67666b35ed…
Author: Ivo Ivanov <logos128(a)gmail.com> Date: Fri Nov 19 12:37:19 2021 +0100 dinput: Write PID_USAGE_PARAMETER_BLOCK_OFFSET in the set condition report. Required by the PID spec for devices with device managed blocks. Signed-off-by: Ivo Ivanov <logos128(a)gmail.com> Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/joystick_hid.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index 858755140d1..21e430a819f 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -2765,6 +2765,10 @@ static HRESULT WINAPI hid_joystick_effect_Download( IDirectInputEffect *iface ) case PID_USAGE_ET_FRICTION: for (i = 0; i < impl->params.cbTypeSpecificParams / sizeof(DICONDITION); ++i) { + status = HidP_SetUsageValue( HidP_Output, HID_USAGE_PAGE_PID, 0, PID_USAGE_PARAMETER_BLOCK_OFFSET, + i, impl->joystick->preparsed, impl->type_specific_buf, report_len ); + if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsageValue %04x:%04x returned %#x\n", + HID_USAGE_PAGE_PID, PID_USAGE_PARAMETER_BLOCK_OFFSET, status ); set_parameter_value( impl, impl->type_specific_buf, set_condition->center_point_offset_caps, impl->condition[i].lOffset ); set_parameter_value( impl, impl->type_specific_buf, set_condition->positive_coefficient_caps,
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
96
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
Results per page:
10
25
50
100
200