--- include/SDL_config_windows.h
+++ include/SDL_config_windows.h
@@ -245,9 +245,6 @@ typedef unsigned int uintptr_t;
 #ifndef SDL_VIDEO_RENDER_D3D
 #define SDL_VIDEO_RENDER_D3D    1
 #endif
-#ifdef SDL_WINDOWS7_SDK
-#define SDL_VIDEO_RENDER_D3D11  1
-#endif
 
 /* Enable OpenGL support */
 #ifndef SDL_VIDEO_OPENGL
--- include/SDL_render.h
+++ include/SDL_render.h
@@ -1147,6 +1147,17 @@ extern DECLSPEC void *SDLCALL SDL_Render
  */
 extern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer);
 
+/**
+ * Toggle VSync of the given renderer.
+ *
+ * \param renderer The renderer to toggle
+ * \param vsync 1 for on, 0 for off. All other values are reserved
+ * \returns a 0 int on success, or non-zero on failure
+ *
+ * \since This function is available since SDL 2.0.18.
+ */
+extern DECLSPEC int SDLCALL SDL_RenderSetVSync(SDL_Renderer* renderer, int vsync);
+
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
 }
--- src/dynapi/SDL_dynapi_overrides.h
+++ src/dynapi/SDL_dynapi_overrides.h
@@ -480,6 +480,7 @@
 #define SDL_TLSCreate SDL_TLSCreate_REAL
 #define SDL_TLSGet SDL_TLSGet_REAL
 #define SDL_TLSSet SDL_TLSSet_REAL
+#define SDL_RenderSetVSync SDL_RenderSetVSync_REAL
 #define SDL_GetTicks SDL_GetTicks_REAL
 #define SDL_GetPerformanceCounter SDL_GetPerformanceCounter_REAL
 #define SDL_GetPerformanceFrequency SDL_GetPerformanceFrequency_REAL
--- src/dynapi/SDL_dynapi_procs.h
+++ src/dynapi/SDL_dynapi_procs.h
@@ -48,6 +48,8 @@ SDL_DYNAPI_PROC(int,SDL_snprintf,(SDL_OU
 #undef SDL_CreateThread
 #endif
 
+SDL_DYNAPI_PROC(int,SDL_RenderSetVSync,(SDL_Renderer *a, int b),(a,b),return)
+
 #if defined(__WIN32__)
 SDL_DYNAPI_PROC(SDL_Thread*,SDL_CreateThread,(SDL_ThreadFunction a, const char *b, void *c, pfnSDL_CurrentBeginThread d, pfnSDL_CurrentEndThread e),(a,b,c,d,e),return)
 #elif defined(__OS2__)
--- src/render/direct3d/SDL_render_d3d.c
+++ src/render/direct3d/SDL_render_d3d.c
@@ -1670,6 +1670,24 @@ D3D_Reset(SDL_Renderer * renderer)
     return 0;
 }
 
+static int
+D3D_SetVSync(SDL_Renderer * renderer, const int vsync)
+{
+    D3D_RenderData *data = renderer->driverdata;
+    if (vsync) {
+        data->pparams.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
+        renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
+    } else {
+        data->pparams.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
+        renderer->info.flags &= ~SDL_RENDERER_PRESENTVSYNC;
+    }
+    if (D3D_Reset(renderer) < 0) {
+        /* D3D_Reset will call SDL_SetError() */
+        return -1;
+    }
+    return 0;
+}
+
 SDL_Renderer *
 D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
 {
@@ -1727,6 +1745,7 @@ D3D_CreateRenderer(SDL_Window * window, 
     renderer->RenderPresent = D3D_RenderPresent;
     renderer->DestroyTexture = D3D_DestroyTexture;
     renderer->DestroyRenderer = D3D_DestroyRenderer;
+    renderer->SetVSync = D3D_SetVSync;
     renderer->info = D3D_RenderDriver.info;
     renderer->info.flags = (SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
     renderer->driverdata = data;
--- src/render/direct3d11/SDL_render_d3d11.c
+++ src/render/direct3d11/SDL_render_d3d11.c
@@ -30,7 +30,7 @@
 #include "../SDL_sysrender.h"
 #include "../SDL_d3dmath.h"
 
-#include <d3d11_1.h>
+#include <d3d11.h>
 
 #include "SDL_shaders_d3d11.h"
 
--- src/render/direct3d11/SDL_shaders_d3d11.c
+++ src/render/direct3d11/SDL_shaders_d3d11.c
@@ -26,7 +26,7 @@
 
 #define COBJMACROS
 #include "../../core/windows/SDL_windows.h"
-#include <d3d11_1.h>
+#include <d3d11.h>
 
 #include "SDL_shaders_d3d11.h"
 
--- src/render/SDL_render.c
+++ src/render/SDL_render.c
@@ -3424,4 +3424,19 @@ SDL_GetBlendModeAlphaOperation(SDL_Blend
     return (SDL_BlendOperation)(((Uint32)blendMode >> 16) & 0xF);
 }
 
+int
+SDL_RenderSetVSync(SDL_Renderer * renderer, int vsync)
+{
+    CHECK_RENDERER_MAGIC(renderer, -1);
+
+    if (vsync != 0 && vsync != 1) {
+        return SDL_Unsupported();
+    }
+
+    if (renderer->SetVSync) {
+        return renderer->SetVSync(renderer, vsync);
+    }
+    return SDL_Unsupported();
+}
+
 /* vi: set ts=4 sw=4 expandtab: */
--- src/render/SDL_sysrender.h
+++ src/render/SDL_sysrender.h
@@ -148,6 +148,8 @@ struct SDL_Renderer
 
     void (*DestroyRenderer) (SDL_Renderer * renderer);
 
+    int (*SetVSync) (SDL_Renderer * renderer, int vsync);
+
     int (*GL_BindTexture) (SDL_Renderer * renderer, SDL_Texture *texture, float *texw, float *texh);
     int (*GL_UnbindTexture) (SDL_Renderer * renderer, SDL_Texture *texture);
 
