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
January 2022
----- 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
726 discussions
Start a n
N
ew thread
Paul Gofman : concrt140: Add ?_Byte_reverse_table@details@Concurrency@@3QBEB data export.
by Alexandre Julliard
19 Jan '22
19 Jan '22
Module: wine Branch: master Commit: b3698977a5330f950c05449d22255b4c5190d65a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b3698977a5330f950c05449d…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Jan 19 19:50:32 2022 +0300 concrt140: Add ?_Byte_reverse_table@details@Concurrency@@3QBEB data export. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/concrt140/concrt140.spec | 2 +- dlls/concrt140/details.c | 21 +++++++++++++++++++++ dlls/concrt140/tests/concrt140.c | 24 ++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/dlls/concrt140/concrt140.spec b/dlls/concrt140/concrt140.spec index 364a1ad8d84..50db9348327 100644 --- a/dlls/concrt140/concrt140.spec +++ b/dlls/concrt140/concrt140.spec @@ -433,7 +433,7 @@ @ stub -arch=arm ?_Assign@_Concurrent_queue_iterator_base_v4@details@Concurrency@@IAAXABV123@@Z @ stub -arch=i386 ?_Assign@_Concurrent_queue_iterator_base_v4@details@Concurrency@@IAEXABV123@@Z @ stub -arch=win64 ?_Assign@_Concurrent_queue_iterator_base_v4@details@Concurrency@@IEAAXAEBV123@@Z -# extern ?_Byte_reverse_table@details@Concurrency@@3QBEB +@ extern ?_Byte_reverse_table@details@Concurrency@@3QBEB byte_reverse_table @ stub -arch=arm ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QAAXXZ @ stub -arch=i386 ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QEAAXXZ diff --git a/dlls/concrt140/details.c b/dlls/concrt140/details.c index 27cdd911ad2..13a2fbbca96 100644 --- a/dlls/concrt140/details.c +++ b/dlls/concrt140/details.c @@ -1110,3 +1110,24 @@ void init_concurrency_details(void *base) init__Runtime_object_rtti(base); #endif } + +/* ?_Byte_reverse_table@details@Concurrency@@3QBEB */ +const BYTE byte_reverse_table[256] = +{ + 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, + 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, + 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, + 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, + 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, + 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, + 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, + 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, + 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, + 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, + 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, + 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, + 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, + 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, + 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, + 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff, +}; diff --git a/dlls/concrt140/tests/concrt140.c b/dlls/concrt140/tests/concrt140.c index 55b200c6c78..7b3300a3d59 100644 --- a/dlls/concrt140/tests/concrt140.c +++ b/dlls/concrt140/tests/concrt140.c @@ -90,6 +90,8 @@ static void (__thiscall *p__Timer_dtor)(_Timer*); static void (__thiscall *p__Timer__Start)(_Timer*); static void (__thiscall *p__Timer__Stop)(_Timer*); +static const BYTE *p_byte_reverse_table; + #define SETNOFAIL(x,y) x = (void*)GetProcAddress(module,y) #define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0) @@ -142,6 +144,7 @@ static BOOL init(void) } init_thiscall_thunk(); + SET(p_byte_reverse_table, "?_Byte_reverse_table@details@Concurrency@@3QBEB"); return TRUE; } @@ -217,9 +220,30 @@ static void test_Timer(void) CloseHandle(callback_called); } +static BYTE byte_reverse(BYTE b) +{ + b = ((b & 0xf0) >> 4) | ((b & 0x0f) << 4); + b = ((b & 0xcc) >> 2) | ((b & 0x33) << 2); + b = ((b & 0xaa) >> 1) | ((b & 0x55) << 1); + return b; +} + +static void test_data_exports(void) +{ + unsigned int i; + + ok(IsBadWritePtr((BYTE *)p_byte_reverse_table, 256), "byte_reverse_table is writeable.\n"); + for (i = 0; i < 256; ++i) + { + ok(p_byte_reverse_table[i] == byte_reverse(i), "Got unexpected byte %#x, expected %#x.\n", + p_byte_reverse_table[i], byte_reverse(i)); + } +} + START_TEST(concrt140) { if (!init()) return; test_CurrentContext(); test_Timer(); + test_data_exports(); }
1
0
0
0
Michael Stefaniuc : dmsynth: Disconnect old sink, addref and init new sink.
by Alexandre Julliard
19 Jan '22
19 Jan '22
Module: wine Branch: master Commit: 6c73c3166bf7a982da276a893af32173bc96b0d6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6c73c3166bf7a982da276a89…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Jan 19 18:48:50 2022 +0100 dmsynth: Disconnect old sink, addref and init new sink. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmsynth/synth.c | 21 +++++++++++++++++---- dlls/dmsynth/tests/dmsynth.c | 12 ++++++++++-- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index 7c573ca708c..3d3af80d005 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -362,15 +362,28 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_SetSynthSink(IDirectMusicSynth8 *if IDirectMusicSynthSink *sink) { IDirectMusicSynth8Impl *This = impl_from_IDirectMusicSynth8(iface); + HRESULT hr; TRACE("(%p)->(%p)\n", iface, sink); - This->sink = sink; + if (sink == This->sink) + return S_OK; + + if (!sink || This->sink) { + /* Disconnect the sink */ + if (This->latency_clock) + IReferenceClock_Release(This->latency_clock); + IDirectMusicSynthSink_Release(This->sink); + } - if (sink) - return IDirectMusicSynthSink_GetLatencyClock(sink, &This->latency_clock); + This->sink = sink; + if (!sink) + return S_OK; - return S_OK; + IDirectMusicSynthSink_AddRef(This->sink); + if (FAILED(hr = IDirectMusicSynthSink_Init(sink, (IDirectMusicSynth *)iface))) + return hr; + return IDirectMusicSynthSink_GetLatencyClock(sink, &This->latency_clock); } static HRESULT WINAPI IDirectMusicSynth8Impl_Render(IDirectMusicSynth8 *iface, short *buffer, diff --git a/dlls/dmsynth/tests/dmsynth.c b/dlls/dmsynth/tests/dmsynth.c index bb42553469b..1e3e20829b7 100644 --- a/dlls/dmsynth/tests/dmsynth.c +++ b/dlls/dmsynth/tests/dmsynth.c @@ -54,7 +54,7 @@ static ULONG get_refcount(void *iface) static void test_dmsynth(void) { IDirectMusicSynth *dmsynth = NULL; - IDirectMusicSynthSink *dmsynth_sink = NULL; + IDirectMusicSynthSink *dmsynth_sink = NULL, *dmsynth_sink2 = NULL; IReferenceClock* clock_synth = NULL; IReferenceClock* clock_sink = NULL; IKsControl* control_synth = NULL; @@ -68,7 +68,11 @@ static void test_dmsynth(void) hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynth, (LPVOID*)&dmsynth); ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr); - hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynthSink, (LPVOID*)&dmsynth_sink); + hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynthSink, + (void **)&dmsynth_sink); + ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr); + hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynthSink, + (void **)&dmsynth_sink2); ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr); hr = IDirectMusicSynth_QueryInterface(dmsynth, &IID_IKsControl, (LPVOID*)&control_synth); @@ -127,6 +131,8 @@ static void test_dmsynth(void) ref_clock_sink = get_refcount(clock_sink); /* This will Init() the SynthSink and finish initializing the Synth */ + hr = IDirectMusicSynth_SetSynthSink(dmsynth, dmsynth_sink2); + ok(hr == S_OK, "IDirectMusicSynth_SetSynthSink returned: %x\n", hr); hr = IDirectMusicSynth_SetSynthSink(dmsynth, dmsynth_sink); ok(hr == S_OK, "IDirectMusicSynth_SetSynthSink returned: %x\n", hr); @@ -148,6 +154,8 @@ static void test_dmsynth(void) IReferenceClock_Release(clock_sink); if (dmsynth_sink) IDirectMusicSynthSink_Release(dmsynth_sink); + if (dmsynth_sink2) + IDirectMusicSynthSink_Release(dmsynth_sink2); IDirectMusicSynth_Release(dmsynth); }
1
0
0
0
Michael Stefaniuc : dmsynth: Avoid hungarian notation in the synth object.
by Alexandre Julliard
19 Jan '22
19 Jan '22
Module: wine Branch: master Commit: 00eaccda845468b658cf558daffa8812306ee5c7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=00eaccda845468b658cf558d…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Jan 19 18:48:49 2022 +0100 dmsynth: Avoid hungarian notation in the synth object. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmsynth/dmsynth_private.h | 4 ++-- dlls/dmsynth/synth.c | 34 +++++++++++++++++----------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/dlls/dmsynth/dmsynth_private.h b/dlls/dmsynth/dmsynth_private.h index 9ad06dff5dd..22d020992b8 100644 --- a/dlls/dmsynth/dmsynth_private.h +++ b/dlls/dmsynth/dmsynth_private.h @@ -62,9 +62,9 @@ struct IDirectMusicSynth8Impl { LONG ref; /* IDirectMusicSynth8 fields */ - DMUS_PORTCAPS pCaps; + DMUS_PORTCAPS caps; BOOL active; - IReferenceClock* pLatencyClock; + IReferenceClock *latency_clock; IDirectMusicSynthSink *sink; }; diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index bd1ee201165..7c573ca708c 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -84,8 +84,8 @@ static ULONG WINAPI IDirectMusicSynth8Impl_Release(IDirectMusicSynth8 *iface) TRACE("(%p)->(): new ref = %u\n", This, ref); if (!ref) { - if (This->pLatencyClock) - IReferenceClock_Release(This->pLatencyClock); + if (This->latency_clock) + IReferenceClock_Release(This->latency_clock); HeapFree(GetProcessHeap(), 0, This); DMSYNTH_UnlockModule(); } @@ -295,7 +295,7 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_GetPortCaps(IDirectMusicSynth8 *ifa TRACE("(%p)->(%p)\n", This, caps); - *caps = This->pCaps; + *caps = This->caps; return S_OK; } @@ -323,8 +323,8 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_GetLatencyClock(IDirectMusicSynth8 if (!This->sink) return DMUS_E_NOSYNTHSINK; - *clock = This->pLatencyClock; - IReferenceClock_AddRef(This->pLatencyClock); + *clock = This->latency_clock; + IReferenceClock_AddRef(This->latency_clock); return S_OK; } @@ -368,7 +368,7 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_SetSynthSink(IDirectMusicSynth8 *if This->sink = sink; if (sink) - return IDirectMusicSynthSink_GetLatencyClock(sink, &This->pLatencyClock); + return IDirectMusicSynthSink_GetLatencyClock(sink, &This->latency_clock); return S_OK; } @@ -627,17 +627,17 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSynthImpl(REFIID riid, void **ppobj) obj->IKsControl_iface.lpVtbl = &DMSynthImpl_IKsControl_Vtbl; obj->ref = 1; /* fill in caps */ - obj->pCaps.dwSize = sizeof(DMUS_PORTCAPS); - obj->pCaps.dwFlags = DMUS_PC_DLS | DMUS_PC_SOFTWARESYNTH | DMUS_PC_DIRECTSOUND | DMUS_PC_DLS2 | DMUS_PC_AUDIOPATH | DMUS_PC_WAVE; - obj->pCaps.guidPort = CLSID_DirectMusicSynth; - obj->pCaps.dwClass = DMUS_PC_OUTPUTCLASS; - obj->pCaps.dwType = DMUS_PORT_USER_MODE_SYNTH; - obj->pCaps.dwMemorySize = DMUS_PC_SYSTEMMEMORY; - obj->pCaps.dwMaxChannelGroups = 1000; - obj->pCaps.dwMaxVoices = 1000; - obj->pCaps.dwMaxAudioChannels = 2; - obj->pCaps.dwEffectFlags = DMUS_EFFECT_REVERB; - lstrcpyW(obj->pCaps.wszDescription, L"Microsoft Synthesizer"); + obj->caps.dwSize = sizeof(DMUS_PORTCAPS); + obj->caps.dwFlags = DMUS_PC_DLS | DMUS_PC_SOFTWARESYNTH | DMUS_PC_DIRECTSOUND | DMUS_PC_DLS2 | DMUS_PC_AUDIOPATH | DMUS_PC_WAVE; + obj->caps.guidPort = CLSID_DirectMusicSynth; + obj->caps.dwClass = DMUS_PC_OUTPUTCLASS; + obj->caps.dwType = DMUS_PORT_USER_MODE_SYNTH; + obj->caps.dwMemorySize = DMUS_PC_SYSTEMMEMORY; + obj->caps.dwMaxChannelGroups = 1000; + obj->caps.dwMaxVoices = 1000; + obj->caps.dwMaxAudioChannels = 2; + obj->caps.dwEffectFlags = DMUS_EFFECT_REVERB; + lstrcpyW(obj->caps.wszDescription, L"Microsoft Synthesizer"); DMSYNTH_LockModule(); hr = IDirectMusicSynth8_QueryInterface(&obj->IDirectMusicSynth8_iface, riid, ppobj);
1
0
0
0
Michael Stefaniuc : dmsynth: Activate the sink from the synth Activate() method.
by Alexandre Julliard
19 Jan '22
19 Jan '22
Module: wine Branch: master Commit: 5d687a23e43754715c5f0504f1369aa5c181b661 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5d687a23e43754715c5f0504…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Jan 19 18:48:48 2022 +0100 dmsynth: Activate the sink from the synth Activate() method. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmsynth/dmsynth_private.h | 2 +- dlls/dmsynth/synth.c | 20 +++++++++++++++++++- dlls/dmsynth/tests/dmsynth.c | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/dlls/dmsynth/dmsynth_private.h b/dlls/dmsynth/dmsynth_private.h index 32a79f65dd3..9ad06dff5dd 100644 --- a/dlls/dmsynth/dmsynth_private.h +++ b/dlls/dmsynth/dmsynth_private.h @@ -63,7 +63,7 @@ struct IDirectMusicSynth8Impl { /* IDirectMusicSynth8 fields */ DMUS_PORTCAPS pCaps; - BOOL fActive; + BOOL active; IReferenceClock* pLatencyClock; IDirectMusicSynthSink *sink; }; diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index 4d71bc738c1..bd1ee201165 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -332,10 +332,28 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_GetLatencyClock(IDirectMusicSynth8 static HRESULT WINAPI IDirectMusicSynth8Impl_Activate(IDirectMusicSynth8 *iface, BOOL enable) { IDirectMusicSynth8Impl *This = impl_from_IDirectMusicSynth8(iface); + HRESULT hr; TRACE("(%p)->(%d)\n", This, enable); - This->fActive = enable; + if (!This->sink) + return DMUS_E_NOSYNTHSINK; + + if (enable == This->active) { + if (enable) + return DMUS_E_SYNTHACTIVE; + else + return S_FALSE; + } + + if ((hr = IDirectMusicSynthSink_Activate(This->sink, enable)) != S_OK) { + if (hr == DMUS_E_SYNTHACTIVE || hr == S_FALSE) + WARN("Synth and sink active state out of sync. Fixing.\n"); + else + return hr; + } + + This->active = enable; return S_OK; } diff --git a/dlls/dmsynth/tests/dmsynth.c b/dlls/dmsynth/tests/dmsynth.c index 3970933cb6f..bb42553469b 100644 --- a/dlls/dmsynth/tests/dmsynth.c +++ b/dlls/dmsynth/tests/dmsynth.c @@ -114,7 +114,7 @@ static void test_dmsynth(void) /* Synth isn't fully initialized yet */ hr = IDirectMusicSynth_Activate(dmsynth, TRUE); - todo_wine ok(hr == DMUS_E_NOSYNTHSINK, "IDirectMusicSynth_Activate returned: %x\n", hr); + ok(hr == DMUS_E_NOSYNTHSINK, "IDirectMusicSynth_Activate returned: %x\n", hr); /* Synth has no default clock */ hr = IDirectMusicSynth_GetLatencyClock(dmsynth, &clock_synth);
1
0
0
0
Michael Stefaniuc : dmsynth: Drop "synth" from the synth_sink field.
by Alexandre Julliard
19 Jan '22
19 Jan '22
Module: wine Branch: master Commit: 3292bc29657af0a2c7bb06617426fab4a43a8cdd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3292bc29657af0a2c7bb0661…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Jan 19 18:48:47 2022 +0100 dmsynth: Drop "synth" from the synth_sink field. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmsynth/dmsynth_private.h | 2 +- dlls/dmsynth/synth.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/dmsynth/dmsynth_private.h b/dlls/dmsynth/dmsynth_private.h index bcc866e879e..32a79f65dd3 100644 --- a/dlls/dmsynth/dmsynth_private.h +++ b/dlls/dmsynth/dmsynth_private.h @@ -65,7 +65,7 @@ struct IDirectMusicSynth8Impl { DMUS_PORTCAPS pCaps; BOOL fActive; IReferenceClock* pLatencyClock; - IDirectMusicSynthSink *synth_sink; + IDirectMusicSynthSink *sink; }; /***************************************************************************** diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index 19789b5a256..4d71bc738c1 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -320,7 +320,7 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_GetLatencyClock(IDirectMusicSynth8 if (!clock) return E_POINTER; - if (!This->synth_sink) + if (!This->sink) return DMUS_E_NOSYNTHSINK; *clock = This->pLatencyClock; @@ -341,16 +341,16 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_Activate(IDirectMusicSynth8 *iface, } static HRESULT WINAPI IDirectMusicSynth8Impl_SetSynthSink(IDirectMusicSynth8 *iface, - IDirectMusicSynthSink *synth_sink) + IDirectMusicSynthSink *sink) { IDirectMusicSynth8Impl *This = impl_from_IDirectMusicSynth8(iface); - TRACE("(%p)->(%p)\n", iface, synth_sink); + TRACE("(%p)->(%p)\n", iface, sink); - This->synth_sink = synth_sink; + This->sink = sink; - if (synth_sink) - return IDirectMusicSynthSink_GetLatencyClock(synth_sink, &This->pLatencyClock); + if (sink) + return IDirectMusicSynthSink_GetLatencyClock(sink, &This->pLatencyClock); return S_OK; }
1
0
0
0
Tim Clem : winemac.drv: Don't activate the app if its first window is WS_EX_NOACTIVATE.
by Alexandre Julliard
19 Jan '22
19 Jan '22
Module: wine Branch: master Commit: 8dae8ad8d8801fe6eceec0eff16239aed24b7f7d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8dae8ad8d8801fe6eceec0ef…
Author: Tim Clem <tclem(a)codeweavers.com> Date: Wed Jan 19 11:13:45 2022 -0800 winemac.drv: Don't activate the app if its first window is WS_EX_NOACTIVATE. This matches the behavior on Windows. Signed-off-by: Tim Clem <tclem(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winemac.drv/cocoa_app.h | 2 +- dlls/winemac.drv/cocoa_app.m | 9 ++++++--- dlls/winemac.drv/cocoa_window.h | 2 ++ dlls/winemac.drv/cocoa_window.m | 9 ++++++--- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/dlls/winemac.drv/cocoa_app.h b/dlls/winemac.drv/cocoa_app.h index 0b70a2fd55b..0689c22ec32 100644 --- a/dlls/winemac.drv/cocoa_app.h +++ b/dlls/winemac.drv/cocoa_app.h @@ -142,7 +142,7 @@ enum { + (WineApplicationController*) sharedController; - - (void) transformProcessToForeground; + - (void) transformProcessToForeground:(BOOL)activateIfTransformed; - (BOOL) registerEventQueue:(WineEventQueue*)queue; - (void) unregisterEventQueue:(WineEventQueue*)queue; diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m index 16a773e1470..8b6a1779b84 100644 --- a/dlls/winemac.drv/cocoa_app.m +++ b/dlls/winemac.drv/cocoa_app.m @@ -237,7 +237,7 @@ static NSString* WineLocalizedString(unsigned int stringID) [super dealloc]; } - - (void) transformProcessToForeground + - (void) transformProcessToForeground:(BOOL)activateIfTransformed { if ([NSApp activationPolicy] != NSApplicationActivationPolicyRegular) { @@ -248,7 +248,10 @@ static NSString* WineLocalizedString(unsigned int stringID) NSMenuItem* item; [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; - [NSApp activateIgnoringOtherApps:YES]; + + if (activateIfTransformed) + [NSApp activateIgnoringOtherApps:YES]; + #if defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 if (!enable_app_nap && [NSProcessInfo instancesRespondToSelector:@selector(beginActivityWithOptions:reason:)]) { @@ -884,7 +887,7 @@ static NSString* WineLocalizedString(unsigned int stringID) if (!modes.count) return FALSE; - [self transformProcessToForeground]; + [self transformProcessToForeground:YES]; BOOL active = [NSApp isActive]; diff --git a/dlls/winemac.drv/cocoa_window.h b/dlls/winemac.drv/cocoa_window.h index c7bcaedfd97..a83f2aa803b 100644 --- a/dlls/winemac.drv/cocoa_window.h +++ b/dlls/winemac.drv/cocoa_window.h @@ -28,6 +28,7 @@ { BOOL disabled; BOOL noForeground; + BOOL preventsAppActivation; BOOL floating; BOOL resizable; BOOL maximized; @@ -91,6 +92,7 @@ @property (retain, readonly, nonatomic) WineEventQueue* queue; @property (readonly, nonatomic) BOOL disabled; @property (readonly, nonatomic) BOOL noForeground; +@property (readonly, nonatomic) BOOL preventsAppActivation; @property (readonly, nonatomic) BOOL floating; @property (readonly, getter=isFullscreen, nonatomic) BOOL fullscreen; @property (readonly, getter=isFakingClose, nonatomic) BOOL fakingClose; diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index 6301b47143e..bfa7e2fe8cc 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -391,6 +391,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi @property (readwrite, nonatomic) BOOL disabled; @property (readwrite, nonatomic) BOOL noForeground; +@property (readwrite, nonatomic) BOOL preventsAppActivation; @property (readwrite, nonatomic) BOOL floating; @property (readwrite, nonatomic) BOOL drawnSinceShown; @property (readwrite, nonatomic) BOOL closing; @@ -954,7 +955,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi static WineWindow* causing_becomeKeyWindow; - @synthesize disabled, noForeground, floating, fullscreen, fakingClose, closing, latentParentWindow, hwnd, queue; + @synthesize disabled, noForeground, preventsAppActivation, floating, fullscreen, fakingClose, closing, latentParentWindow, hwnd, queue; @synthesize drawnSinceShown; @synthesize surface, surface_mutex; @synthesize shapeChangedSinceLastDraw; @@ -1143,6 +1144,8 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi NSUInteger currentStyle = [self styleMask]; NSUInteger newStyle = style_mask_for_features(wf) | (currentStyle & ~usedStyles); + self.preventsAppActivation = wf->prevents_app_activation; + if (newStyle != currentStyle) { NSString* title = [[[self title] copy] autorelease]; @@ -1686,7 +1689,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi WineWindow* parent; WineWindow* child; - [controller transformProcessToForeground]; + [controller transformProcessToForeground:!self.preventsAppActivation]; if ([NSApp isHidden]) [NSApp unhide:nil]; wasVisible = [self isVisible]; @@ -2056,7 +2059,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi { if (activate) { - [[WineApplicationController sharedController] transformProcessToForeground]; + [[WineApplicationController sharedController] transformProcessToForeground:YES]; [NSApp activateIgnoringOtherApps:YES]; }
1
0
0
0
Tim Clem : winemac.drv: Use Cocoa nonactivating panels for WS_EX_NOACTIVATE windows.
by Alexandre Julliard
19 Jan '22
19 Jan '22
Module: wine Branch: master Commit: e58b1a2b395b56859157e7dd8d08cca4448f66c9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e58b1a2b395b56859157e7dd…
Author: Tim Clem <tclem(a)codeweavers.com> Date: Wed Jan 19 11:13:44 2022 -0800 winemac.drv: Use Cocoa nonactivating panels for WS_EX_NOACTIVATE windows. NSWindowStyleMaskNonactivatingPanel is almost exactly the same behavior as WS_EX_NOACTIVATE on Windows: it prevents the window from activating the app, but does not prevent it from being focused if the app is already active. Signed-off-by: Tim Clem <tclem(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winemac.drv/cocoa_window.m | 26 +++++++++++++++++++++++++- dlls/winemac.drv/macdrv_cocoa.h | 1 + dlls/winemac.drv/window.c | 2 ++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index 2e15ec8ce72..6301b47143e 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -44,6 +44,16 @@ enum { #endif +@interface NSWindow (PrivatePreventsActivation) + +/* Needed to ensure proper behavior after adding or removing + * NSWindowStyleMaskNonactivatingPanel. + * Available since at least macOS 10.6. */ +- (void)_setPreventsActivation:(BOOL)flag; + +@end + + static NSUInteger style_mask_for_features(const struct macdrv_window_features* wf) { NSUInteger style_mask; @@ -58,6 +68,8 @@ static NSUInteger style_mask_for_features(const struct macdrv_window_features* w } else style_mask = NSWindowStyleMaskBorderless; + if (wf->prevents_app_activation) style_mask |= NSWindowStyleMaskNonactivatingPanel; + return style_mask; } @@ -1126,7 +1138,8 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi - (void) setWindowFeatures:(const struct macdrv_window_features*)wf { static const NSUInteger usedStyles = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskMiniaturizable | - NSWindowStyleMaskResizable | NSWindowStyleMaskUtilityWindow | NSWindowStyleMaskBorderless; + NSWindowStyleMaskResizable | NSWindowStyleMaskUtilityWindow | NSWindowStyleMaskBorderless | + NSWindowStyleMaskNonactivatingPanel; NSUInteger currentStyle = [self styleMask]; NSUInteger newStyle = style_mask_for_features(wf) | (currentStyle & ~usedStyles); @@ -1146,6 +1159,17 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi } [self setStyleMask:newStyle]; + BOOL isNonActivating = (currentStyle & NSWindowStyleMaskNonactivatingPanel) != 0; + BOOL shouldBeNonActivating = (newStyle & NSWindowStyleMaskNonactivatingPanel) != 0; + if (isNonActivating != shouldBeNonActivating) { + // Changing NSWindowStyleMaskNonactivatingPanel with -setStyleMask is also + // buggy. If it's added, clicking the title bar will still activate the + // app. If it's removed, nothing changes at all. + // This private method ensures the correct behavior. + if ([self respondsToSelector:@selector(_setPreventsActivation:)]) + [self _setPreventsActivation:shouldBeNonActivating]; + } + // -setStyleMask: resets the firstResponder to the window. Set it // back to the content view. if ([[self contentView] acceptsFirstResponder]) diff --git a/dlls/winemac.drv/macdrv_cocoa.h b/dlls/winemac.drv/macdrv_cocoa.h index 2304f771bfa..5c19b4f4e81 100644 --- a/dlls/winemac.drv/macdrv_cocoa.h +++ b/dlls/winemac.drv/macdrv_cocoa.h @@ -538,6 +538,7 @@ struct macdrv_window_features { unsigned int maximize_button:1; unsigned int utility:1; unsigned int shadow:1; + unsigned int prevents_app_activation:1; }; struct macdrv_window_state { diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 6d735bb4ed2..4f3dbc08311 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -63,6 +63,8 @@ static void get_cocoa_window_features(struct macdrv_win_data *data, { memset(wf, 0, sizeof(*wf)); + if (ex_style & WS_EX_NOACTIVATE) wf->prevents_app_activation = TRUE; + if (disable_window_decorations) return; if (IsRectEmpty(window_rect)) return; if (EqualRect(window_rect, client_rect)) return;
1
0
0
0
Tim Clem : winemac.drv: Allow foregrounding WS_EX_NOACTIVATE windows.
by Alexandre Julliard
19 Jan '22
19 Jan '22
Module: wine Branch: master Commit: 4b4ebef412c43705b1af3054daa89aa28edab985 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4b4ebef412c43705b1af3054…
Author: Tim Clem <tclem(a)codeweavers.com> Date: Wed Jan 19 11:13:43 2022 -0800 winemac.drv: Allow foregrounding WS_EX_NOACTIVATE windows. The previous behavior denies any attempt to focus such windows, which is not in line with how they behave on Windows. Rename the macdrv_window_state no_activate field to no_foreground so it more accurately reflects its meaning. Signed-off-by: Tim Clem <tclem(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winemac.drv/cocoa_app.m | 2 +- dlls/winemac.drv/cocoa_window.h | 4 ++-- dlls/winemac.drv/cocoa_window.m | 14 +++++++------- dlls/winemac.drv/macdrv_cocoa.h | 2 +- dlls/winemac.drv/window.c | 14 +++++++------- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m index 1bb752d20b7..16a773e1470 100644 --- a/dlls/winemac.drv/cocoa_app.m +++ b/dlls/winemac.drv/cocoa_app.m @@ -1864,7 +1864,7 @@ static NSString* WineLocalizedString(unsigned int stringID) break; } } - if (!process && ![windowBroughtForward isKeyWindow] && !windowBroughtForward.disabled && !windowBroughtForward.noActivate) + if (!process && ![windowBroughtForward isKeyWindow] && !windowBroughtForward.disabled && !windowBroughtForward.noForeground) [self windowGotFocus:windowBroughtForward]; } diff --git a/dlls/winemac.drv/cocoa_window.h b/dlls/winemac.drv/cocoa_window.h index 9a8bbb5e255..c7bcaedfd97 100644 --- a/dlls/winemac.drv/cocoa_window.h +++ b/dlls/winemac.drv/cocoa_window.h @@ -27,7 +27,7 @@ @interface WineWindow : NSPanel <NSWindowDelegate> { BOOL disabled; - BOOL noActivate; + BOOL noForeground; BOOL floating; BOOL resizable; BOOL maximized; @@ -90,7 +90,7 @@ @property (retain, readonly, nonatomic) WineEventQueue* queue; @property (readonly, nonatomic) BOOL disabled; -@property (readonly, nonatomic) BOOL noActivate; +@property (readonly, nonatomic) BOOL noForeground; @property (readonly, nonatomic) BOOL floating; @property (readonly, getter=isFullscreen, nonatomic) BOOL fullscreen; @property (readonly, getter=isFakingClose, nonatomic) BOOL fakingClose; diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index 7708157a992..2e15ec8ce72 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -378,7 +378,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi @interface WineWindow () @property (readwrite, nonatomic) BOOL disabled; -@property (readwrite, nonatomic) BOOL noActivate; +@property (readwrite, nonatomic) BOOL noForeground; @property (readwrite, nonatomic) BOOL floating; @property (readwrite, nonatomic) BOOL drawnSinceShown; @property (readwrite, nonatomic) BOOL closing; @@ -942,7 +942,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi static WineWindow* causing_becomeKeyWindow; - @synthesize disabled, noActivate, floating, fullscreen, fakingClose, closing, latentParentWindow, hwnd, queue; + @synthesize disabled, noForeground, floating, fullscreen, fakingClose, closing, latentParentWindow, hwnd, queue; @synthesize drawnSinceShown; @synthesize surface, surface_mutex; @synthesize shapeChangedSinceLastDraw; @@ -1232,7 +1232,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi NSWindowCollectionBehavior behavior; self.disabled = state->disabled; - self.noActivate = state->no_activate; + self.noForeground = state->no_foreground; if (self.floating != state->floating) { @@ -2338,7 +2338,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi - (BOOL) canBecomeKeyWindow { if (causing_becomeKeyWindow == self) return YES; - if (self.disabled || self.noActivate) return NO; + if (self.disabled || self.noForeground) return NO; if ([self isKeyWindow]) return YES; // If a window's collectionBehavior says it participates in cycling, @@ -2406,7 +2406,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi BOOL ret = [super validateMenuItem:menuItem]; if ([menuItem action] == @selector(makeKeyAndOrderFront:)) - ret = [self isKeyWindow] || (!self.disabled && !self.noActivate); + ret = [self isKeyWindow] || (!self.disabled && !self.noForeground); if ([menuItem action] == @selector(toggleFullScreen:) && (self.disabled || maximized)) ret = NO; @@ -2421,7 +2421,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi [self orderBelow:nil orAbove:nil activate:NO]; [[self ancestorWineWindow] postBroughtForwardEvent]; - if (![self isKeyWindow] && !self.disabled && !self.noActivate) + if (![self isKeyWindow] && !self.disabled && !self.noForeground) [[WineApplicationController sharedController] windowGotFocus:self]; } @@ -2815,7 +2815,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi if (![self parentWindow]) [self postBroughtForwardEvent]; - if (!self.disabled && !self.noActivate) + if (!self.disabled && !self.noForeground) { causing_becomeKeyWindow = self; [self makeKeyWindow]; diff --git a/dlls/winemac.drv/macdrv_cocoa.h b/dlls/winemac.drv/macdrv_cocoa.h index 2c903bfb12a..2304f771bfa 100644 --- a/dlls/winemac.drv/macdrv_cocoa.h +++ b/dlls/winemac.drv/macdrv_cocoa.h @@ -542,7 +542,7 @@ struct macdrv_window_features { struct macdrv_window_state { unsigned int disabled:1; - unsigned int no_activate:1; + unsigned int no_foreground:1; unsigned int floating:1; unsigned int excluded_by_expose:1; unsigned int excluded_by_cycle:1; diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 07f04993ee8..6d735bb4ed2 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -90,17 +90,17 @@ static void get_cocoa_window_features(struct macdrv_win_data *data, /******************************************************************* - * can_activate_window + * can_window_become_foreground * - * Check if we can activate the specified window. + * Check if the specified window can become the foreground/key + * window. */ -static inline BOOL can_activate_window(HWND hwnd) +static inline BOOL can_window_become_foreground(HWND hwnd) { LONG style = GetWindowLongW(hwnd, GWL_STYLE); if (!(style & WS_VISIBLE)) return FALSE; if ((style & (WS_POPUP|WS_CHILD)) == WS_CHILD) return FALSE; - if (GetWindowLongW(hwnd, GWL_EXSTYLE) & WS_EX_NOACTIVATE) return FALSE; if (hwnd == GetDesktopWindow()) return FALSE; return !(style & WS_DISABLED); } @@ -115,7 +115,7 @@ static void get_cocoa_window_state(struct macdrv_win_data *data, { memset(state, 0, sizeof(*state)); state->disabled = (style & WS_DISABLED) != 0; - state->no_activate = !can_activate_window(data->hwnd); + state->no_foreground = !can_window_become_foreground(data->hwnd); state->floating = (ex_style & WS_EX_TOPMOST) != 0; state->excluded_by_expose = state->excluded_by_cycle = (!(ex_style & WS_EX_APPWINDOW) && @@ -2347,7 +2347,7 @@ void macdrv_window_got_focus(HWND hwnd, const macdrv_event *event) hwnd, event->window, event->window_got_focus.serial, IsWindowEnabled(hwnd), IsWindowVisible(hwnd), style, GetFocus(), GetActiveWindow(), GetForegroundWindow()); - if (can_activate_window(hwnd) && !(style & WS_MINIMIZE)) + if (can_window_become_foreground(hwnd) && !(style & WS_MINIMIZE)) { /* simulate a mouse click on the menu to find out * whether the window wants to be activated */ @@ -2570,7 +2570,7 @@ void macdrv_window_drag_begin(HWND hwnd, const macdrv_event *event) data->drag_event = drag_event; release_win_data(data); - if (!event->window_drag_begin.no_activate && can_activate_window(hwnd) && GetForegroundWindow() != hwnd) + if (!event->window_drag_begin.no_activate && can_window_become_foreground(hwnd) && GetForegroundWindow() != hwnd) { /* ask whether the window wants to be activated */ LRESULT ma = SendMessageW(hwnd, WM_MOUSEACTIVATE, (WPARAM)GetAncestor(hwnd, GA_ROOT),
1
0
0
0
Georg Lehmann : winevulkan: Update to VK spec version 1.2.203.
by Alexandre Julliard
19 Jan '22
19 Jan '22
Module: wine Branch: master Commit: b59335af2afe54bb2684d1b12c8e3606d7449346 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b59335af2afe54bb2684d1b1…
Author: Georg Lehmann <dadschoorse(a)gmail.com> Date: Tue Jan 18 22:19:36 2022 +0100 winevulkan: Update to VK spec version 1.2.203. Signed-off-by: Georg Lehmann <dadschoorse(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winevulkan/make_vulkan | 3 ++- dlls/winevulkan/vulkan_thunks.c | 34 +++++++++++++++++++++++++++++++++ dlls/winevulkan/winevulkan.json | 2 +- include/wine/vulkan.h | 42 ++++++++++++++++++++++++++++++++++++++++- 4 files changed, 78 insertions(+), 3 deletions(-) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index e9b1b456584..e548025a6ad 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -64,7 +64,7 @@ from enum import Enum LOGGER = logging.Logger("vulkan") LOGGER.addHandler(logging.StreamHandler()) -VK_XML_VERSION = "1.2.201" +VK_XML_VERSION = "1.2.203" WINE_VK_VERSION = (1, 2) # Filenames to create. @@ -109,6 +109,7 @@ UNSUPPORTED_EXTENSIONS = [ "VK_EXT_external_memory_dma_buf", "VK_EXT_image_drm_format_modifier", "VK_EXT_physical_device_drm", + "VK_GOOGLE_surfaceless_query", "VK_KHR_external_fence_fd", "VK_KHR_external_memory_fd", "VK_KHR_external_semaphore_fd", diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index 968699c2204..f41493381db 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -3632,6 +3632,22 @@ VkResult convert_VkDeviceCreateInfo_struct_chain(const void *pNext, VkDeviceCrea break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM: + { + const VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM *in = (const VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM *)in_header; + VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM *out; + + if (!(out = malloc(sizeof(*out)))) goto out_of_memory; + + out->sType = in->sType; + out->pNext = NULL; + out->fragmentDensityMapOffset = in->fragmentDensityMapOffset; + + out_header->pNext = (VkBaseOutStructure *)out; + out_header = out_header->pNext; + break; + } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES: { const VkPhysicalDeviceScalarBlockLayoutFeatures *in = (const VkPhysicalDeviceScalarBlockLayoutFeatures *)in_header; @@ -4684,6 +4700,22 @@ VkResult convert_VkDeviceCreateInfo_struct_chain(const void *pNext, VkDeviceCrea break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV: + { + const VkPhysicalDeviceLinearColorAttachmentFeaturesNV *in = (const VkPhysicalDeviceLinearColorAttachmentFeaturesNV *)in_header; + VkPhysicalDeviceLinearColorAttachmentFeaturesNV *out; + + if (!(out = malloc(sizeof(*out)))) goto out_of_memory; + + out->sType = in->sType; + out->pNext = NULL; + out->linearColorAttachment = in->linearColorAttachment; + + out_header->pNext = (VkBaseOutStructure *)out; + out_header = out_header->pNext; + break; + } + default: FIXME("Application requested a linked structure of type %u.\n", in_header->sType); } @@ -9240,6 +9272,7 @@ static const char * const vk_device_extensions[] = "VK_NV_geometry_shader_passthrough", "VK_NV_glsl_shader", "VK_NV_inherited_viewport_scissor", + "VK_NV_linear_color_attachment", "VK_NV_mesh_shader", "VK_NV_ray_tracing", "VK_NV_ray_tracing_motion_blur", @@ -9252,6 +9285,7 @@ static const char * const vk_device_extensions[] = "VK_NV_shading_rate_image", "VK_NV_viewport_array2", "VK_NV_viewport_swizzle", + "VK_QCOM_fragment_density_map_offset", "VK_QCOM_render_pass_shader_resolve", "VK_QCOM_render_pass_store_ops", "VK_QCOM_render_pass_transform", diff --git a/dlls/winevulkan/winevulkan.json b/dlls/winevulkan/winevulkan.json index 0ef3a8057ad..d8cf4b3415e 100644 --- a/dlls/winevulkan/winevulkan.json +++ b/dlls/winevulkan/winevulkan.json @@ -2,6 +2,6 @@ "file_format_version": "1.0.0", "ICD": { "library_path": ".\\winevulkan.dll", - "api_version": "1.2.201" + "api_version": "1.2.203" } } diff --git a/include/wine/vulkan.h b/include/wine/vulkan.h index 674f5b417ad..6e9d8e73727 100644 --- a/include/wine/vulkan.h +++ b/include/wine/vulkan.h @@ -486,6 +486,10 @@ #define VK_EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_EXTENSION_NAME "VK_EXT_pageable_device_local_memory" #define VK_KHR_MAINTENANCE_4_SPEC_VERSION 2 #define VK_KHR_MAINTENANCE_4_EXTENSION_NAME "VK_KHR_maintenance4" +#define VK_QCOM_FRAGMENT_DENSITY_MAP_OFFSET_SPEC_VERSION 1 +#define VK_QCOM_FRAGMENT_DENSITY_MAP_OFFSET_EXTENSION_NAME "VK_QCOM_fragment_density_map_offset" +#define VK_NV_LINEAR_COLOR_ATTACHMENT_SPEC_VERSION 1 +#define VK_NV_LINEAR_COLOR_ATTACHMENT_EXTENSION_NAME "VK_NV_linear_color_attachment" #define VK_KHR_ACCELERATION_STRUCTURE_SPEC_VERSION 13 #define VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME "VK_KHR_acceleration_structure" #define VK_KHR_RAY_TRACING_PIPELINE_SPEC_VERSION 1 @@ -507,7 +511,7 @@ #define VK_API_VERSION_1_0 VK_MAKE_API_VERSION(0, 1, 0, 0) #define VK_API_VERSION_1_1 VK_MAKE_API_VERSION(0, 1, 1, 0) #define VK_API_VERSION_1_2 VK_MAKE_API_VERSION(0, 1, 2, 0) -#define VK_HEADER_VERSION 201 +#define VK_HEADER_VERSION 203 #define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 2, VK_HEADER_VERSION) #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; #define VK_USE_64_BIT_PTR_DEFINES 0 @@ -2005,6 +2009,7 @@ static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_FRAGMENT_SHADING_RA static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR = 0x80000000ull; static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR = 0x100000000ull; static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT_KHR = 0x200000000ull; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV = 0x4000000000ull; typedef enum VkFragmentShadingRateCombinerOpKHR { @@ -2092,6 +2097,7 @@ typedef VkGeometryTypeKHR VkGeometryTypeNV; typedef enum VkImageAspectFlagBits { + VK_IMAGE_ASPECT_NONE_KHR = 0, VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, @@ -2122,6 +2128,7 @@ typedef enum VkImageCreateFlagBits VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 0x00001000, VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV = 0x00002000, VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT = 0x00004000, + VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM = 0x00008000, VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, @@ -3566,6 +3573,10 @@ typedef enum VkStructureType VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR = 1000413001, VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR = 1000413002, VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR = 1000413003, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM = 1000425000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM = 1000425001, + VK_STRUCTURE_TYPE_SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM = 1000425002, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV = 1000430000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES, VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, @@ -6097,6 +6108,20 @@ typedef struct VkPhysicalDeviceFragmentDensityMapFeaturesEXT VkBool32 fragmentDensityMapNonSubsampledImages; } VkPhysicalDeviceFragmentDensityMapFeaturesEXT; +typedef struct VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM +{ + VkStructureType sType; + void *pNext; + VkBool32 fragmentDensityMapOffset; +} VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM; + +typedef struct VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM +{ + VkStructureType sType; + void *pNext; + VkExtent2D fragmentDensityOffsetGranularity; +} VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM; + typedef struct VkPhysicalDeviceFragmentDensityMapPropertiesEXT { VkStructureType sType; @@ -6425,6 +6450,13 @@ typedef struct VkPhysicalDeviceLineRasterizationPropertiesEXT uint32_t lineSubPixelPrecisionBits; } VkPhysicalDeviceLineRasterizationPropertiesEXT; +typedef struct VkPhysicalDeviceLinearColorAttachmentFeaturesNV +{ + VkStructureType sType; + void *pNext; + VkBool32 linearColorAttachment; +} VkPhysicalDeviceLinearColorAttachmentFeaturesNV; + typedef struct VkPhysicalDeviceMaintenance3Properties { VkStructureType sType; @@ -8381,6 +8413,14 @@ typedef struct VkSubpassEndInfo } VkSubpassEndInfo; typedef VkSubpassEndInfo VkSubpassEndInfoKHR; +typedef struct VkSubpassFragmentDensityMapOffsetEndInfoQCOM +{ + VkStructureType sType; + const void *pNext; + uint32_t fragmentDensityOffsetCount; + const VkOffset2D *pFragmentDensityOffsets; +} VkSubpassFragmentDensityMapOffsetEndInfoQCOM; + typedef struct VkSubpassSampleLocationsEXT { uint32_t subpassIndex;
1
0
0
0
Piotr Caban : msvcrt: Fix Pi constants while computing acosf.
by Alexandre Julliard
19 Jan '22
19 Jan '22
Module: wine Branch: master Commit: 80eec636ee64e7f59d1b701a9b9e3011343a4677 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=80eec636ee64e7f59d1b701a…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Jan 19 16:20:12 2022 +0100 msvcrt: Fix Pi constants while computing acosf. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/math.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 14afad5fb45..9bb3e26570f 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -798,6 +798,7 @@ static float asinf_R(float z) float CDECL acosf( float x ) { static const double pio2_lo = 6.12323399573676603587e-17; + static const double pio2_hi = 1.57079632679489655800e+00; float z, w, s, c, df; unsigned int hx, ix; @@ -818,13 +819,13 @@ float CDECL acosf( float x ) if (ix < 0x3f000000) { if (ix <= 0x32800000) /* |x| < 2**-26 */ return M_PI_2; - return M_PI_2 - (x - (pio2_lo - x * asinf_R(x * x))); + return pio2_hi - (x - (pio2_lo - x * asinf_R(x * x))); } /* x < -0.5 */ if (hx >> 31) { z = (1 + x) * 0.5f; s = sqrtf(z); - return M_PI - 2 * (s + ((double)s * asinf_R(z))); + return 2*(pio2_hi - (s + (asinf_R(z) * s - pio2_lo))); } /* x > 0.5 */ z = (1 - x) * 0.5f;
1
0
0
0
← Newer
1
...
48
49
50
51
52
53
54
...
73
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
Results per page:
10
25
50
100
200