We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5374

Summary: [PATCH] WGI: Use fast-pass strings.
Product: SDL Reporter: Joel Linn <jl>
Component: joystickAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.13   
Hardware: All   
OS: Windows 10   
Attachments: Replacement of all uses (in joystick subsystem) of ref-counted HSTRINGs

Description Joel Linn 2020-12-01 23:18:21 UTC
Created attachment 4550 [details]
Replacement of all uses (in joystick subsystem) of ref-counted HSTRINGs

Eliminate additional heap allocation for short-lived HSTRINGs.
Uses `WindowsCreateStringReference()` to disable reference counting and memory management by the Window Runtime.
Comment 1 Joel Linn 2020-12-01 23:36:32 UTC
Mind though I cant fully test this change as I lack the hardware. But stepping through it seems ok.
Comment 2 Sam Lantinga 2020-12-09 14:25:02 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/32d078262876