From 8be58bcd21ab69b0cfb392af4b34c9b1b8c4a882 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Fri, 11 Oct 2019 17:36:56 +0300 Subject: [PATCH] engine: android: fix EGL context create error condition --- engine/platform/android/vid_android.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/platform/android/vid_android.c b/engine/platform/android/vid_android.c index 88f32562..a447f5cb 100644 --- a/engine/platform/android/vid_android.c +++ b/engine/platform/android/vid_android.c @@ -294,13 +294,13 @@ qboolean VID_SetMode( void ) return false; } - if( !( negl.surface = eglCreateWindowSurface( negl.dpy, negl.cfg, negl.window, NULL ))) + if(( negl.surface = eglCreateWindowSurface( negl.dpy, negl.cfg, negl.window, NULL )) == EGL_NO_SURFACE ) { Con_Reportf( S_ERROR "eglCreateWindowSurface returned error: 0x%x\n", eglGetError() ); return false; } - if( !( negl.context = eglCreateContext( negl.dpy, negl.cfg, NULL, contextAttribs ))) + if(( negl.context = eglCreateContext( negl.dpy, negl.cfg, NULL, contextAttribs )) == EGL_NO_CONTEXT ) { Con_Reportf( S_ERROR "eglCreateContext returned error: 0x%x\n", eglGetError() ); return false;