mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-29 18:54:34 +00:00
Backport simplify flags PR #7220
This commit is contained in:
@@ -1015,10 +1015,10 @@ SDL_CreateRenderer(SDL_Window *window, int index, Uint32 flags)
|
||||
}
|
||||
}
|
||||
|
||||
if ((flags & SDL_RENDERER_PRESENTVSYNC) != 0) {
|
||||
if (flags & SDL_RENDERER_PRESENTVSYNC) {
|
||||
renderer->wanted_vsync = SDL_TRUE;
|
||||
|
||||
if ((renderer->info.flags & SDL_RENDERER_PRESENTVSYNC) == 0) {
|
||||
if (!(renderer->info.flags & SDL_RENDERER_PRESENTVSYNC)) {
|
||||
renderer->simulate_vsync = SDL_TRUE;
|
||||
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
|
||||
}
|
||||
|
||||
@@ -2364,7 +2364,7 @@ D3D11_CreateRenderer(SDL_Window *window, Uint32 flags)
|
||||
*/
|
||||
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
|
||||
#else
|
||||
if ((flags & SDL_RENDERER_PRESENTVSYNC)) {
|
||||
if (flags & SDL_RENDERER_PRESENTVSYNC) {
|
||||
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
|
||||
}
|
||||
renderer->SetVSync = D3D11_SetVSync;
|
||||
|
||||
@@ -2997,7 +2997,7 @@ D3D12_CreateRenderer(SDL_Window *window, Uint32 flags)
|
||||
renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
|
||||
renderer->driverdata = data;
|
||||
|
||||
if ((flags & SDL_RENDERER_PRESENTVSYNC)) {
|
||||
if (flags & SDL_RENDERER_PRESENTVSYNC) {
|
||||
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
|
||||
}
|
||||
renderer->SetVSync = D3D12_SetVSync;
|
||||
|
||||
Reference in New Issue
Block a user