summaryrefslogtreecommitdiffhomepage
path: root/src/core.c
diff options
context:
space:
mode:
authorkernelkinetic <[email protected]>2021-02-05 13:55:09 +0100
committerGitHub <[email protected]>2021-02-05 13:55:09 +0100
commite831bf02c5eb2b1d841b554e43782a2f5482cdc8 (patch)
treef4192fb5d1a3eff2bc1f9c4d506542dcd0d99834 /src/core.c
parent97a7875648da0dd2ffdf9e7afa9a9e3e1ecd0553 (diff)
downloadraylib-e831bf02c5eb2b1d841b554e43782a2f5482cdc8.tar.gz
raylib-e831bf02c5eb2b1d841b554e43782a2f5482cdc8.zip
removed redundant call to eglGetConfig (https://github.com/raysan5/raylib/issues/1550) (#1567)
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/core.c b/src/core.c
index 67a87c82..51bb202f 100644
--- a/src/core.c
+++ b/src/core.c
@@ -3845,7 +3845,7 @@ static bool InitGraphicsDevice(int width, int height)
}
#if defined(PLATFORM_DRM)
- if (!eglGetConfigs(CORE.Window.device, NULL, 0, &numConfigs))
+ if (!eglChooseConfig(CORE.Window.device, NULL, NULL, 0, &numConfigs))
{
TRACELOG(LOG_WARNING, "DISPLAY: Failed to get EGL config count: 0x%x", eglGetError());
return false;
@@ -3861,15 +3861,6 @@ static bool InitGraphicsDevice(int width, int height)
}
EGLint matchingNumConfigs = 0;
- if (!eglGetConfigs(CORE.Window.device, configs, numConfigs, &matchingNumConfigs))
- {
- TRACELOG(LOG_WARNING, "DISPLAY: Failed to get EGL configs: 0x%x", eglGetError());
- free(configs);
- return false;
- }
-
- TRACELOG(LOG_TRACE, "DISPLAY: EGL matching configs available: %d", matchingNumConfigs);
-
if (!eglChooseConfig(CORE.Window.device, framebufferAttribs, configs, numConfigs, &matchingNumConfigs))
{
TRACELOG(LOG_WARNING, "DISPLAY: Failed to choose EGL config: 0x%x", eglGetError());
@@ -3877,6 +3868,8 @@ static bool InitGraphicsDevice(int width, int height)
return false;
}
+ TRACELOG(LOG_TRACE, "DISPLAY: EGL matching configs available: %d", matchingNumConfigs);
+
// find the EGL config that matches the previously setup GBM format
int found = 0;
for (EGLint i = 0; i < matchingNumConfigs; ++i)