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 - [PATCH] WGI: Use fast-pass strings.
Summary: [PATCH] WGI: Use fast-pass strings.
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: 2.0.13
Hardware: All Windows 10
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-01 23:18 UTC by Joel Linn
Modified: 2020-12-09 14:25 UTC (History)
0 users

See Also:


Attachments
Replacement of all uses (in joystick subsystem) of ref-counted HSTRINGs (7.56 KB, patch)
2020-12-01 23:18 UTC, Joel Linn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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