Skip to content

Commit 2d8fd6b

Browse files
committed
Revert "windows: Use wglSwapLayerBuffers if available."
This reverts commit f286558.
1 parent 536126f commit 2d8fd6b

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

src/video/windows/SDL_windowsopengl.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ bool WIN_GL_LoadLibrary(SDL_VideoDevice *_this, const char *path)
141141
SDL_LoadFunction(handle, "wglMakeCurrent");
142142
_this->gl_data->wglShareLists = (BOOL (WINAPI *)(HGLRC, HGLRC))
143143
SDL_LoadFunction(handle, "wglShareLists");
144-
_this->gl_data->wglSwapLayerBuffers = (BOOL (WINAPI *)(HDC, UINT))
145-
SDL_LoadFunction(handle, "wglSwapLayerBuffers");
146-
147144
/* *INDENT-ON* */ // clang-format on
148145

149146
#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
@@ -889,14 +886,8 @@ bool WIN_GL_SwapWindow(SDL_VideoDevice *_this, SDL_Window *window)
889886
{
890887
HDC hdc = window->internal->hdc;
891888

892-
if (_this->gl_data->wglSwapLayerBuffers) {
893-
if (!_this->gl_data->wglSwapLayerBuffers(hdc, WGL_SWAP_MAIN_PLANE)) {
894-
return WIN_SetError("wglSwapLayerBuffers()");
895-
}
896-
} else {
897-
if (!SwapBuffers(hdc)) {
898-
return WIN_SetError("SwapBuffers()");
899-
}
889+
if (!SwapBuffers(hdc)) {
890+
return WIN_SetError("SwapBuffers()");
900891
}
901892
return true;
902893
}

src/video/windows/SDL_windowsopengl.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ struct SDL_GLDriverData
8585
BOOL (WINAPI *wglGetPixelFormatAttribivARB)(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
8686
BOOL (WINAPI *wglSwapIntervalEXT)(int interval);
8787
int (WINAPI *wglGetSwapIntervalEXT)(void);
88-
BOOL (WINAPI *wglSwapLayerBuffers)(HDC hdc, UINT flags);
89-
9088
#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
9189
BOOL (WINAPI *wglSwapBuffers)(HDC hdc);
9290
int (WINAPI *wglDescribePixelFormat)(HDC hdc,

0 commit comments

Comments
 (0)