winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2016
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
777 discussions
Start a n
N
ew thread
Huw Davies : gdi32: Explicitly write out the rops for mask_rect_32().
by Alexandre Julliard
25 Aug '16
25 Aug '16
Module: wine Branch: master Commit: e1ce79ec94d89bc1b5c096e3a725bf9775c01343 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e1ce79ec94d89bc1b5c096e3a…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Aug 25 09:43:09 2016 +0100 gdi32: Explicitly write out the rops for mask_rect_32(). Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/dibdrv/primitives.c | 172 +++++++++++++++++------------------------ 1 file changed, 71 insertions(+), 101 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e1ce79ec94d89bc1b5c09…
1
0
0
0
Huw Davies : gdi32: Explicitly write out the rops for copy_rect_32().
by Alexandre Julliard
25 Aug '16
25 Aug '16
Module: wine Branch: master Commit: 4b39c7b944a66425022a00c482e2120870e39c3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4b39c7b944a66425022a00c48…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Aug 25 09:43:08 2016 +0100 gdi32: Explicitly write out the rops for copy_rect_32(). Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/dibdrv/primitives.c | 47 ++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/dlls/gdi32/dibdrv/primitives.c b/dlls/gdi32/dibdrv/primitives.c index a1ec500..91cce3f 100644 --- a/dlls/gdi32/dibdrv/primitives.c +++ b/dlls/gdi32/dibdrv/primitives.c @@ -108,6 +108,23 @@ static const BYTE pixel_masks_4[2] = {0xf0, 0x0f}; static const BYTE pixel_masks_1[8] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01}; static const BYTE edge_masks_1[8] = {0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x01}; +#define ROPS_WITHOUT_COPY( _d, _s ) \ +case R2_BLACK: LOOP( (_d) = 0 ) break; \ +case R2_NOTMERGEPEN: LOOP( (_d) = ~((_d) | (_s)) ) break; \ +case R2_MASKNOTPEN: LOOP( (_d) &= ~(_s) ) break; \ +case R2_NOTCOPYPEN: LOOP( (_d) = ~(_s) ) break; \ +case R2_MASKPENNOT: LOOP( (_d) = (~(_d) & (_s)) ) break; \ +case R2_NOT: LOOP( (_d) = ~(_d) ) break; \ +case R2_XORPEN: LOOP( (_d) ^= (_s) ) break; \ +case R2_NOTMASKPEN: LOOP( (_d) = ~((_d) & (_s)) ) break; \ +case R2_MASKPEN: LOOP( (_d) &= (_s) ) break; \ +case R2_NOTXORPEN: LOOP( (_d) = ~((_d) ^ (_s)) ) break; \ +case R2_NOP: break; \ +case R2_MERGENOTPEN: LOOP( (_d) = ((_d) | ~(_s)) ) break; \ +case R2_MERGEPENNOT: LOOP( (_d) = (~(_d) | (_s)) ) break; \ +case R2_MERGEPEN: LOOP( (_d) |= (_s) ) break; \ +case R2_WHITE: LOOP( (_d) = ~0 ) break; + static inline void do_rop_32(DWORD *ptr, DWORD and, DWORD xor) { *ptr = (*ptr & and) ^ xor; @@ -1588,13 +1605,17 @@ static inline void copy_rect_bits_32( DWORD *dst_start, const DWORD *src_start, const DWORD *src; DWORD *dst; int x, y; - struct rop_codes codes; - get_rop_codes( rop2, &codes ); +#define LOOP( op ) \ + for (y = 0; y < size->cy; y++, dst_start += dst_stride, src_start += src_stride) \ + for (x = 0, src = src_start, dst = dst_start; x < size->cx; x++, src++, dst++) \ + op; - for (y = 0; y < size->cy; y++, dst_start += dst_stride, src_start += src_stride) - for (x = 0, src = src_start, dst = dst_start; x < size->cx; x++, src++, dst++) - do_rop_codes_32( dst, *src, &codes ); + switch (rop2) + { + ROPS_WITHOUT_COPY( dst[0], src[0] ) + } +#undef LOOP } static inline void copy_rect_bits_rev_32( DWORD *dst_start, const DWORD *src_start, const SIZE *size, @@ -1603,16 +1624,20 @@ static inline void copy_rect_bits_rev_32( DWORD *dst_start, const DWORD *src_sta const DWORD *src; DWORD *dst; int x, y; - struct rop_codes codes; - - get_rop_codes( rop2, &codes ); src_start += size->cx - 1; dst_start += size->cx - 1; - for (y = 0; y < size->cy; y++, dst_start += dst_stride, src_start += src_stride) - for (x = 0, src = src_start, dst = dst_start; x < size->cx; x++, src--, dst--) - do_rop_codes_32( dst, *src, &codes ); +#define LOOP( op ) \ + for (y = 0; y < size->cy; y++, dst_start += dst_stride, src_start += src_stride) \ + for (x = 0, src = src_start, dst = dst_start; x < size->cx; x++, src--, dst--) \ + op; + + switch (rop2) + { + ROPS_WITHOUT_COPY( dst[0], src[0] ) + } +#undef LOOP } static void copy_rect_32(const dib_info *dst, const RECT *rc,
1
0
0
0
Huw Davies : gdi32: Move the outer loop into separate functions for each direction.
by Alexandre Julliard
25 Aug '16
25 Aug '16
Module: wine Branch: master Commit: 1d0e25e600efd22aa9fe950d47a8db1223694038 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1d0e25e600efd22aa9fe950d4…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Aug 25 09:43:07 2016 +0100 gdi32: Move the outer loop into separate functions for each direction. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/dibdrv/primitives.c | 61 ++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a/dlls/gdi32/dibdrv/primitives.c b/dlls/gdi32/dibdrv/primitives.c index c3cb0d4..a1ec500 100644 --- a/dlls/gdi32/dibdrv/primitives.c +++ b/dlls/gdi32/dibdrv/primitives.c @@ -148,17 +148,6 @@ static inline void do_rop_codes_mask_8(BYTE *dst, BYTE src, struct rop_codes *co do_rop_mask_8( dst, (src & codes->a1) ^ codes->a2, (src & codes->x1) ^ codes->x2, mask ); } -static inline void do_rop_codes_line_32(DWORD *dst, const DWORD *src, struct rop_codes *codes, int len) -{ - for (; len > 0; len--, src++, dst++) do_rop_codes_32( dst, *src, codes ); -} - -static inline void do_rop_codes_line_rev_32(DWORD *dst, const DWORD *src, struct rop_codes *codes, int len) -{ - for (src += len - 1, dst += len - 1; len > 0; len--, src--, dst--) - do_rop_codes_32( dst, *src, codes ); -} - static inline void do_rop_codes_line_16(WORD *dst, const WORD *src, struct rop_codes *codes, int len) { for (; len > 0; len--, src++, dst++) do_rop_codes_16( dst, *src, codes ); @@ -1593,12 +1582,45 @@ static void pattern_rects_null(const dib_info *dib, int num, const RECT *rc, con return; } +static inline void copy_rect_bits_32( DWORD *dst_start, const DWORD *src_start, const SIZE *size, + int dst_stride, int src_stride, int rop2 ) +{ + const DWORD *src; + DWORD *dst; + int x, y; + struct rop_codes codes; + + get_rop_codes( rop2, &codes ); + + for (y = 0; y < size->cy; y++, dst_start += dst_stride, src_start += src_stride) + for (x = 0, src = src_start, dst = dst_start; x < size->cx; x++, src++, dst++) + do_rop_codes_32( dst, *src, &codes ); +} + +static inline void copy_rect_bits_rev_32( DWORD *dst_start, const DWORD *src_start, const SIZE *size, + int dst_stride, int src_stride, int rop2 ) +{ + const DWORD *src; + DWORD *dst; + int x, y; + struct rop_codes codes; + + get_rop_codes( rop2, &codes ); + + src_start += size->cx - 1; + dst_start += size->cx - 1; + + for (y = 0; y < size->cy; y++, dst_start += dst_stride, src_start += src_stride) + for (x = 0, src = src_start, dst = dst_start; x < size->cx; x++, src--, dst--) + do_rop_codes_32( dst, *src, &codes ); +} + static void copy_rect_32(const dib_info *dst, const RECT *rc, const dib_info *src, const POINT *origin, int rop2, int overlap) { DWORD *dst_start, *src_start; - struct rop_codes codes; int y, dst_stride, src_stride; + SIZE size; if (overlap & OVERLAP_BELOW) { @@ -1622,14 +1644,13 @@ static void copy_rect_32(const dib_info *dst, const RECT *rc, return; } - get_rop_codes( rop2, &codes ); - for (y = rc->top; y < rc->bottom; y++, dst_start += dst_stride, src_start += src_stride) - { - if (overlap & OVERLAP_RIGHT) - do_rop_codes_line_rev_32( dst_start, src_start, &codes, rc->right - rc->left ); - else - do_rop_codes_line_32( dst_start, src_start, &codes, rc->right - rc->left ); - } + size.cx = rc->right - rc->left; + size.cy = rc->bottom - rc->top; + + if (overlap & OVERLAP_RIGHT) + copy_rect_bits_rev_32( dst_start, src_start, &size, dst_stride, src_stride, rop2 ); + else + copy_rect_bits_32( dst_start, src_start, &size, dst_stride, src_stride, rop2 ); } static void copy_rect_24(const dib_info *dst, const RECT *rc,
1
0
0
0
Keno Fischer : kernel32/tests: Improve tests for pUnregisterWait(0).
by Alexandre Julliard
25 Aug '16
25 Aug '16
Module: wine Branch: master Commit: b0290ec3b86e24b317d12ba11f61a835aa65eba1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b0290ec3b86e24b317d12ba11…
Author: Keno Fischer <keno(a)juliacomputing.com> Date: Thu Aug 25 00:17:07 2016 -0400 kernel32/tests: Improve tests for pUnregisterWait(0). Signed-off-by: Keno Fischer <keno(a)juliacomputing.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/thread.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c index 0a5f0d3..2b752c2 100644 --- a/dlls/kernel32/tests/thread.c +++ b/dlls/kernel32/tests/thread.c @@ -1246,9 +1246,11 @@ static void test_RegisterWaitForSingleObject(void) ret = pUnregisterWait(wait_handle); ok(ret, "UnregisterWait failed with error %d\n", GetLastError()); - ret = pUnregisterWait(0); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "UnregisterWait failed with unexpected error %d\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pUnregisterWait(NULL); + ok(!ret, "Expected UnregisterWait to fail"); + ok(GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); } static DWORD LS_main;
1
0
0
0
Bruno Jesus : dinput: Don't give up if we can' t translate the effect envelope.
by Alexandre Julliard
25 Aug '16
25 Aug '16
Module: wine Branch: master Commit: 4cf2ad9899d68ab5416514a1e817b3be41834d48 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4cf2ad9899d68ab5416514a1e…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Wed Aug 24 22:55:59 2016 -0300 dinput: Don't give up if we can't translate the effect envelope. Based on ideas by Elias Vanderstuyft. Signed-off-by: Bruno Jesus <00cpxxx(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/effect_linuxinput.c | 52 +++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c index b4e7b06..e2e75c7 100644 --- a/dlls/dinput/effect_linuxinput.c +++ b/dlls/dinput/effect_linuxinput.c @@ -557,30 +557,36 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters( This->effect.replay.length = 1; } - if (dwFlags & DIEP_ENVELOPE) { + if (dwFlags & DIEP_ENVELOPE) + { struct ff_envelope* env; - if (This->effect.type == FF_CONSTANT) env = &This->effect.u.constant.envelope; - else if (This->effect.type == FF_PERIODIC) env = &This->effect.u.periodic.envelope; - else if (This->effect.type == FF_RAMP) env = &This->effect.u.ramp.envelope; - else env = NULL; - - if (peff->lpEnvelope == NULL) { - /* if this type had an envelope, reset it */ - if (env) { - env->attack_length = 0; - env->attack_level = 0; - env->fade_length = 0; - env->fade_level = 0; - } - } else { - /* did we get passed an envelope for a type that doesn't even have one? */ - if (!env) return DIERR_INVALIDPARAM; - /* copy the envelope */ - env->attack_length = peff->lpEnvelope->dwAttackTime / 1000; - env->attack_level = (peff->lpEnvelope->dwAttackLevel / 10) * 32; - env->fade_length = peff->lpEnvelope->dwFadeTime / 1000; - env->fade_level = (peff->lpEnvelope->dwFadeLevel / 10) * 32; - } + if (This->effect.type == FF_CONSTANT) + env = &This->effect.u.constant.envelope; + else if (This->effect.type == FF_PERIODIC) + env = &This->effect.u.periodic.envelope; + else if (This->effect.type == FF_RAMP) + env = &This->effect.u.ramp.envelope; + else + env = NULL; + + /* copy the envelope if it is present and the linux effect supports it */ + if (peff->lpEnvelope && env) + { + env->attack_length = peff->lpEnvelope->dwAttackTime / 1000; + env->attack_level = (peff->lpEnvelope->dwAttackLevel / 10) * 32; + env->fade_length = peff->lpEnvelope->dwFadeTime / 1000; + env->fade_level = (peff->lpEnvelope->dwFadeLevel / 10) * 32; + } + /* if the dinput envelope is NULL we will clear the linux envelope */ + else if (env) + { + env->attack_length = 0; + env->attack_level = 0; + env->fade_length = 0; + env->fade_level = 0; + } + else + WARN("Ignoring dinput envelope not supported in the linux effect\n"); } /* Gain and Sample Period settings are not supported by the linux
1
0
0
0
Bruno Jesus : dinput: Simplify cartesian and fix polar direction calculations.
by Alexandre Julliard
25 Aug '16
25 Aug '16
Module: wine Branch: master Commit: 79b5883fce72e72b8a41c7375ef6fdfc9e473677 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79b5883fce72e72b8a41c7375…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Wed Aug 24 22:55:58 2016 -0300 dinput: Simplify cartesian and fix polar direction calculations. Based on formulas by Elias Vanderstuyft. Signed-off-by: Bruno Jesus <00cpxxx(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/effect_linuxinput.c | 43 +++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c index 1b60d47..b4e7b06 100644 --- a/dlls/dinput/effect_linuxinput.c +++ b/dlls/dinput/effect_linuxinput.c @@ -519,23 +519,32 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters( /* one-axis effects must use cartesian coords */ return DIERR_INVALIDPARAM; } - } else { /* two axes */ - if (peff->dwFlags & DIEFF_CARTESIAN) { - LONG x, y; - if (This->first_axis_is_x) { - x = peff->rglDirection[0]; - y = peff->rglDirection[1]; - } else { - x = peff->rglDirection[1]; - y = peff->rglDirection[0]; - } - This->effect.direction = (int)((3 * M_PI / 2 - atan2(y, x)) * -0x7FFF / M_PI); - } else { - /* Polar and spherical are the same for 2 axes */ - /* Precision is important here, so we do double math with exact constants */ - This->effect.direction = (int)(((double)peff->rglDirection[0] - 90) / 35999) * 0x7FFF; - } - } + } + /* two axes */ + else + { + if (peff->dwFlags & DIEFF_CARTESIAN) + { + LONG x, y; + if (This->first_axis_is_x) + { + x = peff->rglDirection[0]; + y = peff->rglDirection[1]; + } + else + { + x = peff->rglDirection[1]; + y = peff->rglDirection[0]; + } + This->effect.direction = (unsigned int)((M_PI / 2 + atan2(y, x)) * 0x8000 / M_PI); + } + else + { + /* Polar and spherical are the same for 2 axes */ + /* Precision is important here, so we do double math with exact constants */ + This->effect.direction = (unsigned int)(((double)peff->rglDirection[0] / 18000) * 0x8000); + } + } } if (dwFlags & DIEP_DURATION)
1
0
0
0
Bruno Jesus : dinput: Fix infinite effect length handling.
by Alexandre Julliard
25 Aug '16
25 Aug '16
Module: wine Branch: master Commit: d0070935e4f0986127ee6d637b5c412a917ff591 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d0070935e4f0986127ee6d637…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Wed Aug 24 22:55:57 2016 -0300 dinput: Fix infinite effect length handling. Based on ideas by Elias Vanderstuyft. Signed-off-by: Bruno Jesus <00cpxxx(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/effect_linuxinput.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c index 0d2fdf5..1b60d47 100644 --- a/dlls/dinput/effect_linuxinput.c +++ b/dlls/dinput/effect_linuxinput.c @@ -302,8 +302,12 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters( } } - if (dwFlags & DIEP_DURATION) { - peff->dwDuration = (DWORD)This->effect.replay.length * 1000; + if (dwFlags & DIEP_DURATION) + { + if (!This->effect.replay.length) /* infinite for the linux driver */ + peff->dwDuration = INFINITE; + else + peff->dwDuration = (DWORD)This->effect.replay.length * 1000; } if (dwFlags & DIEP_ENVELOPE) { @@ -535,7 +539,14 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters( } if (dwFlags & DIEP_DURATION) - This->effect.replay.length = peff->dwDuration / 1000; + { + if (peff->dwDuration == INFINITE) + This->effect.replay.length = 0; /* infinite for the linux driver */ + else if(peff->dwDuration > 1000) + This->effect.replay.length = peff->dwDuration / 1000; + else + This->effect.replay.length = 1; + } if (dwFlags & DIEP_ENVELOPE) { struct ff_envelope* env;
1
0
0
0
Bruno Jesus : dinput: Fix calculation of too small periods for periodic effect.
by Alexandre Julliard
25 Aug '16
25 Aug '16
Module: wine Branch: master Commit: 7d88a12dc0371eb655f4aeec7bff4985c171311e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d88a12dc0371eb655f4aeec7…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Wed Aug 24 22:55:56 2016 -0300 dinput: Fix calculation of too small periods for periodic effect. Based on ideas by Elias Vanderstuyft. Signed-off-by: Bruno Jesus <00cpxxx(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/effect_linuxinput.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c index bbcadf5..0d2fdf5 100644 --- a/dlls/dinput/effect_linuxinput.c +++ b/dlls/dinput/effect_linuxinput.c @@ -588,19 +588,29 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters( if (dwFlags & DIEP_TRIGGERREPEATINTERVAL) This->effect.trigger.interval = peff->dwTriggerRepeatInterval / 1000; - if (dwFlags & DIEP_TYPESPECIFICPARAMS) { - if (!(peff->lpvTypeSpecificParams)) - return DIERR_INCOMPLETEEFFECT; - if (type == DIEFT_PERIODIC) { - LPCDIPERIODIC tsp; + if (dwFlags & DIEP_TYPESPECIFICPARAMS) + { + if (!(peff->lpvTypeSpecificParams)) + return DIERR_INCOMPLETEEFFECT; + + if (type == DIEFT_PERIODIC) + { + DIPERIODIC *tsp; if (peff->cbTypeSpecificParams != sizeof(DIPERIODIC)) return DIERR_INVALIDPARAM; tsp = peff->lpvTypeSpecificParams; - This->effect.u.periodic.magnitude = (tsp->dwMagnitude / 10) * 32; - This->effect.u.periodic.offset = (tsp->lOffset / 10) * 32; - This->effect.u.periodic.phase = (tsp->dwPhase / 9) * 8; /* == (/ 36 * 32) */ - This->effect.u.periodic.period = tsp->dwPeriod / 1000; - } else if (type == DIEFT_CONSTANTFORCE) { + + This->effect.u.periodic.magnitude = (tsp->dwMagnitude / 10) * 32; + This->effect.u.periodic.offset = (tsp->lOffset / 10) * 32; + This->effect.u.periodic.phase = (tsp->dwPhase / 9) * 8; /* == (/ 36 * 32) */ + /* dinput uses microseconds, linux uses miliseconds */ + if (tsp->dwPeriod <= 1000) + This->effect.u.periodic.period = 1; + else + This->effect.u.periodic.period = tsp->dwPeriod / 1000; + } + else if (type == DIEFT_CONSTANTFORCE) + { LPCDICONSTANTFORCE tsp; if (peff->cbTypeSpecificParams != sizeof(DICONSTANTFORCE)) return DIERR_INVALIDPARAM;
1
0
0
0
Piotr Caban : winemac.drv: Fix setting Cocoa focus when window is shown by other thread.
by Alexandre Julliard
25 Aug '16
25 Aug '16
Module: wine Branch: master Commit: f68e131e88173bce0cc16a2a46dcdb277fd60e97 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f68e131e88173bce0cc16a2a4…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Aug 24 10:14:22 2016 -0500 winemac.drv: Fix setting Cocoa focus when window is shown by other thread. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winemac.drv/window.c | 48 ++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index db1e528..73025d7 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -45,9 +45,6 @@ static CFMutableDictionaryRef win_datas; static DWORD activate_on_focus_time; -void CDECL macdrv_SetFocus(HWND hwnd); - - /*********************************************************************** * get_cocoa_window_features */ @@ -834,6 +831,27 @@ static struct macdrv_win_data *macdrv_create_win_data(HWND hwnd, const RECT *win /*********************************************************************** + * set_focus + */ +static void set_focus(HWND hwnd) +{ + struct macdrv_win_data *data; + + if (!(hwnd = GetAncestor(hwnd, GA_ROOT))) return; + if (!(data = get_win_data(hwnd))) return; + + if (data->cocoa_window && data->on_screen) + { + BOOL activate = activate_on_focus_time && (GetTickCount() - activate_on_focus_time < 2000); + /* Set Mac focus */ + macdrv_give_cocoa_window_focus(data->cocoa_window, activate); + activate_on_focus_time = 0; + } + + release_win_data(data); +} + +/*********************************************************************** * show_window */ static void show_window(struct macdrv_win_data *data) @@ -845,7 +863,7 @@ static void show_window(struct macdrv_win_data *data) macdrv_window prev_window = NULL; macdrv_window next_window = NULL; BOOL activate = FALSE; - HWND hwndFocus; + GUITHREADINFO info; /* find window that this one must be after */ prev = GetWindow(data->hwnd, GW_HWNDPREV); @@ -869,9 +887,10 @@ static void show_window(struct macdrv_win_data *data) macdrv_order_cocoa_window(data->cocoa_window, prev_window, next_window, activate); data->on_screen = TRUE; - hwndFocus = GetFocus(); - if (hwndFocus && (data->hwnd == hwndFocus || IsChild(data->hwnd, hwndFocus))) - macdrv_SetFocus(hwndFocus); + info.cbSize = sizeof(info); + if (GetGUIThreadInfo(GetWindowThreadProcessId(data->hwnd, NULL), &info) && info.hwndFocus && + (data->hwnd == info.hwndFocus || IsChild(data->hwnd, info.hwndFocus))) + set_focus(info.hwndFocus); if (activate) activate_on_focus_time = 0; } @@ -1495,25 +1514,12 @@ void CDECL macdrv_DestroyWindow(HWND hwnd) void CDECL macdrv_SetFocus(HWND hwnd) { struct macdrv_thread_data *thread_data = macdrv_thread_data(); - struct macdrv_win_data *data; TRACE("%p\n", hwnd); if (!thread_data) return; thread_data->dead_key_state = 0; - - if (!(hwnd = GetAncestor(hwnd, GA_ROOT))) return; - if (!(data = get_win_data(hwnd))) return; - - if (data->cocoa_window && data->on_screen) - { - BOOL activate = activate_on_focus_time && (GetTickCount() - activate_on_focus_time < 2000); - /* Set Mac focus */ - macdrv_give_cocoa_window_focus(data->cocoa_window, activate); - activate_on_focus_time = 0; - } - - release_win_data(data); + set_focus(hwnd); }
1
0
0
0
Huw Davies : ucrtbase: Add __stdio_common_vfscanf().
by Alexandre Julliard
25 Aug '16
25 Aug '16
Module: wine Branch: master Commit: fc64e2bfa6a1a8d0ac6aebdaa27ac5ac6803794b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fc64e2bfa6a1a8d0ac6aebdaa…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Aug 24 12:58:32 2016 +0100 ucrtbase: Add __stdio_common_vfscanf(). Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-crt-stdio-l1-1-0.spec | 2 +- dlls/msvcrt/scanf.c | 17 +++++++++++++++++ dlls/ucrtbase/ucrtbase.spec | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/api-ms-win-crt-stdio-l1-1-0/api-ms-win-crt-stdio-l1-1-0.spec b/dlls/api-ms-win-crt-stdio-l1-1-0/api-ms-win-crt-stdio-l1-1-0.spec index af723f7..4b8be01 100644 --- a/dlls/api-ms-win-crt-stdio-l1-1-0/api-ms-win-crt-stdio-l1-1-0.spec +++ b/dlls/api-ms-win-crt-stdio-l1-1-0/api-ms-win-crt-stdio-l1-1-0.spec @@ -4,7 +4,7 @@ @ cdecl __stdio_common_vfprintf(int64 ptr str ptr ptr) ucrtbase.__stdio_common_vfprintf @ stub __stdio_common_vfprintf_p @ stub __stdio_common_vfprintf_s -@ stub __stdio_common_vfscanf +@ cdecl __stdio_common_vfscanf(int64 ptr str ptr ptr) ucrtbase.__stdio_common_vfscanf @ cdecl __stdio_common_vfwprintf(int64 ptr wstr ptr ptr) ucrtbase.__stdio_common_vfwprintf @ stub __stdio_common_vfwprintf_p @ stub __stdio_common_vfwprintf_s diff --git a/dlls/msvcrt/scanf.c b/dlls/msvcrt/scanf.c index 093424a..3642307 100644 --- a/dlls/msvcrt/scanf.c +++ b/dlls/msvcrt/scanf.c @@ -703,6 +703,23 @@ int CDECL MSVCRT__stdio_common_vswscanf(unsigned __int64 options, } /********************************************************************* + * __stdio_common_vfscanf (MSVCRT.@) + */ +int CDECL MSVCRT__stdio_common_vfscanf(unsigned __int64 options, + MSVCRT_FILE *file, + const char *format, + MSVCRT__locale_t locale, + __ms_va_list valist) +{ + if (options & ~UCRTBASE_SCANF_SECURECRT) + FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); + if (options & UCRTBASE_SCANF_SECURECRT) + return MSVCRT_vfscanf_s_l(file, format, locale, valist); + else + return MSVCRT_vfscanf_l(file, format, locale, valist); +} + +/********************************************************************* * __stdio_common_vfwscanf (MSVCRT.@) */ int CDECL MSVCRT__stdio_common_vfwscanf(unsigned __int64 options, diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 6ec16d9..07eb7e1 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -149,7 +149,7 @@ @ cdecl __stdio_common_vfprintf(int64 ptr str ptr ptr) MSVCRT__stdio_common_vfprintf @ stub __stdio_common_vfprintf_p @ stub __stdio_common_vfprintf_s -@ stub __stdio_common_vfscanf +@ cdecl __stdio_common_vfscanf(int64 ptr str ptr ptr) MSVCRT__stdio_common_vfscanf @ cdecl __stdio_common_vfwprintf(int64 ptr wstr ptr ptr) MSVCRT__stdio_common_vfwprintf @ stub __stdio_common_vfwprintf_p @ stub __stdio_common_vfwprintf_s
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
78
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
Results per page:
10
25
50
100
200