mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
Take out HAVE_EGL ifdefs in gfx_context_driver_t definition
This commit is contained in:
parent
133d7b7dd2
commit
3213baf452
@ -674,6 +674,8 @@ const gfx_ctx_driver_t gfx_ctx_apple = {
|
|||||||
apple_gfx_ctx_input_driver,
|
apple_gfx_ctx_input_driver,
|
||||||
apple_gfx_ctx_get_proc_address,
|
apple_gfx_ctx_get_proc_address,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
"apple",
|
"apple",
|
||||||
apple_gfx_ctx_bind_hw_render,
|
apple_gfx_ctx_bind_hw_render,
|
||||||
};
|
};
|
||||||
|
@ -490,10 +490,8 @@ const gfx_ctx_driver_t gfx_ctx_android = {
|
|||||||
android_gfx_ctx_swap_buffers,
|
android_gfx_ctx_swap_buffers,
|
||||||
android_gfx_ctx_input_driver,
|
android_gfx_ctx_input_driver,
|
||||||
android_gfx_ctx_get_proc_address,
|
android_gfx_ctx_get_proc_address,
|
||||||
#ifdef HAVE_EGL
|
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
|
||||||
NULL,
|
NULL,
|
||||||
"android",
|
"android",
|
||||||
android_gfx_ctx_bind_hw_render,
|
android_gfx_ctx_bind_hw_render,
|
||||||
|
@ -464,10 +464,8 @@ const gfx_ctx_driver_t gfx_ctx_bbqnx = {
|
|||||||
gfx_ctx_qnx_swap_buffers,
|
gfx_ctx_qnx_swap_buffers,
|
||||||
gfx_ctx_qnx_input_driver,
|
gfx_ctx_qnx_input_driver,
|
||||||
gfx_ctx_qnx_get_proc_address,
|
gfx_ctx_qnx_get_proc_address,
|
||||||
#ifdef HAVE_EGL
|
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
|
||||||
NULL,
|
NULL,
|
||||||
"blackberry_qnx",
|
"blackberry_qnx",
|
||||||
gfx_qnx_ctx_bind_hw_render,
|
gfx_qnx_ctx_bind_hw_render,
|
||||||
|
@ -519,10 +519,8 @@ const gfx_ctx_driver_t gfx_ctx_d3d = {
|
|||||||
gfx_ctx_d3d_swap_buffers,
|
gfx_ctx_d3d_swap_buffers,
|
||||||
gfx_ctx_d3d_input_driver,
|
gfx_ctx_d3d_input_driver,
|
||||||
NULL,
|
NULL,
|
||||||
#ifdef HAVE_EGL
|
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
|
||||||
gfx_ctx_d3d_show_mouse,
|
gfx_ctx_d3d_show_mouse,
|
||||||
"d3d",
|
"d3d",
|
||||||
};
|
};
|
||||||
|
@ -989,4 +989,3 @@ const gfx_ctx_driver_t gfx_ctx_drm_egl = {
|
|||||||
"kms-egl",
|
"kms-egl",
|
||||||
gfx_ctx_drm_egl_bind_hw_render,
|
gfx_ctx_drm_egl_bind_hw_render,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -154,10 +154,8 @@ const gfx_ctx_driver_t gfx_ctx_null = {
|
|||||||
gfx_ctx_null_swap_buffers,
|
gfx_ctx_null_swap_buffers,
|
||||||
gfx_ctx_null_input_driver,
|
gfx_ctx_null_input_driver,
|
||||||
NULL,
|
NULL,
|
||||||
#ifdef HAVE_EGL
|
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
|
||||||
gfx_ctx_null_show_mouse,
|
gfx_ctx_null_show_mouse,
|
||||||
"null",
|
"null",
|
||||||
gfx_ctx_null_bind_hw_render,
|
gfx_ctx_null_bind_hw_render,
|
||||||
|
@ -813,10 +813,8 @@ const gfx_ctx_driver_t gfx_ctx_glx = {
|
|||||||
gfx_ctx_glx_swap_buffers,
|
gfx_ctx_glx_swap_buffers,
|
||||||
gfx_ctx_glx_input_driver,
|
gfx_ctx_glx_input_driver,
|
||||||
gfx_ctx_glx_get_proc_address,
|
gfx_ctx_glx_get_proc_address,
|
||||||
#ifdef HAVE_EGL
|
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
|
||||||
gfx_ctx_glx_show_mouse,
|
gfx_ctx_glx_show_mouse,
|
||||||
"glx",
|
"glx",
|
||||||
|
|
||||||
|
@ -332,10 +332,8 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = {
|
|||||||
gfx_ctx_mali_fbdev_swap_buffers,
|
gfx_ctx_mali_fbdev_swap_buffers,
|
||||||
gfx_ctx_mali_fbdev_input_driver,
|
gfx_ctx_mali_fbdev_input_driver,
|
||||||
gfx_ctx_mali_fbdev_get_proc_address,
|
gfx_ctx_mali_fbdev_get_proc_address,
|
||||||
#ifdef HAVE_EGL
|
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
|
||||||
NULL,
|
NULL,
|
||||||
"mali-fbdev",
|
"mali-fbdev",
|
||||||
};
|
};
|
||||||
|
@ -400,6 +400,8 @@ const gfx_ctx_driver_t gfx_ctx_ps3 = {
|
|||||||
gfx_ctx_ps3_input_driver,
|
gfx_ctx_ps3_input_driver,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
"ps3",
|
"ps3",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -447,10 +447,8 @@ const gfx_ctx_driver_t gfx_ctx_sdl_gl =
|
|||||||
sdl_ctx_swap_buffers,
|
sdl_ctx_swap_buffers,
|
||||||
sdl_ctx_input_driver,
|
sdl_ctx_input_driver,
|
||||||
sdl_ctx_get_proc_address,
|
sdl_ctx_get_proc_address,
|
||||||
#ifdef HAVE_EGL
|
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
|
||||||
sdl_ctx_show_mouse,
|
sdl_ctx_show_mouse,
|
||||||
"sdl_gl",
|
"sdl_gl",
|
||||||
NULL /* bind_hw_render */
|
NULL /* bind_hw_render */
|
||||||
|
@ -315,10 +315,8 @@ const gfx_ctx_driver_t gfx_ctx_vivante_fbdev = {
|
|||||||
gfx_ctx_vivante_swap_buffers,
|
gfx_ctx_vivante_swap_buffers,
|
||||||
gfx_ctx_vivante_input_driver,
|
gfx_ctx_vivante_input_driver,
|
||||||
gfx_ctx_vivante_get_proc_address,
|
gfx_ctx_vivante_get_proc_address,
|
||||||
#ifdef HAVE_EGL
|
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
|
||||||
NULL,
|
NULL,
|
||||||
"vivante-fbdev",
|
"vivante-fbdev",
|
||||||
};
|
};
|
||||||
|
@ -716,10 +716,8 @@ const gfx_ctx_driver_t gfx_ctx_wgl = {
|
|||||||
gfx_ctx_wgl_swap_buffers,
|
gfx_ctx_wgl_swap_buffers,
|
||||||
gfx_ctx_wgl_input_driver,
|
gfx_ctx_wgl_input_driver,
|
||||||
gfx_ctx_wgl_get_proc_address,
|
gfx_ctx_wgl_get_proc_address,
|
||||||
#ifdef HAVE_EGL
|
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
|
||||||
gfx_ctx_wgl_show_mouse,
|
gfx_ctx_wgl_show_mouse,
|
||||||
"wgl",
|
"wgl",
|
||||||
gfx_ctx_wgl_bind_hw_render,
|
gfx_ctx_wgl_bind_hw_render,
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
/* RetroArch - A frontend for libretro.
|
||||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||||
* Copyright (C) 2011-2015 - Daniel De Matteis
|
* Copyright (C) 2011-2015 - Daniel De Matteis
|
||||||
*
|
*
|
||||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||||
* of the GNU General Public License as published by the Free Software Found-
|
* of the GNU General Public License as published by the Free Software Found-
|
||||||
* ation, either version 3 of the License, or (at your option) any later version.
|
* ation, either version 3 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
* PURPOSE. See the GNU General Public License for more details.
|
* PURPOSE. See the GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* X/EGL context. Mostly used for testing GLES code paths.
|
/* X/EGL context. Mostly used for testing GLES code paths.
|
||||||
* Should be its own file as it has lots of X11 stuff baked into it as well.
|
* Should be its own file as it has lots of X11 stuff baked into it as well.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../driver.h"
|
#include "../../driver.h"
|
||||||
#include "../../runloop.h"
|
#include "../../runloop.h"
|
||||||
@ -265,12 +265,12 @@ static void gfx_ctx_xegl_get_video_size(void *data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define XEGL_ATTRIBS_BASE \
|
#define XEGL_ATTRIBS_BASE \
|
||||||
EGL_SURFACE_TYPE, EGL_WINDOW_BIT, \
|
EGL_SURFACE_TYPE, EGL_WINDOW_BIT, \
|
||||||
EGL_RED_SIZE, 1, \
|
EGL_RED_SIZE, 1, \
|
||||||
EGL_GREEN_SIZE, 1, \
|
EGL_GREEN_SIZE, 1, \
|
||||||
EGL_BLUE_SIZE, 1, \
|
EGL_BLUE_SIZE, 1, \
|
||||||
EGL_ALPHA_SIZE, 0, \
|
EGL_ALPHA_SIZE, 0, \
|
||||||
EGL_DEPTH_SIZE, 0
|
EGL_DEPTH_SIZE, 0
|
||||||
|
|
||||||
static bool gfx_ctx_xegl_init(void *data)
|
static bool gfx_ctx_xegl_init(void *data)
|
||||||
{
|
{
|
||||||
@ -706,10 +706,9 @@ static void gfx_ctx_xegl_destroy(void *data)
|
|||||||
static void gfx_ctx_xegl_input_driver(void *data,
|
static void gfx_ctx_xegl_input_driver(void *data,
|
||||||
const input_driver_t **input, void **input_data)
|
const input_driver_t **input, void **input_data)
|
||||||
{
|
{
|
||||||
void *xinput;
|
void *xinput = input_x.init();
|
||||||
|
|
||||||
(void)data;
|
(void)data;
|
||||||
xinput = input_x.init();
|
|
||||||
|
|
||||||
*input = xinput ? &input_x : NULL;
|
*input = xinput ? &input_x : NULL;
|
||||||
*input_data = xinput;
|
*input_data = xinput;
|
||||||
@ -809,12 +808,13 @@ static void gfx_ctx_xegl_bind_hw_render(void *data, bool enable)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool gfx_ctx_xegl_get_metrics(void *data,
|
static bool gfx_ctx_xegl_get_metrics(void *data,
|
||||||
enum display_metric_types type, float *value)
|
enum display_metric_types type, float *value)
|
||||||
{
|
{
|
||||||
return x11_get_metrics(data, type, value);
|
return x11_get_metrics(data, type, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
const gfx_ctx_driver_t gfx_ctx_x_egl = {
|
const gfx_ctx_driver_t gfx_ctx_x_egl =
|
||||||
|
{
|
||||||
gfx_ctx_xegl_init,
|
gfx_ctx_xegl_init,
|
||||||
gfx_ctx_xegl_destroy,
|
gfx_ctx_xegl_destroy,
|
||||||
gfx_ctx_xegl_bind_api,
|
gfx_ctx_xegl_bind_api,
|
||||||
@ -841,4 +841,3 @@ const gfx_ctx_driver_t gfx_ctx_x_egl = {
|
|||||||
"x-egl",
|
"x-egl",
|
||||||
gfx_ctx_xegl_bind_hw_render,
|
gfx_ctx_xegl_bind_hw_render,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -127,7 +127,6 @@ typedef struct gfx_ctx_driver
|
|||||||
* Does not take opaque, to avoid lots of ugly wrapper code. */
|
* Does not take opaque, to avoid lots of ugly wrapper code. */
|
||||||
gfx_ctx_proc_t (*get_proc_address)(const char*);
|
gfx_ctx_proc_t (*get_proc_address)(const char*);
|
||||||
|
|
||||||
#ifdef HAVE_EGL
|
|
||||||
/* Returns true if this context supports EGLImage buffers for
|
/* Returns true if this context supports EGLImage buffers for
|
||||||
* screen drawing and was initalized correctly. */
|
* screen drawing and was initalized correctly. */
|
||||||
bool (*init_egl_image_buffer)(void*, const video_info_t*);
|
bool (*init_egl_image_buffer)(void*, const video_info_t*);
|
||||||
@ -139,7 +138,6 @@ typedef struct gfx_ctx_driver
|
|||||||
bool (*write_egl_image)(void*, const void *frame, unsigned width,
|
bool (*write_egl_image)(void*, const void *frame, unsigned width,
|
||||||
unsigned height, unsigned pitch, bool rgb32,
|
unsigned height, unsigned pitch, bool rgb32,
|
||||||
unsigned index, void **image_handle);
|
unsigned index, void **image_handle);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Shows or hides mouse. Can be NULL if context doesn't
|
/* Shows or hides mouse. Can be NULL if context doesn't
|
||||||
* have a concept of mouse pointer. */
|
* have a concept of mouse pointer. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user