mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Get rid of HAVE_MENU ifdefs for video_driver_poke interface
This commit is contained in:
parent
7f38ee79f7
commit
7dcd46a20f
@ -324,9 +324,7 @@ static const video_poke_interface_t caca_poke_interface = {
|
|||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
NULL,
|
NULL,
|
||||||
#ifdef HAVE_MENU
|
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void caca_gfx_get_poke_interface(void *data,
|
static void caca_gfx_get_poke_interface(void *data,
|
||||||
|
@ -552,9 +552,7 @@ static const video_poke_interface_t gdi_poke_interface = {
|
|||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
NULL,
|
NULL,
|
||||||
#ifdef HAVE_MENU
|
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void gdi_gfx_get_poke_interface(void *data,
|
static void gdi_gfx_get_poke_interface(void *data,
|
||||||
|
@ -2561,16 +2561,9 @@ static const video_poke_interface_t gl_poke_interface = {
|
|||||||
gl_set_texture_frame,
|
gl_set_texture_frame,
|
||||||
gl_set_texture_enable,
|
gl_set_texture_enable,
|
||||||
gl_set_osd_msg,
|
gl_set_osd_msg,
|
||||||
#if defined(HAVE_MENU)
|
|
||||||
gl_show_mouse,
|
gl_show_mouse,
|
||||||
#else
|
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
|
||||||
|
|
||||||
NULL,
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
gl_get_current_shader,
|
gl_get_current_shader,
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void gl_get_poke_interface(void *data,
|
static void gl_get_poke_interface(void *data,
|
||||||
|
@ -706,7 +706,6 @@ static void sdl2_poke_set_osd_msg(void *data,
|
|||||||
RARCH_LOG("[SDL2]: OSD MSG: %s\n", msg);
|
RARCH_LOG("[SDL2]: OSD MSG: %s\n", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
static void sdl2_show_mouse(void *data, bool state)
|
static void sdl2_show_mouse(void *data, bool state)
|
||||||
{
|
{
|
||||||
(void)data;
|
(void)data;
|
||||||
@ -718,7 +717,6 @@ static void sdl2_grab_mouse_toggle(void *data)
|
|||||||
sdl2_video_t *vid = (sdl2_video_t*)data;
|
sdl2_video_t *vid = (sdl2_video_t*)data;
|
||||||
SDL_SetWindowGrab(vid->window, SDL_GetWindowGrab(vid->window));
|
SDL_SetWindowGrab(vid->window, SDL_GetWindowGrab(vid->window));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static video_poke_interface_t sdl2_video_poke_interface = {
|
static video_poke_interface_t sdl2_video_poke_interface = {
|
||||||
NULL, /* set_coords */
|
NULL, /* set_coords */
|
||||||
@ -737,13 +735,8 @@ static video_poke_interface_t sdl2_video_poke_interface = {
|
|||||||
sdl2_poke_set_texture_frame,
|
sdl2_poke_set_texture_frame,
|
||||||
sdl2_poke_texture_enable,
|
sdl2_poke_texture_enable,
|
||||||
sdl2_poke_set_osd_msg,
|
sdl2_poke_set_osd_msg,
|
||||||
#ifdef HAVE_MENU
|
|
||||||
sdl2_show_mouse,
|
sdl2_show_mouse,
|
||||||
sdl2_grab_mouse_toggle,
|
sdl2_grab_mouse_toggle,
|
||||||
#else
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
#endif
|
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -499,14 +499,12 @@ static void sdl_set_texture_enable(void *data, bool state, bool full_screen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
static void sdl_show_mouse(void *data, bool state)
|
static void sdl_show_mouse(void *data, bool state)
|
||||||
{
|
{
|
||||||
(void)data;
|
(void)data;
|
||||||
|
|
||||||
SDL_ShowCursor(state);
|
SDL_ShowCursor(state);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static void sdl_grab_mouse_toggle(void *data)
|
static void sdl_grab_mouse_toggle(void *data)
|
||||||
{
|
{
|
||||||
@ -534,11 +532,7 @@ static const video_poke_interface_t sdl_poke_interface = {
|
|||||||
sdl_set_texture_frame,
|
sdl_set_texture_frame,
|
||||||
sdl_set_texture_enable,
|
sdl_set_texture_enable,
|
||||||
NULL,
|
NULL,
|
||||||
#ifdef HAVE_MENU
|
|
||||||
sdl_show_mouse,
|
sdl_show_mouse,
|
||||||
#else
|
|
||||||
NULL,
|
|
||||||
#endif
|
|
||||||
sdl_grab_mouse_toggle,
|
sdl_grab_mouse_toggle,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
@ -69,7 +69,7 @@ static void *switch_init(const video_info_t *video,
|
|||||||
|
|
||||||
RARCH_LOG("loading switch gfx driver, width: %d, height: %d\n", video->width, video->height);
|
RARCH_LOG("loading switch gfx driver, width: %d, height: %d\n", video->width, video->height);
|
||||||
|
|
||||||
if(has_initialized)
|
if (has_initialized)
|
||||||
RARCH_LOG("global graphics were already initialized; skipping...\n");
|
RARCH_LOG("global graphics were already initialized; skipping...\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -192,17 +192,23 @@ static bool switch_frame(void *data, const void *frame,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_MENU)
|
#if defined(HAVE_MENU)
|
||||||
if(sw->menu_texture.enable)
|
if (sw->menu_texture.enable)
|
||||||
{
|
{
|
||||||
menu_driver_frame(video_info);
|
menu_driver_frame(video_info);
|
||||||
|
|
||||||
if(sw->menu_texture.pixels != NULL)
|
if (sw->menu_texture.pixels)
|
||||||
{
|
{
|
||||||
//if(sw->menu_texture.fullscreen) {
|
#if 0
|
||||||
|
if (sw->menu_texture.fullscreen)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
scaler_ctx_scale(&sw->menu_texture.scaler, image, sw->menu_texture.pixels);
|
scaler_ctx_scale(&sw->menu_texture.scaler, image, sw->menu_texture.pixels);
|
||||||
//} else {
|
#if 0
|
||||||
|
}
|
||||||
//}
|
else
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -217,11 +223,11 @@ static bool switch_frame(void *data, const void *frame,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (msg != NULL && strlen(msg) > 0)
|
if (msg && strlen(msg) > 0)
|
||||||
RARCH_LOG("message: %s\n", msg);
|
RARCH_LOG("message: %s\n", msg);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (sw->vsync) // vsync seems to sometimes return before the buffer has actually been dequeued?
|
if (sw->vsync) /* vsync seems to sometimes return before the buffer has actually been dequeued? */
|
||||||
switch_wait_vsync(sw);
|
switch_wait_vsync(sw);
|
||||||
|
|
||||||
post_vsync = svcGetSystemTick();
|
post_vsync = svcGetSystemTick();
|
||||||
@ -323,15 +329,15 @@ static void switch_set_texture_frame(
|
|||||||
{
|
{
|
||||||
switch_video_t *sw = data;
|
switch_video_t *sw = data;
|
||||||
|
|
||||||
if ( sw->menu_texture.pixels == NULL ||
|
if ( !sw->menu_texture.pixels ||
|
||||||
sw->menu_texture.width != width ||
|
sw->menu_texture.width != width ||
|
||||||
sw->menu_texture.height != height)
|
sw->menu_texture.height != height)
|
||||||
{
|
{
|
||||||
if(sw->menu_texture.pixels != NULL)
|
if (sw->menu_texture.pixels)
|
||||||
free(sw->menu_texture.pixels);
|
free(sw->menu_texture.pixels);
|
||||||
|
|
||||||
sw->menu_texture.pixels = malloc(width * height * 4);
|
sw->menu_texture.pixels = malloc(width * height * 4);
|
||||||
if(sw->menu_texture.pixels == NULL)
|
if (!sw->menu_texture.pixels)
|
||||||
{
|
{
|
||||||
RARCH_ERR("failed to allocate buffer for menu texture\n");
|
RARCH_ERR("failed to allocate buffer for menu texture\n");
|
||||||
return;
|
return;
|
||||||
@ -355,14 +361,14 @@ static void switch_set_texture_frame(
|
|||||||
|
|
||||||
sctx->scaler_type = SCALER_TYPE_POINT;
|
sctx->scaler_type = SCALER_TYPE_POINT;
|
||||||
|
|
||||||
if(!scaler_ctx_gen_filter(sctx))
|
if (!scaler_ctx_gen_filter(sctx))
|
||||||
{
|
{
|
||||||
RARCH_ERR("failed to generate scaler for menu texture\n");
|
RARCH_ERR("failed to generate scaler for menu texture\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(rgb32)
|
if (rgb32)
|
||||||
memcpy(sw->menu_texture.pixels, frame, width * height * 4);
|
memcpy(sw->menu_texture.pixels, frame, width * height * 4);
|
||||||
else
|
else
|
||||||
conv_rgb565_argb8888(sw->menu_texture.pixels, frame,
|
conv_rgb565_argb8888(sw->menu_texture.pixels, frame,
|
||||||
|
@ -411,9 +411,7 @@ static const video_poke_interface_t vga_poke_interface = {
|
|||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
NULL,
|
NULL,
|
||||||
#ifdef HAVE_MENU
|
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void vga_gfx_get_poke_interface(void *data,
|
static void vga_gfx_get_poke_interface(void *data,
|
||||||
|
@ -173,14 +173,15 @@ static void xshm_poke_apply_state_changes(void *data)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
static void xshm_poke_set_texture_frame(void *data,
|
||||||
static void xshm_poke_set_texture_frame(void *data, const void *frame, bool rgb32,
|
const void *frame, bool rgb32,
|
||||||
unsigned width, unsigned height, float alpha)
|
unsigned width, unsigned height, float alpha)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xshm_poke_texture_enable(void *data, bool enable, bool full_screen)
|
static void xshm_poke_texture_enable(void *data,
|
||||||
|
bool enable, bool full_screen)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -201,7 +202,6 @@ static void xshm_grab_mouse_toggle(void *data)
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static video_poke_interface_t xshm_video_poke_interface = {
|
static video_poke_interface_t xshm_video_poke_interface = {
|
||||||
NULL, /* set_coords */
|
NULL, /* set_coords */
|
||||||
@ -220,13 +220,8 @@ static video_poke_interface_t xshm_video_poke_interface = {
|
|||||||
xshm_poke_set_texture_frame,
|
xshm_poke_set_texture_frame,
|
||||||
xshm_poke_texture_enable,
|
xshm_poke_texture_enable,
|
||||||
xshm_poke_set_osd_msg,
|
xshm_poke_set_osd_msg,
|
||||||
#ifdef HAVE_MENU
|
|
||||||
xshm_show_mouse,
|
xshm_show_mouse,
|
||||||
xshm_grab_mouse_toggle,
|
xshm_grab_mouse_toggle,
|
||||||
#else
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
#endif
|
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user