mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-11 14:08:48 +01:00
Revert change, trying to follow DRM implementation but not needed on Android #5477
This commit is contained in:
@ -919,26 +919,7 @@ static int InitGraphicsDevice(void)
|
|||||||
EGLint numConfigs = 0;
|
EGLint numConfigs = 0;
|
||||||
|
|
||||||
// Get an EGL device connection
|
// Get an EGL device connection
|
||||||
// NOTE: eglGetPlatformDisplay() is preferred over eglGetDisplay() legacy call
|
platform.device = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||||
platform.device = EGL_NO_DISPLAY;
|
|
||||||
#if defined(EGL_VERSION_1_5)
|
|
||||||
platform.device = eglGetPlatformDisplay(EGL_PLATFORM_GBM_KHR, platform.gbmDevice, NULL);
|
|
||||||
#else
|
|
||||||
// Check if extension is available for eglGetPlatformDisplayEXT()
|
|
||||||
// NOTE: Better compatibility with some drivers (e.g. Mali Midgard)
|
|
||||||
const char *eglClientExtensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
|
|
||||||
if (eglClientExtensions != NULL)
|
|
||||||
{
|
|
||||||
if (strstr(eglClientExtensions, "EGL_EXT_platform_base") != NULL)
|
|
||||||
{
|
|
||||||
PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT = (PFNEGLGETPLATFORMDISPLAYEXTPROC)eglGetProcAddress("eglGetPlatformDisplayEXT");
|
|
||||||
if (eglGetPlatformDisplayEXT != NULL) platform.device = eglGetPlatformDisplayEXT(EGL_PLATFORM_GBM_KHR, platform.gbmDevice, NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// In case extension not found or display could not be retrieved, try useing legacy version
|
|
||||||
if (platform.device == EGL_NO_DISPLAY) platform.device = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (platform.device == EGL_NO_DISPLAY)
|
if (platform.device == EGL_NO_DISPLAY)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user