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
April 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
1024 discussions
Start a n
N
ew thread
Rémi Bernon : include: Remove nested namespaces in windows.gaming.input.forcefeedback.idl.
by Alexandre Julliard
20 Apr '22
20 Apr '22
Module: wine Branch: master Commit: b1998870df603ab581f26a0bcefaeedd61354523 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b1998870df603ab581f26a0b…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Apr 20 19:04:01 2022 +0200 include: Remove nested namespaces in windows.gaming.input.forcefeedback.idl. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/windows.gaming.input.forcefeedback.idl | 138 +++++++++++-------------- 1 file changed, 58 insertions(+), 80 deletions(-) diff --git a/include/windows.gaming.input.forcefeedback.idl b/include/windows.gaming.input.forcefeedback.idl index da153a3285a..39705918b6e 100644 --- a/include/windows.gaming.input.forcefeedback.idl +++ b/include/windows.gaming.input.forcefeedback.idl @@ -26,91 +26,69 @@ import "eventtoken.idl"; import "windowscontracts.idl"; import "windows.foundation.idl"; -namespace Windows { - namespace Gaming { - namespace Input { - namespace ForceFeedback { - typedef enum ForceFeedbackEffectAxes ForceFeedbackEffectAxes; - typedef enum ForceFeedbackLoadEffectResult ForceFeedbackLoadEffectResult; - interface IForceFeedbackEffect; - runtimeclass ForceFeedbackMotor; - } - } - } -} +namespace Windows.Gaming.Input.ForceFeedback { + typedef enum ForceFeedbackEffectAxes ForceFeedbackEffectAxes; + typedef enum ForceFeedbackLoadEffectResult ForceFeedbackLoadEffectResult; + interface IForceFeedbackEffect; + runtimeclass ForceFeedbackMotor; -namespace Windows { - namespace Gaming { - namespace Input { - namespace ForceFeedback { - declare { - interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Gaming.Input.ForceFeedback.ForceFeedbackLoadEffectResult>; - interface Windows.Foundation.IAsyncOperation<Windows.Gaming.Input.ForceFeedback.ForceFeedbackLoadEffectResult>; - interface Windows.Foundation.Collections.IVectorView<Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor*>; - } - } - } + declare { + interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Gaming.Input.ForceFeedback.ForceFeedbackLoadEffectResult>; + interface Windows.Foundation.IAsyncOperation<Windows.Gaming.Input.ForceFeedback.ForceFeedbackLoadEffectResult>; + interface Windows.Foundation.Collections.IVectorView<Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor *>; } -} -namespace Windows { - namespace Gaming { - namespace Input { - namespace ForceFeedback { - [ - contract(Windows.Foundation.UniversalApiContract, 3.0), - flags - ] - enum ForceFeedbackEffectAxes - { - None = 0x0, - X = 0x1, - Y = 0x2, - Z = 0x4 - }; + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + flags + ] + enum ForceFeedbackEffectAxes + { + None = 0x0, + X = 0x1, + Y = 0x2, + Z = 0x4 + }; - [contract(Windows.Foundation.UniversalApiContract, 3.0)] - enum ForceFeedbackLoadEffectResult - { - Succeeded = 0, - EffectStorageFull = 1, - EffectNotSupported = 2 - }; + [contract(Windows.Foundation.UniversalApiContract, 3.0)] + enum ForceFeedbackLoadEffectResult + { + Succeeded = 0, + EffectStorageFull = 1, + EffectNotSupported = 2 + }; - [ - contract(Windows.Foundation.UniversalApiContract, 3.0), - exclusiveto(Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor), - uuid(8d3d417c-a5ea-4516-8026-2b00f74ef6e5) - ] - interface IForceFeedbackMotor : IInspectable - { - [propget] HRESULT AreEffectsPaused([out, retval] boolean* value); - [propget] HRESULT MasterGain([out, retval] DOUBLE* value); - [propput] HRESULT MasterGain([in] DOUBLE value); - [propget] HRESULT IsEnabled([out, retval] boolean* value); - [propget] HRESULT SupportedAxes([out, retval] Windows.Gaming.Input.ForceFeedback.ForceFeedbackEffectAxes* value); - HRESULT LoadEffectAsync([in] Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect* effect, - [out, retval] Windows.Foundation.IAsyncOperation<Windows.Gaming.Input.ForceFeedback.ForceFeedbackLoadEffectResult>** async_op); - HRESULT PauseAllEffects(); - HRESULT ResumeAllEffects(); - HRESULT StopAllEffects(); - HRESULT TryDisableAsync([out, retval] Windows.Foundation.IAsyncOperation<boolean>** async_op); - HRESULT TryEnableAsync([out, retval] Windows.Foundation.IAsyncOperation<boolean>** async_op); - HRESULT TryResetAsync([out, retval] Windows.Foundation.IAsyncOperation<boolean>** async_op); - HRESULT TryUnloadEffectAsync([in] Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect* effect, - [out, retval] Windows.Foundation.IAsyncOperation<boolean>** async_op); - } + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + exclusiveto(Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor), + uuid(8d3d417c-a5ea-4516-8026-2b00f74ef6e5) + ] + interface IForceFeedbackMotor : IInspectable + { + [propget] HRESULT AreEffectsPaused([out, retval] boolean *value); + [propget] HRESULT MasterGain([out, retval] DOUBLE *value); + [propput] HRESULT MasterGain([in] DOUBLE value); + [propget] HRESULT IsEnabled([out, retval] boolean *value); + [propget] HRESULT SupportedAxes([out, retval] Windows.Gaming.Input.ForceFeedback.ForceFeedbackEffectAxes *value); + HRESULT LoadEffectAsync([in] Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect *effect, + [out, retval] Windows.Foundation.IAsyncOperation<Windows.Gaming.Input.ForceFeedback.ForceFeedbackLoadEffectResult> **async_op); + HRESULT PauseAllEffects(); + HRESULT ResumeAllEffects(); + HRESULT StopAllEffects(); + HRESULT TryDisableAsync([out, retval] Windows.Foundation.IAsyncOperation<boolean> **async_op); + HRESULT TryEnableAsync([out, retval] Windows.Foundation.IAsyncOperation<boolean> **async_op); + HRESULT TryResetAsync([out, retval] Windows.Foundation.IAsyncOperation<boolean> **async_op); + HRESULT TryUnloadEffectAsync([in] Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect *effect, + [out, retval] Windows.Foundation.IAsyncOperation<boolean> **async_op); + } - [ - contract(Windows.Foundation.UniversalApiContract, 3.0), - marshaling_behavior(agile), - threading(both) - ] - runtimeclass ForceFeedbackMotor - { - [default] interface Windows.Gaming.Input.ForceFeedback.IForceFeedbackMotor; - } - } - } + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass ForceFeedbackMotor + { + [default] interface Windows.Gaming.Input.ForceFeedback.IForceFeedbackMotor; } }
1
0
0
0
Rémi Bernon : include: Add Windows.Gaming.Input.RacingWheel runtimeclass declaration.
by Alexandre Julliard
20 Apr '22
20 Apr '22
Module: wine Branch: master Commit: 8421f1ec8bef034982ce3b953341e4f9fac50695 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8421f1ec8bef034982ce3b95…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Apr 20 19:04:00 2022 +0200 include: Add Windows.Gaming.Input.RacingWheel runtimeclass declaration. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/windows.gaming.input.idl | 113 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/include/windows.gaming.input.idl b/include/windows.gaming.input.idl index d5a652f9532..6f557883167 100644 --- a/include/windows.gaming.input.idl +++ b/include/windows.gaming.input.idl @@ -38,9 +38,11 @@ namespace Windows.Gaming.Input { typedef enum GameControllerButtonLabel GameControllerButtonLabel; typedef enum GameControllerSwitchKind GameControllerSwitchKind; typedef enum GameControllerSwitchPosition GameControllerSwitchPosition; + typedef enum RacingWheelButtons RacingWheelButtons; typedef struct ArcadeStickReading ArcadeStickReading; typedef struct GamepadReading GamepadReading; typedef struct GamepadVibration GamepadVibration; + typedef struct RacingWheelReading RacingWheelReading; interface IArcadeStick; interface IArcadeStickStatics; interface IArcadeStickStatics2; @@ -50,16 +52,21 @@ namespace Windows.Gaming.Input { interface IGamepad2; interface IGamepadStatics; interface IGamepadStatics2; + interface IRacingWheel; + interface IRacingWheelStatics; + interface IRacingWheelStatics2; interface IRawGameController; interface IRawGameController2; runtimeclass ArcadeStick; runtimeclass Gamepad; runtimeclass Headset; + runtimeclass RacingWheel; runtimeclass RawGameController; declare { interface Windows.Foundation.EventHandler<Windows.Gaming.Input.ArcadeStick *>; interface Windows.Foundation.EventHandler<Windows.Gaming.Input.Gamepad *>; + interface Windows.Foundation.EventHandler<Windows.Gaming.Input.RacingWheel *>; interface Windows.Foundation.EventHandler<Windows.Gaming.Input.RawGameController *>; interface Windows.Foundation.TypedEventHandler<Windows.Gaming.Input.IGameController *, Windows.Gaming.Input.Headset *>; interface Windows.Foundation.TypedEventHandler<Windows.Gaming.Input.IGameController *, Windows.System.UserChangedEventArgs *>; @@ -70,6 +77,10 @@ namespace Windows.Gaming.Input { interface Windows.Foundation.Collections.IIterable<Windows.Gaming.Input.Gamepad *>; interface Windows.Foundation.Collections.IVectorView<Windows.Gaming.Input.Gamepad *>; interface Windows.Foundation.Collections.IVector<Windows.Gaming.Input.Gamepad *>; + interface Windows.Foundation.Collections.IIterator<Windows.Gaming.Input.RacingWheel *>; + interface Windows.Foundation.Collections.IIterable<Windows.Gaming.Input.RacingWheel *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Gaming.Input.RacingWheel *>; + interface Windows.Foundation.Collections.IVector<Windows.Gaming.Input.RacingWheel *>; interface Windows.Foundation.Collections.IIterator<Windows.Gaming.Input.RawGameController *>; interface Windows.Foundation.Collections.IIterable<Windows.Gaming.Input.RawGameController *>; interface Windows.Foundation.Collections.IVectorView<Windows.Gaming.Input.RawGameController *>; @@ -224,6 +235,37 @@ namespace Windows.Gaming.Input { UpLeft = 8 }; + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + flags + ] + enum RacingWheelButtons + { + None = 0x0, + PreviousGear = 0x1, + NextGear = 0x2, + DPadUp = 0x4, + DPadDown = 0x8, + DPadLeft = 0x10, + DPadRight = 0x20, + Button1 = 0x40, + Button2 = 0x80, + Button3 = 0x100, + Button4 = 0x200, + Button5 = 0x400, + Button6 = 0x800, + Button7 = 0x1000, + Button8 = 0x2000, + Button9 = 0x4000, + Button10 = 0x8000, + Button11 = 0x10000, + Button12 = 0x20000, + Button13 = 0x40000, + Button14 = 0x80000, + Button15 = 0x100000, + Button16 = 0x200000, + }; + [contract(Windows.Foundation.UniversalApiContract, 3.0)] struct ArcadeStickReading { @@ -253,6 +295,19 @@ namespace Windows.Gaming.Input { DOUBLE RightTrigger; }; + [contract(Windows.Foundation.UniversalApiContract, 3.0)] + struct RacingWheelReading + { + UINT64 Timestamp; + Windows.Gaming.Input.RacingWheelButtons Buttons; + INT32 PatternShifterGear; + DOUBLE Wheel; + DOUBLE Throttle; + DOUBLE Brake; + DOUBLE Clutch; + DOUBLE Handbrake; + }; + [ contract(Windows.Foundation.UniversalApiContract, 3.0), exclusiveto(Windows.Gaming.Input.ArcadeStick), @@ -327,6 +382,50 @@ namespace Windows.Gaming.Input { HRESULT GetCurrentReading([out, retval] Windows.Gaming.Input.GamepadReading *value); } + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + exclusiveto(Windows.Gaming.Input.RacingWheel), + uuid(f546656f-e106-4c82-a90f-554012904b85) + ] + interface IRacingWheel : IInspectable + requires Windows.Gaming.Input.IGameController + { + [propget] HRESULT HasClutch([out, retval] boolean *value); + [propget] HRESULT HasHandbrake([out, retval] boolean *value); + [propget] HRESULT HasPatternShifter([out, retval] boolean *value); + [propget] HRESULT MaxPatternShifterGear([out, retval] INT32 *value); + [propget] HRESULT MaxWheelAngle([out, retval] DOUBLE *value); + [propget] HRESULT WheelMotor([out, retval] Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor **value); + HRESULT GetButtonLabel([in] Windows.Gaming.Input.RacingWheelButtons button, [out, retval] Windows.Gaming.Input.GameControllerButtonLabel *value); + HRESULT GetCurrentReading([out, retval] Windows.Gaming.Input.RacingWheelReading *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + exclusiveto(Windows.Gaming.Input.RacingWheel), + uuid(3ac12cd5-581b-4936-9f94-69f1e6514c7d) + ] + interface IRacingWheelStatics : IInspectable + { + [eventadd] HRESULT RacingWheelAdded([in] Windows.Foundation.EventHandler<RacingWheel *> *value, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT RacingWheelAdded([in] EventRegistrationToken token); + [eventadd] HRESULT RacingWheelRemoved([in] Windows.Foundation.EventHandler<RacingWheel *> *value, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT RacingWheelRemoved([in] EventRegistrationToken token); + [propget] HRESULT RacingWheels([out, retval] Windows.Foundation.Collections.IVectorView<RacingWheel *> **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + exclusiveto(Windows.Gaming.Input.RacingWheel), + uuid(e666bcaa-edfd-4323-a9f6-3c384048d1ed) + ] + interface IRacingWheelStatics2 : IInspectable + requires Windows.Gaming.Input.IRacingWheelStatics + { + HRESULT FromGameController([in] Windows.Gaming.Input.IGameController *controller, + [out, retval] Windows.Gaming.Input.RacingWheel **value); + } + [ contract(Windows.Foundation.UniversalApiContract, 4.0), exclusiveto(Windows.Gaming.Input.RawGameController), @@ -464,6 +563,20 @@ namespace Windows.Gaming.Input { [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.Gaming.Input.IGameControllerBatteryInfo; } + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + marshaling_behavior(agile), + static(Windows.Gaming.Input.IRacingWheelStatics, Windows.Foundation.UniversalApiContract, 3.0), + static(Windows.Gaming.Input.IRacingWheelStatics2, Windows.Foundation.UniversalApiContract, 4.0), + threading(both) + ] + runtimeclass RacingWheel + { + [default] interface Windows.Gaming.Input.IRacingWheel; + interface Windows.Gaming.Input.IGameController; + [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.Gaming.Input.IGameControllerBatteryInfo; + } + [ contract(Windows.Foundation.UniversalApiContract, 4.0), marshaling_behavior(agile),
1
0
0
0
Biswapriyo Nath : include: Add IArcadeStick interface in windows.gaming.input.idl.
by Alexandre Julliard
20 Apr '22
20 Apr '22
Module: wine Branch: master Commit: 38b140f69c1a3214b17097311b9c5cf11f70996e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=38b140f69c1a3214b1709731…
Author: Biswapriyo Nath <nathbappai(a)gmail.com> Date: Wed Apr 20 19:03:59 2022 +0200 include: Add IArcadeStick interface in windows.gaming.input.idl. Signed-off-by: Biswapriyo Nath <nathbappai(a)gmail.com> Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/windows.gaming.input.idl | 93 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/include/windows.gaming.input.idl b/include/windows.gaming.input.idl index 4e9bb6e2465..d5a652f9532 100644 --- a/include/windows.gaming.input.idl +++ b/include/windows.gaming.input.idl @@ -33,12 +33,17 @@ import "windows.devices.power.idl"; #endif namespace Windows.Gaming.Input { + typedef enum ArcadeStickButtons ArcadeStickButtons; typedef enum GamepadButtons GamepadButtons; typedef enum GameControllerButtonLabel GameControllerButtonLabel; typedef enum GameControllerSwitchKind GameControllerSwitchKind; typedef enum GameControllerSwitchPosition GameControllerSwitchPosition; + typedef struct ArcadeStickReading ArcadeStickReading; typedef struct GamepadReading GamepadReading; typedef struct GamepadVibration GamepadVibration; + interface IArcadeStick; + interface IArcadeStickStatics; + interface IArcadeStickStatics2; interface IGameController; interface IGameControllerBatteryInfo; interface IGamepad; @@ -47,15 +52,20 @@ namespace Windows.Gaming.Input { interface IGamepadStatics2; interface IRawGameController; interface IRawGameController2; + runtimeclass ArcadeStick; runtimeclass Gamepad; runtimeclass Headset; runtimeclass RawGameController; declare { + interface Windows.Foundation.EventHandler<Windows.Gaming.Input.ArcadeStick *>; interface Windows.Foundation.EventHandler<Windows.Gaming.Input.Gamepad *>; interface Windows.Foundation.EventHandler<Windows.Gaming.Input.RawGameController *>; interface Windows.Foundation.TypedEventHandler<Windows.Gaming.Input.IGameController *, Windows.Gaming.Input.Headset *>; interface Windows.Foundation.TypedEventHandler<Windows.Gaming.Input.IGameController *, Windows.System.UserChangedEventArgs *>; + interface Windows.Foundation.Collections.IIterator<Windows.Gaming.Input.ArcadeStick *>; + interface Windows.Foundation.Collections.IIterable<Windows.Gaming.Input.ArcadeStick *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Gaming.Input.ArcadeStick *>; interface Windows.Foundation.Collections.IIterator<Windows.Gaming.Input.Gamepad *>; interface Windows.Foundation.Collections.IIterable<Windows.Gaming.Input.Gamepad *>; interface Windows.Foundation.Collections.IVectorView<Windows.Gaming.Input.Gamepad *>; @@ -66,6 +76,27 @@ namespace Windows.Gaming.Input { interface Windows.Foundation.Collections.IVector<Windows.Gaming.Input.RawGameController *>; } + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + flags + ] + enum ArcadeStickButtons + { + None = 0x0, + StickUp = 0x1, + StickDown = 0x2, + StickLeft = 0x4, + StickRight = 0x8, + Action1 = 0x10, + Action2 = 0x20, + Action3 = 0x40, + Action4 = 0x80, + Action5 = 0x100, + Action6 = 0x200, + Special1 = 0x400, + Special2 = 0x800 + }; + [ contract(Windows.Foundation.UniversalApiContract, 1.0), flags @@ -193,6 +224,13 @@ namespace Windows.Gaming.Input { UpLeft = 8 }; + [contract(Windows.Foundation.UniversalApiContract, 3.0)] + struct ArcadeStickReading + { + UINT64 Timestamp; + Windows.Gaming.Input.ArcadeStickButtons Buttons; + }; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] struct GamepadReading { @@ -215,6 +253,47 @@ namespace Windows.Gaming.Input { DOUBLE RightTrigger; }; + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + exclusiveto(Windows.Gaming.Input.ArcadeStick), + uuid(b14a539d-befb-4c81-8051-15ecf3b13036) + ] + interface IArcadeStick : IInspectable + requires Windows.Gaming.Input.IGameController + { + HRESULT GetButtonLabel([in] Windows.Gaming.Input.ArcadeStickButtons button, + [out, retval] Windows.Gaming.Input.GameControllerButtonLabel *value); + HRESULT GetCurrentReading([out, retval] Windows.Gaming.Input.ArcadeStickReading *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + exclusiveto(Windows.Gaming.Input.ArcadeStick), + uuid(5c37b8c8-37b1-4ad8-9458-200f1a30018e) + ] + interface IArcadeStickStatics : IInspectable + { + [eventadd] HRESULT ArcadeStickAdded([in] Windows.Foundation.EventHandler<Windows.Gaming.Input.ArcadeStick *> *value, + [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT ArcadeStickAdded([in] EventRegistrationToken token); + [eventadd] HRESULT ArcadeStickRemoved([in] Windows.Foundation.EventHandler<Windows.Gaming.Input.ArcadeStick *> *value, + [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT ArcadeStickRemoved([in] EventRegistrationToken token); + [propget] HRESULT ArcadeSticks([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Gaming.Input.ArcadeStick *> **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + exclusiveto(Windows.Gaming.Input.ArcadeStick), + uuid(52b5d744-bb86-445a-b59c-596f0e2a49df) + ] + interface IArcadeStickStatics2 : IInspectable + requires Windows.Gaming.Input.IArcadeStickStatics + { + HRESULT FromGameController([in] Windows.Gaming.Input.IGameController *controller, + [out, retval] Windows.Gaming.Input.ArcadeStick **value); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), uuid(1baf6522-5f64-42c5-8267-b9fe2215bfbd) @@ -345,6 +424,20 @@ namespace Windows.Gaming.Input { HRESULT TryGetBatteryReport([out, retval] Windows.Devices.Power.BatteryReport **value); } + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + marshaling_behavior(agile), + static(Windows.Gaming.Input.IArcadeStickStatics, Windows.Foundation.UniversalApiContract, 3.0), + static(Windows.Gaming.Input.IArcadeStickStatics2, Windows.Foundation.UniversalApiContract, 4.0), + threading(both) + ] + runtimeclass ArcadeStick + { + [default] interface Windows.Gaming.Input.IArcadeStick; + interface Windows.Gaming.Input.IGameController; + [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.Gaming.Input.IGameControllerBatteryInfo; + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile),
1
0
0
0
Nikolay Sivov : wusa: Remove string duplication helper.
by Alexandre Julliard
20 Apr '22
20 Apr '22
Module: wine Branch: master Commit: 7e446ce7e7f88219de46c4b33f465d3e2b7885c6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7e446ce7e7f88219de46c4b3…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Apr 20 20:46:15 2022 +0300 wusa: Remove string duplication helper. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/wusa/main.c | 6 +++--- programs/wusa/manifest.c | 4 ++-- programs/wusa/wusa.h | 8 -------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/programs/wusa/main.c b/programs/wusa/main.c index 53534628c31..ef7302847cc 100644 --- a/programs/wusa/main.c +++ b/programs/wusa/main.c @@ -166,7 +166,7 @@ static BOOL create_directory(const WCHAR *path) static BOOL create_parent_directory(const WCHAR *filename) { - WCHAR *p, *path = strdupW(filename); + WCHAR *p, *path = wcsdup(filename); BOOL ret = FALSE; if (!path) return FALSE; @@ -430,7 +430,7 @@ static struct assembly_entry *lookup_assembly(struct list *manifest_list, struct static WCHAR *get_assembly_source(struct assembly_entry *assembly) { - WCHAR *p, *path = strdupW(assembly->filename); + WCHAR *p, *path = wcsdup(assembly->filename); if (path && (p = wcsrchr(path, '.'))) *p = 0; return path; } @@ -527,7 +527,7 @@ static WCHAR *lookup_expression(struct assembly_entry *assembly, const WCHAR *ke if (!wcsicmp(key, L"runtime.inf")) wcscat(path, L"\\inf"); else if (!wcsicmp(key, L"runtime.drivers")) wcscat(path, L"\\drivers"); else if (!wcsicmp(key, L"runtime.wbem")) wcscat(path, L"\\wbem"); - return strdupW(path); + return wcsdup(path); } static WCHAR *expand_expression(struct assembly_entry *assembly, const WCHAR *expression) diff --git a/programs/wusa/manifest.c b/programs/wusa/manifest.c index efd2845c7e2..620da4fc63b 100644 --- a/programs/wusa/manifest.c +++ b/programs/wusa/manifest.c @@ -160,7 +160,7 @@ static WCHAR *get_xml_attribute(IXMLDOMElement *root, const WCHAR *name) VariantInit(&var); if (SUCCEEDED(IXMLDOMElement_getAttribute(root, bstr, &var))) { - ret = (V_VT(&var) == VT_BSTR) ? strdupW(V_BSTR(&var)) : NULL; + ret = (V_VT(&var) == VT_BSTR) ? wcsdup(V_BSTR(&var)) : NULL; VariantClear(&var); } SysFreeString(bstr); @@ -554,7 +554,7 @@ struct assembly_entry *load_manifest(const WCHAR *filename) if ((entry = alloc_assembly())) { - entry->filename = strdupW(filename); + entry->filename = wcsdup(filename); entry->displayname = get_xml_attribute(root, L"displayName"); if (iter_assembly(root, entry)) goto done; free_assembly(entry); diff --git a/programs/wusa/wusa.h b/programs/wusa/wusa.h index da679a27f07..e61fc025e09 100644 --- a/programs/wusa/wusa.h +++ b/programs/wusa/wusa.h @@ -100,14 +100,6 @@ static inline WCHAR *strdupAtoW(const char *str) return ret; } -static inline WCHAR *strdupW(const WCHAR *str) -{ - WCHAR *ret; - if (!str) return NULL; - if ((ret = malloc((lstrlenW(str) + 1) * sizeof(WCHAR)))) lstrcpyW(ret, str); - return ret; -} - static inline WCHAR *strdupWn(const WCHAR *str, DWORD len) { WCHAR *ret;
1
0
0
0
Nikolay Sivov : dwrite/tests: Fix context text.
by Alexandre Julliard
20 Apr '22
20 Apr '22
Module: wine Branch: master Commit: 76fa97cdddc9eb0860a4056ccd62d41438ee8252 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=76fa97cdddc9eb0860a4056c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Apr 20 20:44:32 2022 +0300 dwrite/tests: Fix context text. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/tests/font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index efeb3644747..38eb1aeeb7d 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -8286,7 +8286,7 @@ static void test_GetFontSignature(void) get_expected_fontsig(font, &expected_signature); - winetest_push_context("Font %s\n", wine_dbgstr_w(nameW)); + winetest_push_context("Font %s", wine_dbgstr_w(nameW)); ok(fontsig.fsUsb[0] == expected_signature.fsUsb[0], "fsUsb[0] %#lx, expected %#lx.\n", fontsig.fsUsb[0], expected_signature.fsUsb[0]);
1
0
0
0
Nikolay Sivov : dwrite/tests: Use safe table access helpers for GetFontSignature().
by Alexandre Julliard
20 Apr '22
20 Apr '22
Module: wine Branch: master Commit: 77c06dfb29a35704f6ff616941cb026c9e6de967 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=77c06dfb29a35704f6ff6169…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Apr 20 20:44:31 2022 +0300 dwrite/tests: Use safe table access helpers for GetFontSignature(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/tests/font.c | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 0a02ba1236d..efeb3644747 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -157,7 +157,7 @@ enum TT_HEAD_MACSTYLE TT_HEAD_MACSTYLE_EXTENDED = 1 << 6, }; -typedef struct +struct tt_os2 { USHORT version; SHORT xAvgCharWidth; @@ -202,7 +202,7 @@ typedef struct USHORT usDefaultChar; USHORT usBreakChar; USHORT usMaxContext; -} TT_OS2_V2; +}; enum OS2_FSSELECTION { OS2_FSSELECTION_ITALIC = 1 << 0, @@ -2024,7 +2024,7 @@ static void test_CreateFontFace(void) static void get_expected_font_metrics(IDWriteFontFace *fontface, DWRITE_FONT_METRICS1 *metrics) { void *os2_context, *head_context, *post_context, *hhea_context; - const TT_OS2_V2 *tt_os2; + const struct tt_os2 *tt_os2; const TT_HEAD *tt_head; const TT_POST *tt_post; const TT_HHEA *tt_hhea; @@ -2684,8 +2684,8 @@ static void get_logfont_from_font(IDWriteFont *font, LOGFONTW *logfont) void *os2_context, *head_context; IDWriteLocalizedStrings *names; DWRITE_FONT_SIMULATIONS sim; + const struct tt_os2 *tt_os2; IDWriteFontFace *fontface; - const TT_OS2_V2 *tt_os2; DWRITE_FONT_STYLE style; const TT_HEAD *tt_head; LONG weight; @@ -6479,8 +6479,8 @@ static void test_GetGdiCompatibleMetrics(void) static void get_expected_panose(IDWriteFont1 *font, DWRITE_PANOSE *panose) { + const struct tt_os2 *tt_os2; IDWriteFontFace *fontface; - const TT_OS2_V2 *tt_os2; void *os2_context; UINT32 size; BOOL exists; @@ -7448,7 +7448,7 @@ static BOOL get_expected_is_symbol(IDWriteFontFace *fontface) { BOOL exists, is_symbol = FALSE; struct dwrite_fonttable cmap; - const TT_OS2_V2 *tt_os2; + const struct tt_os2 *tt_os2; const BYTE *tables; void *os2_context; WORD num_tables; @@ -8188,10 +8188,9 @@ static void test_CreateFontFaceReference(void) static void get_expected_fontsig(IDWriteFont *font, FONTSIGNATURE *fontsig) { - void *os2_context; + struct dwrite_fonttable os2; IDWriteFontFace *fontface; - const TT_OS2_V2 *tt_os2; - UINT32 size; + WORD version; BOOL exists; HRESULT hr; @@ -8200,25 +8199,29 @@ static void get_expected_fontsig(IDWriteFont *font, FONTSIGNATURE *fontsig) hr = IDWriteFont_CreateFontFace(font, &fontface); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - hr = IDWriteFontFace_TryGetFontTable(fontface, MS_OS2_TAG, (const void **)&tt_os2, &size, &os2_context, &exists); + hr = IDWriteFontFace_TryGetFontTable(fontface, MS_OS2_TAG, (const void **)&os2.data, &os2.size, &os2.context, &exists); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - if (tt_os2) { - fontsig->fsUsb[0] = GET_BE_DWORD(tt_os2->ulUnicodeRange1); - fontsig->fsUsb[1] = GET_BE_DWORD(tt_os2->ulUnicodeRange2); - fontsig->fsUsb[2] = GET_BE_DWORD(tt_os2->ulUnicodeRange3); - fontsig->fsUsb[3] = GET_BE_DWORD(tt_os2->ulUnicodeRange4); + if (os2.data) + { + fontsig->fsUsb[0] = table_read_be_dword(&os2, NULL, FIELD_OFFSET(struct tt_os2, ulUnicodeRange1)); + fontsig->fsUsb[1] = table_read_be_dword(&os2, NULL, FIELD_OFFSET(struct tt_os2, ulUnicodeRange2)); + fontsig->fsUsb[2] = table_read_be_dword(&os2, NULL, FIELD_OFFSET(struct tt_os2, ulUnicodeRange3)); + fontsig->fsUsb[3] = table_read_be_dword(&os2, NULL, FIELD_OFFSET(struct tt_os2, ulUnicodeRange4)); - if (GET_BE_WORD(tt_os2->version) == 0) { + version = table_read_be_word(&os2, NULL, FIELD_OFFSET(struct tt_os2, version)); + if (version == 0) + { fontsig->fsCsb[0] = 0; fontsig->fsCsb[1] = 0; } - else { - fontsig->fsCsb[0] = GET_BE_DWORD(tt_os2->ulCodePageRange1); - fontsig->fsCsb[1] = GET_BE_DWORD(tt_os2->ulCodePageRange2); + else + { + fontsig->fsCsb[0] = table_read_be_dword(&os2, NULL, FIELD_OFFSET(struct tt_os2, ulCodePageRange1)); + fontsig->fsCsb[1] = table_read_be_dword(&os2, NULL, FIELD_OFFSET(struct tt_os2, ulCodePageRange2)); } - IDWriteFontFace_ReleaseFontTable(fontface, os2_context); + IDWriteFontFace_ReleaseFontTable(fontface, os2.context); } IDWriteFontFace_Release(fontface);
1
0
0
0
Rémi Bernon : kernelbase: Allocate global memory handle table dynamically.
by Alexandre Julliard
20 Apr '22
20 Apr '22
Module: wine Branch: master Commit: c0584779f89e2f6372039a2e6db2d59b8025f5e7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c0584779f89e2f6372039a2e…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Apr 20 15:03:13 2022 +0200 kernelbase: Allocate global memory handle table dynamically. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52763
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/kernelbase.h | 1 + dlls/kernelbase/main.c | 1 + dlls/kernelbase/memory.c | 22 +++++++++++----------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/dlls/kernelbase/kernelbase.h b/dlls/kernelbase/kernelbase.h index f4bd3e99283..6043fe49dd5 100644 --- a/dlls/kernelbase/kernelbase.h +++ b/dlls/kernelbase/kernelbase.h @@ -33,6 +33,7 @@ struct pseudo_console extern WCHAR *file_name_AtoW( LPCSTR name, BOOL alloc ) DECLSPEC_HIDDEN; extern DWORD file_name_WtoA( LPCWSTR src, INT srclen, LPSTR dest, INT destlen ) DECLSPEC_HIDDEN; +extern void init_global_data(void) DECLSPEC_HIDDEN; extern void init_startup_info( RTL_USER_PROCESS_PARAMETERS *params ) DECLSPEC_HIDDEN; extern void init_locale( HMODULE module ) DECLSPEC_HIDDEN; extern void init_console(void) DECLSPEC_HIDDEN; diff --git a/dlls/kernelbase/main.c b/dlls/kernelbase/main.c index 2f2312eccb8..0309ec91589 100644 --- a/dlls/kernelbase/main.c +++ b/dlls/kernelbase/main.c @@ -46,6 +46,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) { DisableThreadLibraryCalls( hinst ); IsWow64Process( GetCurrentProcess(), &is_wow64 ); + init_global_data(); init_locale( hinst ); init_startup_info( NtCurrentTeb()->Peb->ProcessParameters ); init_console(); diff --git a/dlls/kernelbase/memory.c b/dlls/kernelbase/memory.c index 21e7c5ef9d9..ea223c3986a 100644 --- a/dlls/kernelbase/memory.c +++ b/dlls/kernelbase/memory.c @@ -608,14 +608,8 @@ struct mem_entry C_ASSERT(sizeof(struct mem_entry) == 2 * sizeof(void *)); #define MAX_MEM_HANDLES 0x10000 -static struct mem_entry mem_entries[MAX_MEM_HANDLES]; -static struct mem_entry *next_free_mem = mem_entries; - -static struct kernelbase_global_data kernelbase_global_data = -{ - .mem_entries = mem_entries, - .mem_entries_end = mem_entries + MAX_MEM_HANDLES, -}; +static struct mem_entry *next_free_mem; +static struct kernelbase_global_data global_data = {0}; /* align the storage needed for the HLOCAL on an 8-byte boundary thus * LocalAlloc/LocalReAlloc'ing with LMEM_MOVEABLE of memory with @@ -627,7 +621,7 @@ static struct kernelbase_global_data kernelbase_global_data = static inline struct mem_entry *unsafe_mem_from_HLOCAL( HLOCAL handle ) { struct mem_entry *mem = CONTAINING_RECORD( handle, struct mem_entry, ptr ); - struct kernelbase_global_data *data = &kernelbase_global_data; + struct kernelbase_global_data *data = &global_data; if (((UINT_PTR)handle & ((sizeof(void *) << 1) - 1)) != sizeof(void *)) return NULL; if (mem < data->mem_entries || mem >= data->mem_entries_end) return NULL; if (!(mem->flags & MEM_FLAG_USED)) return NULL; @@ -646,6 +640,12 @@ static inline void *unsafe_ptr_from_HLOCAL( HLOCAL handle ) return handle; } +void init_global_data(void) +{ + global_data.mem_entries = VirtualAlloc( NULL, MAX_MEM_HANDLES * sizeof(struct mem_entry), MEM_COMMIT, PAGE_READWRITE ); + if (!(next_free_mem = global_data.mem_entries)) ERR( "Failed to allocate kernelbase global handle table\n" ); + global_data.mem_entries_end = global_data.mem_entries + MAX_MEM_HANDLES; +} /*********************************************************************** * KernelBaseGetGlobalData (kernelbase.@) @@ -653,7 +653,7 @@ static inline void *unsafe_ptr_from_HLOCAL( HLOCAL handle ) void *WINAPI KernelBaseGetGlobalData(void) { WARN_(globalmem)( "semi-stub!\n" ); - return &kernelbase_global_data; + return &global_data; } @@ -709,7 +709,7 @@ HLOCAL WINAPI DECLSPEC_HOTPATCH LocalAlloc( UINT flags, SIZE_T size ) } RtlLockHeap( heap ); - if ((mem = next_free_mem) < mem_entries || mem >= mem_entries + MAX_MEM_HANDLES) + if ((mem = next_free_mem) < global_data.mem_entries || mem >= global_data.mem_entries_end) mem = NULL; else {
1
0
0
0
Zebediah Figura : wined3d: Make wined3d_context_gl_set_draw_buffer() static.
by Alexandre Julliard
20 Apr '22
20 Apr '22
Module: wine Branch: master Commit: 6fc2799bd02add497ac0770b41799372bf4c119a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6fc2799bd02add497ac0770b…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Tue Apr 19 20:20:38 2022 -0500 wined3d: Make wined3d_context_gl_set_draw_buffer() static. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context_gl.c | 36 ++++++++++++++++++------------------ dlls/wined3d/wined3d_private.h | 1 - 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index dd4204067bc..45c1062b3ec 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -466,6 +466,24 @@ static inline DWORD context_generate_rt_mask_from_resource(struct wined3d_resour return (1u << 31) | wined3d_texture_get_gl_buffer(texture_from_resource(resource)); } +/* Context activation is done by the caller. */ +static void wined3d_context_gl_set_draw_buffer(struct wined3d_context_gl *context_gl, GLenum buffer) +{ + const struct wined3d_gl_info *gl_info = context_gl->gl_info; + struct fbo_entry *current_fbo = context_gl->current_fbo; + uint32_t new_mask = context_generate_rt_mask(buffer); + uint32_t *current_mask; + + current_mask = current_fbo ? ¤t_fbo->rt_mask : &context_gl->draw_buffers_mask; + if (new_mask == *current_mask) + return; + + gl_info->gl_ops.gl.p_glDrawBuffer(buffer); + checkGLcall("glDrawBuffer()"); + + *current_mask = new_mask; +} + static inline void wined3d_context_gl_set_fbo_key_for_render_target(const struct wined3d_context_gl *context_gl, struct wined3d_fbo_entry_key *key, unsigned int idx, const struct wined3d_rendertarget_info *render_target, DWORD location) @@ -2502,24 +2520,6 @@ static void wined3d_context_gl_apply_draw_buffers(struct wined3d_context_gl *con checkGLcall("apply draw buffers"); } -/* Context activation is done by the caller. */ -void wined3d_context_gl_set_draw_buffer(struct wined3d_context_gl *context_gl, GLenum buffer) -{ - const struct wined3d_gl_info *gl_info = context_gl->gl_info; - struct fbo_entry *current_fbo = context_gl->current_fbo; - uint32_t new_mask = context_generate_rt_mask(buffer); - uint32_t *current_mask; - - current_mask = current_fbo ? ¤t_fbo->rt_mask : &context_gl->draw_buffers_mask; - if (new_mask == *current_mask) - return; - - gl_info->gl_ops.gl.p_glDrawBuffer(buffer); - checkGLcall("glDrawBuffer()"); - - *current_mask = new_mask; -} - /* Context activation is done by the caller. */ void wined3d_context_gl_active_texture(struct wined3d_context_gl *context_gl, const struct wined3d_gl_info *gl_info, unsigned int unit) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index b9ca990932d..0ddad7ee5ec 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2383,7 +2383,6 @@ void *wined3d_context_gl_map_bo_address(struct wined3d_context_gl *context_gl, struct wined3d_context_gl *wined3d_context_gl_reacquire(struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN; void wined3d_context_gl_release(struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN; BOOL wined3d_context_gl_set_current(struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN; -void wined3d_context_gl_set_draw_buffer(struct wined3d_context_gl *context_gl, GLenum buffer) DECLSPEC_HIDDEN; void wined3d_context_gl_submit_command_fence(struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN; void wined3d_context_gl_texture_update(struct wined3d_context_gl *context_gl, const struct wined3d_texture_gl *texture_gl) DECLSPEC_HIDDEN;
1
0
0
0
Zebediah Figura : wined3d: Factor out context_gl_apply_texture_draw_state().
by Alexandre Julliard
20 Apr '22
20 Apr '22
Module: wine Branch: master Commit: 68cd60436c621fefeedf1168c1209d3e7352dd34 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=68cd60436c621fefeedf1168…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Tue Apr 19 20:20:37 2022 -0500 wined3d: Factor out context_gl_apply_texture_draw_state(). Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/arb_program_shader.c | 21 +------------------- dlls/wined3d/context_gl.c | 38 +++++++++++++++++++++++++++++++++++ dlls/wined3d/glsl_shader.c | 21 +------------------- dlls/wined3d/texture.c | 42 ++++----------------------------------- dlls/wined3d/wined3d_private.h | 2 ++ 5 files changed, 46 insertions(+), 78 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index b4c395ec355..12606bbd0b0 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -7908,26 +7908,7 @@ static DWORD arbfp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bl dst_rect = &d; } - if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) - { - GLenum buffer; - - if (dst_location == WINED3D_LOCATION_DRAWABLE) - { - TRACE("Destination texture %p is onscreen.\n", dst_texture); - buffer = wined3d_texture_get_gl_buffer(dst_texture); - } - else - { - TRACE("Destination texture %p is offscreen.\n", dst_texture); - buffer = GL_COLOR_ATTACHMENT0; - } - wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_DRAW_FRAMEBUFFER, - &dst_texture->resource, dst_sub_resource_idx, NULL, 0, dst_location); - wined3d_context_gl_set_draw_buffer(context_gl, buffer); - wined3d_context_gl_check_fbo_status(context_gl, GL_DRAW_FRAMEBUFFER); - context_invalidate_state(context, STATE_FRAMEBUFFER); - } + context_gl_apply_texture_draw_state(context_gl, dst_texture, dst_sub_resource_idx, dst_location); if (op == WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST) { diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index 8ac5c28c892..dd4204067bc 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -3613,6 +3613,44 @@ static uint32_t find_draw_buffers_mask(const struct wined3d_context_gl *context_ return rt_mask; } +void context_gl_apply_texture_draw_state(struct wined3d_context_gl *context_gl, + struct wined3d_texture *texture, unsigned int sub_resource_idx, unsigned int location) +{ + const struct wined3d_format *format = texture->resource.format; + GLenum buffer; + + if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) + return; + + if (format->depth_size || format->stencil_size) + { + wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_DRAW_FRAMEBUFFER, + NULL, 0, &texture->resource, sub_resource_idx, location); + + buffer = GL_NONE; + } + else + { + wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_DRAW_FRAMEBUFFER, + &texture->resource, sub_resource_idx, NULL, 0, location); + + if (location == WINED3D_LOCATION_DRAWABLE) + { + TRACE("Texture %p is onscreen.\n", texture); + buffer = wined3d_texture_get_gl_buffer(texture); + } + else + { + TRACE("Texture %p is offscreen.\n", texture); + buffer = GL_COLOR_ATTACHMENT0; + } + } + + wined3d_context_gl_set_draw_buffer(context_gl, buffer); + wined3d_context_gl_check_fbo_status(context_gl, GL_DRAW_FRAMEBUFFER); + context_invalidate_state(&context_gl->c, STATE_FRAMEBUFFER); +} + /* Context activation is done by the caller. */ void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index f79fa1571e6..82c022e4ba7 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -13205,26 +13205,7 @@ static DWORD glsl_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bli dst_rect = &d; } - if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) - { - GLenum buffer; - - if (dst_location == WINED3D_LOCATION_DRAWABLE) - { - TRACE("Destination texture %p is onscreen.\n", dst_texture); - buffer = wined3d_texture_get_gl_buffer(dst_texture); - } - else - { - TRACE("Destination texture %p is offscreen.\n", dst_texture); - buffer = GL_COLOR_ATTACHMENT0; - } - wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_DRAW_FRAMEBUFFER, - &dst_texture->resource, dst_sub_resource_idx, NULL, 0, dst_location); - wined3d_context_gl_set_draw_buffer(context_gl, buffer); - wined3d_context_gl_check_fbo_status(context_gl, GL_DRAW_FRAMEBUFFER); - context_invalidate_state(context, STATE_FRAMEBUFFER); - } + context_gl_apply_texture_draw_state(context_gl, dst_texture, dst_sub_resource_idx, dst_location); if (op == WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST) { diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index c495de171d5..eaa7cdf3ea5 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -523,25 +523,14 @@ static void texture2d_blt_fbo(struct wined3d_device *device, struct wined3d_cont checkGLcall("glReadBuffer()"); wined3d_context_gl_check_fbo_status(context_gl, GL_READ_FRAMEBUFFER); + context_gl_apply_texture_draw_state(context_gl, dst_texture, dst_sub_resource_idx, dst_location); + if (dst_location == WINED3D_LOCATION_DRAWABLE) { - TRACE("Destination texture %p is onscreen.\n", dst_texture); - buffer = wined3d_texture_get_gl_buffer(dst_texture); d = *dst_rect; wined3d_texture_translate_drawable_coords(dst_texture, context_gl->window, &d); dst_rect = &d; } - else - { - TRACE("Destination texture %p is offscreen.\n", dst_texture); - buffer = GL_COLOR_ATTACHMENT0; - } - - wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_DRAW_FRAMEBUFFER, - &dst_texture->resource, dst_sub_resource_idx, NULL, 0, dst_location); - wined3d_context_gl_set_draw_buffer(context_gl, buffer); - wined3d_context_gl_check_fbo_status(context_gl, GL_DRAW_FRAMEBUFFER); - context_invalidate_state(context, STATE_FRAMEBUFFER); gl_info->gl_ops.gl.p_glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); context_invalidate_state(context, STATE_BLEND); @@ -633,11 +622,7 @@ static void texture2d_depth_blt_fbo(const struct wined3d_device *device, struct &src_texture->resource, src_sub_resource_idx, src_location); wined3d_context_gl_check_fbo_status(context_gl, GL_READ_FRAMEBUFFER); - wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_DRAW_FRAMEBUFFER, NULL, 0, - &dst_texture->resource, dst_sub_resource_idx, dst_location); - wined3d_context_gl_set_draw_buffer(context_gl, GL_NONE); - wined3d_context_gl_check_fbo_status(context_gl, GL_DRAW_FRAMEBUFFER); - context_invalidate_state(context, STATE_FRAMEBUFFER); + context_gl_apply_texture_draw_state(context_gl, dst_texture, dst_sub_resource_idx, dst_location); if (gl_mask & GL_DEPTH_BUFFER_BIT) { @@ -6053,26 +6038,7 @@ static DWORD ffp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit dst_rect = &r; } - if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) - { - GLenum buffer; - - if (dst_location == WINED3D_LOCATION_DRAWABLE) - { - TRACE("Destination texture %p is onscreen.\n", dst_texture); - buffer = wined3d_texture_get_gl_buffer(dst_texture); - } - else - { - TRACE("Destination texture %p is offscreen.\n", dst_texture); - buffer = GL_COLOR_ATTACHMENT0; - } - wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_DRAW_FRAMEBUFFER, - dst_resource, dst_sub_resource_idx, NULL, 0, dst_location); - wined3d_context_gl_set_draw_buffer(context_gl, buffer); - wined3d_context_gl_check_fbo_status(context_gl, GL_DRAW_FRAMEBUFFER); - context_invalidate_state(context, STATE_FRAMEBUFFER); - } + context_gl_apply_texture_draw_state(context_gl, dst_texture, dst_sub_resource_idx, dst_location); gl_info->gl_ops.gl.p_glEnable(src_texture_gl->target); checkGLcall("glEnable(target)"); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 54bccb3db5e..b9ca990932d 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2824,6 +2824,8 @@ BOOL wined3d_clip_blit(const RECT *clip_rect, RECT *clipped, RECT *other) DECLSP HGLRC context_create_wgl_attribs(const struct wined3d_gl_info *gl_info, HDC hdc, HGLRC share_ctx) DECLSPEC_HIDDEN; DWORD context_get_tls_idx(void) DECLSPEC_HIDDEN; +void context_gl_apply_texture_draw_state(struct wined3d_context_gl *context_gl, + struct wined3d_texture *texture, unsigned int sub_resource_idx, unsigned int location); void context_gl_resource_released(struct wined3d_device *device, GLuint name, BOOL rb_namespace) DECLSPEC_HIDDEN; void context_invalidate_compute_state(struct wined3d_context *context, DWORD state_id) DECLSPEC_HIDDEN;
1
0
0
0
Jacek Caban : winex11: Use Unix environment variable in remove_startup_notification.
by Alexandre Julliard
20 Apr '22
20 Apr '22
Module: wine Branch: master Commit: c5e7f1b0e5e34bfdb03c63e3ea07e7fdaa1543be URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c5e7f1b0e5e34bfdb03c63e3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Apr 20 16:00:34 2022 +0200 winex11: Use Unix environment variable in remove_startup_notification. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/window.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index bed5081d124..48500284b68 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -110,8 +110,8 @@ static pthread_mutex_t win_data_mutex = PTHREAD_MUTEX_INITIALIZER; static void remove_startup_notification(Display *display, Window window) { static LONG startup_notification_removed = 0; - char id[1024]; char message[1024]; + const char *id; int i; int pos; XEvent xevent; @@ -121,9 +121,7 @@ static void remove_startup_notification(Display *display, Window window) if (InterlockedCompareExchange(&startup_notification_removed, 1, 0) != 0) return; - if (GetEnvironmentVariableA("DESKTOP_STARTUP_ID", id, sizeof(id)) == 0) - return; - SetEnvironmentVariableA("DESKTOP_STARTUP_ID", NULL); + if (!(id = getenv( "DESKTOP_STARTUP_ID" )) || !id[0]) return; if ((src = strstr( id, "_TIME" ))) update_user_time( atol( src + 5 )); @@ -137,6 +135,7 @@ static void remove_startup_notification(Display *display, Window window) } message[pos++] = '"'; message[pos++] = '\0'; + unsetenv( "DESKTOP_STARTUP_ID" ); xevent.xclient.type = ClientMessage; xevent.xclient.message_type = x11drv_atom(_NET_STARTUP_INFO_BEGIN);
1
0
0
0
← Newer
1
...
35
36
37
38
39
40
41
...
103
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
Results per page:
10
25
50
100
200