Ryujinx-SDL/src/joystick
Sam Lantinga 797a6910fd Fixed bug 5375 - WGI: Fix HSTRING memory leak.
Joel Linn

TLDR; https://godbolt.org/z/43fd8G

Let's deduce this from C++ reference code:

https://docs.microsoft.com/en-us/cpp/cppcx/wrl/how-to-activate-and-use-a-windows-runtime-component-using-wrl?view=msvc-160
At the bottom of the page there is this snippet:
```
int wmain()
{
    /* ... more code ... */

    // Get the domain part of the URI.
    HString domainName;
    hr = uri->get_Domain(domainName.GetAddressOf());
    if (FAILED(hr))
    {
        return PrintError(__LINE__, hr);
    }

    // Print the domain name and return.
    wprintf_s(L"Domain name: %s\n", domainName.GetRawBuffer(nullptr));

    // All smart pointers and RAII objects go out of scope here.
}
```

`HString` is defined in `corewrappers.h` and the call chain for the destructor is:
`~HString() -> Release() -> ::WindowsDeleteString()`

QED
2020-12-09 20:28:51 -08:00
..
android Fixed bug 5235 - All internal sources should include SDL_assert.h 2020-12-09 07:16:22 -08:00
bsd Fixed bug 5335 - Patch: enable joystick/haptic/evdev support by default on FreeBSD 2020-11-23 23:03:55 -08:00
darwin Fixed compiling on tvOS 2020-11-25 11:31:17 -08:00
dummy Added API for sensors on game controllers 2020-11-17 10:30:20 -08:00
emscripten Fixed bug 5235 - All internal sources should include SDL_assert.h 2020-12-09 07:16:22 -08:00
haiku Added API for sensors on game controllers 2020-11-17 10:30:20 -08:00
hidapi Fixed bug 5235 - All internal sources should include SDL_assert.h 2020-12-09 07:16:22 -08:00
iphoneos Fixed bug 5235 - All internal sources should include SDL_assert.h 2020-12-09 07:16:22 -08:00
linux Fixed bug 5235 - All internal sources should include SDL_assert.h 2020-12-09 07:16:22 -08:00
psp Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
steam Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
virtual Added API for sensors on game controllers 2020-11-17 10:30:20 -08:00
windows Fixed bug 5375 - WGI: Fix HSTRING memory leak. 2020-12-09 20:28:51 -08:00
check_8bitdo.sh Fixed running on older versions of iOS 2020-04-27 13:31:10 -07:00
controller_type.h The HORI Fighting Commander should only show up as an XInput Switch Controller on Windows 2020-11-19 19:09:42 -08:00
SDL_gamecontroller.c Fixed bug 5235 - All internal sources should include SDL_assert.h 2020-12-09 07:16:22 -08:00
SDL_gamecontrollerdb.h Fix Nyko Airflo Ex Windows mapping, add Linux/Mac mappings 2019-03-03 12:38:23 -07:00
SDL_joystick_c.h Revamped Xbox One HIDAPI init sequence 2020-11-24 22:25:26 -08:00
SDL_joystick.c Fixed bug 5235 - All internal sources should include SDL_assert.h 2020-12-09 07:16:22 -08:00
SDL_sysjoystick.h Added API for sensors on game controllers 2020-11-17 10:30:20 -08:00
sort_controllers.py Added support for SDL hints in the game controller mapping database 2020-03-12 19:47:28 -07:00
usb_ids.h Fixed duplicating a device between XInput and HIDAPI 2020-12-03 18:17:03 -08:00