From 31128b6cddf1e596bdac7c1650e54824e86c03f0 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Wed, 4 Dec 2024 11:58:28 -0500
Subject: [PATCH] kmsdrm: Clean up GLES function definitions
Several functions were redundantly declared in both in the general subsystem header and the GLES header, and some signatures didn't match in both locations.
Move them all to the GLES header, as the definitions are in the GLES source file.
---
src/video/kmsdrm/SDL_kmsdrmopengles.h | 5 +----
src/video/kmsdrm/SDL_kmsdrmvideo.h | 11 -----------
2 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/src/video/kmsdrm/SDL_kmsdrmopengles.h b/src/video/kmsdrm/SDL_kmsdrmopengles.h
index 69e6fb7d0737a..41eaf0bb1005f 100644
--- a/src/video/kmsdrm/SDL_kmsdrmopengles.h
+++ b/src/video/kmsdrm/SDL_kmsdrmopengles.h
@@ -23,8 +23,6 @@
#ifndef SDL_kmsdrmopengles_h_
#define SDL_kmsdrmopengles_h_
-#ifdef SDL_VIDEO_DRIVER_KMSDRM
-
#include "../SDL_sysvideo.h"
#include "../SDL_egl_c.h"
@@ -37,10 +35,9 @@
extern void KMSDRM_GLES_DefaultProfileConfig(SDL_VideoDevice *_this, int *mask, int *major, int *minor);
extern bool KMSDRM_GLES_SetSwapInterval(SDL_VideoDevice *_this, int interval);
extern bool KMSDRM_GLES_LoadLibrary(SDL_VideoDevice *_this, const char *path);
+extern void KMSDRM_GLES_UnloadLibrary(SDL_VideoDevice *_this);
extern SDL_GLContext KMSDRM_GLES_CreateContext(SDL_VideoDevice *_this, SDL_Window *window);
extern bool KMSDRM_GLES_SwapWindow(SDL_VideoDevice *_this, SDL_Window *window);
extern bool KMSDRM_GLES_MakeCurrent(SDL_VideoDevice *_this, SDL_Window *window, SDL_GLContext context);
-#endif // SDL_VIDEO_DRIVER_KMSDRM
-
#endif // SDL_kmsdrmopengles_h_
diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.h b/src/video/kmsdrm/SDL_kmsdrmvideo.h
index 16571ecff2926..2ef3ae52edcd6 100644
--- a/src/video/kmsdrm/SDL_kmsdrmvideo.h
+++ b/src/video/kmsdrm/SDL_kmsdrmvideo.h
@@ -173,15 +173,4 @@ extern void KMSDRM_MinimizeWindow(SDL_VideoDevice *_this, SDL_Window *window);
extern void KMSDRM_RestoreWindow(SDL_VideoDevice *_this, SDL_Window *window);
extern void KMSDRM_DestroyWindow(SDL_VideoDevice *_this, SDL_Window *window);
-// OpenGL/OpenGL ES functions
-extern bool KMSDRM_GLES_LoadLibrary(SDL_VideoDevice *_this, const char *path);
-extern SDL_FunctionPointer KMSDRM_GLES_GetProcAddress(SDL_VideoDevice *_this, const char *proc);
-extern void KMSDRM_GLES_UnloadLibrary(SDL_VideoDevice *_this);
-extern SDL_GLContext KMSDRM_GLES_CreateContext(SDL_VideoDevice *_this, SDL_Window *window);
-extern bool KMSDRM_GLES_MakeCurrent(SDL_VideoDevice *_this, SDL_Window *window, SDL_GLContext context);
-extern bool KMSDRM_GLES_SetSwapInterval(SDL_VideoDevice *_this, int interval);
-extern bool KMSDRM_GLES_GetSwapInterval(SDL_VideoDevice *_this);
-extern bool KMSDRM_GLES_SwapWindow(SDL_VideoDevice *_this, SDL_Window *window);
-extern bool KMSDRM_GLES_DestroyContext(SDL_VideoDevice *_this, SDL_GLContext context);
-
#endif // SDL_kmsdrmvideo_h