Fix EGL renderer build on SDL 2.0.9 and earlier

This commit is contained in:
Cameron Gutman 2021-01-03 14:24:30 -06:00
parent ff516f63b4
commit a0cc93b813

View File

@ -189,7 +189,13 @@ void EGLRenderer::renderOverlay(Overlay::OverlayType type)
glBindTexture(GL_TEXTURE_2D, m_OverlayTextures[type]);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, newSurface->w, newSurface->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, newSurface->pixels);
SDL_FRect overlayRect;
// SDL_FRect wasn't added until 2.0.10
struct {
float x;
float y;
float w;
float h;
} overlayRect;
// These overlay positions differ from the other renderers because OpenGL
// places the origin in the lower-left corner instead of the upper-left.