From fbb83564efd329bf2fb5aced284b3c4bb3e3d73c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 27 Feb 2013 08:21:46 +0100 Subject: [PATCH] (Playbook) Finally displays properly - yay --- gfx/context/bbqnx_ctx.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/gfx/context/bbqnx_ctx.c b/gfx/context/bbqnx_ctx.c index 95d324528a..1a6660eeac 100644 --- a/gfx/context/bbqnx_ctx.c +++ b/gfx/context/bbqnx_ctx.c @@ -40,7 +40,7 @@ static EGLContext g_egl_ctx; static EGLSurface g_egl_surf; static EGLDisplay g_egl_dpy; -static EGLConfig g_config; +static EGLConfig egl_config; static bool g_resize; extern screen_context_t screen_ctx; @@ -71,7 +71,7 @@ static void gfx_ctx_destroy(void) g_egl_dpy = EGL_NO_DISPLAY; g_egl_surf = EGL_NO_SURFACE; g_egl_ctx = EGL_NO_CONTEXT; - g_config = 0; + egl_config = 0; g_resize = false; } @@ -104,7 +104,7 @@ static bool gfx_ctx_init(void) }; EGLint num_config; EGLint egl_version_major, egl_version_minor; - EGLint format; + int format = SCREEN_FORMAT_RGBX8888; EGLint context_attributes[] = { EGL_CONTEXT_CLIENT_VERSION, 2, @@ -136,21 +136,23 @@ static bool gfx_ctx_init(void) RARCH_LOG("[BLACKBERRY QNX/EGL]: EGL version: %d.%d\n", egl_version_major, egl_version_minor); - if (!eglChooseConfig(g_egl_dpy, attribs, &g_config, 1, &num_config)) + if (!eglChooseConfig(g_egl_dpy, attribs, &egl_config, 1, &num_config)) { RARCH_ERR("eglChooseConfig failed.\n"); goto error; } - int var = eglGetConfigAttrib(g_egl_dpy, g_config, EGL_NATIVE_VISUAL_ID, &format); +#if 0 + int var = eglGetConfigAttrib(g_egl_dpy, egl_config, EGL_NATIVE_VISUAL_ID, &format); if (!var) { RARCH_ERR("eglGetConfigAttrib failed: %d.\n", var); goto error; } +#endif - if ((g_egl_ctx = eglCreateContext(g_egl_dpy, g_config, 0, context_attributes)) == EGL_NO_CONTEXT) + if ((g_egl_ctx = eglCreateContext(g_egl_dpy, egl_config, 0, context_attributes)) == EGL_NO_CONTEXT) { RARCH_ERR("eglCreateContext failed.\n"); goto error; @@ -240,7 +242,7 @@ static bool gfx_ctx_init(void) goto error; } - if (!(g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_config, screen_win, 0))) + if (!(g_egl_surf = eglCreateWindowSurface(g_egl_dpy, egl_config, screen_win, 0))) { RARCH_ERR("eglCreateWindowSurface failed.\n"); goto error;