Added a cleanup function for virtual joysticks

This commit is contained in:
Sam Lantinga committed 2024-08-27 10:31:46 -07:00
1 parent 00c409cff8
commit 47926d7bd0
2 files changed
+5

No files matched your search

@@ -70,6 +70,10 @@ static void VIRTUAL_FreeHWData(joystick_hwdata *hwdata)
return;
}
if (hwdata->desc.Cleanup) {
hwdata->desc.Cleanup(hwdata->desc.userdata);
}
// Remove hwdata from SDL-global list
for (cur = g_VJoys; cur; prev = cur, cur = cur->next) {
if (hwdata == cur) {