Simplified SDL_SetProperty() and added SDL_SetPropertyWithCleanup()

Most of the time people won't need to set a cleanup callback, so we can simplify the more commonly used API.
This commit is contained in:
Sam Lantinga
2023-11-07 12:33:43 -08:00
parent a1941fad6c
commit aea6e6de6f
16 changed files with 61 additions and 34 deletions

View File

@@ -1070,7 +1070,7 @@ static HRESULT D3D12_CreateDeviceResources(SDL_Renderer *renderer)
}
data->srvPoolHead = &data->srvPoolNodes[0];
SDL_SetProperty(SDL_GetRendererProperties(renderer), "SDL.renderer.d3d12.device", data->d3dDevice, NULL, NULL);
SDL_SetProperty(SDL_GetRendererProperties(renderer), "SDL.renderer.d3d12.device", data->d3dDevice);
done:
SAFE_RELEASE(d3dDevice);