SDL: Default to use the built-in EGL definitions

From 7c16fe6d69c487c1148dd0dab6c4fd820bc69ec7 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 12 Jan 2023 15:54:06 -0800
Subject: [PATCH] Default to use the built-in EGL definitions

---
 cmake/sdlchecks.cmake  | 1 -
 include/SDL3/SDL_egl.h | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index 8700441c4873..e2d63f718369 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -670,7 +670,6 @@ macro(CheckVivante)
         find_library(VIVANTE_VDK_LIBRARY VDK REQUIRED)
         list(APPEND SDL_EXTRA_LIBS ${VIVANTE_LIBRARY} ${VIVANTE_VDK_LIBRARY})
       else()
-        list(APPEND SDL_PC_CFLAGS -DLINUX -DEGL_API_FB)
         list(APPEND SDL_EXTRA_LIBS EGL)
       endif(HAVE_VIVANTE_VDK)
     endif()
diff --git a/include/SDL3/SDL_egl.h b/include/SDL3/SDL_egl.h
index 6f51c0831afb..73d3e13956e9 100644
--- a/include/SDL3/SDL_egl.h
+++ b/include/SDL3/SDL_egl.h
@@ -24,7 +24,7 @@
  *
  *  This is a simple file to encapsulate the EGL API headers.
  */
-#if !defined(_MSC_VER) && !defined(__ANDROID__) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)
+#ifdef SDL_USE_SYSTEM_EGL_HEADERS
 
 #if defined(__vita__) || defined(__psp2__)
 #include <psp2/types.h>
@@ -33,7 +33,7 @@
 #include <EGL/egl.h>
 #include <EGL/eglext.h>
 
-#else /* _MSC_VER */
+#else /* !SDL_USE_SYSTEM_EGL_HEADERS */
 
 /* EGL headers for Visual Studio */
 
@@ -2349,4 +2349,4 @@ EGLAPI struct wl_buffer *EGLAPIENTRY eglCreateWaylandBufferFromImageWL (EGLDispl
 
 #endif /* __eglext_h_ */
 
-#endif /* _MSC_VER */
+#endif /* SDL_USE_SYSTEM_EGL_HEADERS */