(Playbook) Finally displays properly - yay
This commit is contained in:
parent
1a0aaf0e9d
commit
fbb83564ef
|
@ -40,7 +40,7 @@
|
||||||
static EGLContext g_egl_ctx;
|
static EGLContext g_egl_ctx;
|
||||||
static EGLSurface g_egl_surf;
|
static EGLSurface g_egl_surf;
|
||||||
static EGLDisplay g_egl_dpy;
|
static EGLDisplay g_egl_dpy;
|
||||||
static EGLConfig g_config;
|
static EGLConfig egl_config;
|
||||||
static bool g_resize;
|
static bool g_resize;
|
||||||
|
|
||||||
extern screen_context_t screen_ctx;
|
extern screen_context_t screen_ctx;
|
||||||
|
@ -71,7 +71,7 @@ static void gfx_ctx_destroy(void)
|
||||||
g_egl_dpy = EGL_NO_DISPLAY;
|
g_egl_dpy = EGL_NO_DISPLAY;
|
||||||
g_egl_surf = EGL_NO_SURFACE;
|
g_egl_surf = EGL_NO_SURFACE;
|
||||||
g_egl_ctx = EGL_NO_CONTEXT;
|
g_egl_ctx = EGL_NO_CONTEXT;
|
||||||
g_config = 0;
|
egl_config = 0;
|
||||||
g_resize = false;
|
g_resize = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ static bool gfx_ctx_init(void)
|
||||||
};
|
};
|
||||||
EGLint num_config;
|
EGLint num_config;
|
||||||
EGLint egl_version_major, egl_version_minor;
|
EGLint egl_version_major, egl_version_minor;
|
||||||
EGLint format;
|
int format = SCREEN_FORMAT_RGBX8888;
|
||||||
|
|
||||||
EGLint context_attributes[] = {
|
EGLint context_attributes[] = {
|
||||||
EGL_CONTEXT_CLIENT_VERSION, 2,
|
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);
|
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");
|
RARCH_ERR("eglChooseConfig failed.\n");
|
||||||
goto error;
|
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)
|
if (!var)
|
||||||
{
|
{
|
||||||
RARCH_ERR("eglGetConfigAttrib failed: %d.\n", var);
|
RARCH_ERR("eglGetConfigAttrib failed: %d.\n", var);
|
||||||
goto error;
|
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");
|
RARCH_ERR("eglCreateContext failed.\n");
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -240,7 +242,7 @@ static bool gfx_ctx_init(void)
|
||||||
goto error;
|
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");
|
RARCH_ERR("eglCreateWindowSurface failed.\n");
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Reference in New Issue