mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-07 10:26:27 +00:00
d3d11: Respect SDL_HINT_RENDER_DIRECT3D_THREADSAFE when creating device
This commit is contained in:
@@ -487,6 +487,11 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer)
|
||||
creationFlags |= D3D11_CREATE_DEVICE_DEBUG;
|
||||
}
|
||||
|
||||
/* Create a single-threaded device unless the app requests otherwise. */
|
||||
if (!SDL_GetHintBoolean(SDL_HINT_RENDER_DIRECT3D_THREADSAFE, SDL_FALSE)) {
|
||||
creationFlags |= D3D11_CREATE_DEVICE_SINGLETHREADED;
|
||||
}
|
||||
|
||||
/* Create the Direct3D 11 API device object and a corresponding context. */
|
||||
result = D3D11CreateDeviceFunc(
|
||||
data->dxgiAdapter,
|
||||
|
Reference in New Issue
Block a user