This commit is contained in:
twinaphex 2020-08-03 16:33:54 +02:00
parent 3653451c40
commit 72afa2f932
38 changed files with 403 additions and 263 deletions

View File

@ -18,7 +18,9 @@ typedef struct
struct video_viewport vp;
struct texture_image *overlay;
bool overlay_enabled;
#ifdef HAVE_MENU
bool in_menu;
#endif
struct
{
bool enable;

View File

@ -101,7 +101,9 @@ static bool caca_gfx_frame(void *data, const void *frame,
unsigned height = 0;
bool draw = true;
caca_t *caca = (caca_t*)data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
if (!frame || !frame_width || !frame_height)
return true;
@ -123,8 +125,10 @@ static bool caca_gfx_frame(void *data, const void *frame,
if (!caca->cv)
return true;
#ifdef HAVE_MENU
if (caca->menu_frame && menu_is_alive)
frame_to_copy = caca->menu_frame;
#endif
width = caca_get_canvas_width(caca->cv);
height = caca_get_canvas_height(caca->cv);
@ -135,8 +139,10 @@ static bool caca_gfx_frame(void *data, const void *frame,
(frame_width < width && frame_height < height))
draw = false;
#ifdef HAVE_MENU
if (menu_is_alive)
draw = false;
#endif
caca_clear_canvas(caca->cv);

View File

@ -558,7 +558,9 @@ static bool ctr_frame(void* data, const void* frame,
int custom_vp_y = video_info->custom_vp_y;
unsigned custom_vp_width = video_info->custom_vp_width;
unsigned custom_vp_height = video_info->custom_vp_height;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
if (!width || !height || !settings)
{

View File

@ -1207,6 +1207,9 @@ static bool d3d10_gfx_frame(
&video_info->osd_stat_params;
const char *stat_text = video_info->stat_text;
bool menu_is_alive = video_info->menu_is_alive;
#ifdef HAVE_GFX_WIDGETS
bool widgets_active = video_info->widgets_active;
#endif
if (d3d10->resize_chain)
{
@ -1509,7 +1512,7 @@ static bool d3d10_gfx_frame(
#endif
#ifdef HAVE_GFX_WIDGETS
if (video_info->widgets_active)
if (widgets_active)
gfx_widgets_frame(video_info);
#endif

View File

@ -1288,6 +1288,9 @@ static bool d3d11_gfx_frame(
bool statistics_show = video_info->statistics_show;
struct font_params* osd_params = (struct font_params*)&video_info->osd_stat_params;
bool menu_is_alive = video_info->menu_is_alive;
#ifdef HAVE_GFX_WIDGETS
bool widgets_active = video_info->widgets_active;
#endif
if (d3d11->resize_chain)
{
@ -1584,7 +1587,7 @@ static bool d3d11_gfx_frame(
#endif
#ifdef HAVE_GFX_WIDGETS
if (video_info->widgets_active)
if (widgets_active)
gfx_widgets_frame(video_info);
#endif

View File

@ -1177,7 +1177,9 @@ static bool d3d12_gfx_frame(
struct font_params *osd_params = (struct font_params*)
&video_info->osd_stat_params;
bool menu_is_alive = video_info->menu_is_alive;
#ifdef HAVE_GFX_WIDGETS
bool widgets_active = video_info->widgets_active;
#endif
d3d12_gfx_sync(d3d12);
@ -1572,7 +1574,7 @@ static bool d3d12_gfx_frame(
#endif
#ifdef HAVE_GFX_WIDGETS
if (video_info->widgets_active)
if (widgets_active)
gfx_widgets_frame(video_info);
#endif

View File

@ -1494,9 +1494,9 @@ static bool d3d8_frame(void *data, const void *frame,
const char *stat_text = video_info->stat_text;
bool statistics_show = video_info->statistics_show;
bool black_frame_insertion = video_info->black_frame_insertion;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
(void)i;
#endif
if (!frame)
return true;

View File

@ -1533,6 +1533,9 @@ static bool d3d9_frame(void *data, const void *frame,
&video_info->osd_stat_params;
const char *stat_text = video_info->stat_text;
bool menu_is_alive = video_info->menu_is_alive;
#ifdef HAVE_GFX_WIDGETS
bool widgets_active = video_info->widgets_active;
#endif
if (!frame)
return true;
@ -1627,7 +1630,7 @@ static bool d3d9_frame(void *data, const void *frame,
#endif
#ifdef HAVE_GFX_WIDGETS
if (video_info->widgets_active)
if (widgets_active)
gfx_widgets_frame(video_info);
#endif

View File

@ -757,7 +757,9 @@ static bool drm_gfx_frame(void *data, const void *frame, unsigned width,
video_frame_info_t *video_info)
{
struct drm_video *_drmvars = data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
if ( ( width != _drmvars->core_width) ||
(height != _drmvars->core_height))

View File

@ -1283,11 +1283,13 @@ static bool exynos_gfx_frame(void *data, const void *frame, unsigned width,
{
struct exynos_video *vid = data;
struct exynos_page *page = NULL;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
/* Check if neither menu nor core framebuffer is to be displayed. */
if (!vid->menu_active && !frame)
return true;
#endif
if (frame)
{

View File

@ -141,7 +141,9 @@ static bool fpga_gfx_frame(void *data, const void *frame,
bool draw = true;
fpga_t *fpga = (fpga_t*)data;
unsigned bits = fpga->video_bits;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
if (!frame || !frame_width || !frame_height)
return true;
@ -162,7 +164,8 @@ static bool fpga_gfx_frame(void *data, const void *frame,
}
}
if (fpga->menu_frame && video_info->menu_is_alive)
#ifdef HAVE_MENU
if (fpga->menu_frame && menu_is_alive)
{
frame_to_copy = fpga->menu_frame;
width = fpga->menu_width;
@ -171,6 +174,7 @@ static bool fpga_gfx_frame(void *data, const void *frame,
bits = fpga->menu_bits;
}
else
#endif
{
width = fpga->video_width;
height = fpga->video_height;
@ -179,8 +183,10 @@ static bool fpga_gfx_frame(void *data, const void *frame,
if (frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height))
draw = false;
if (video_info->menu_is_alive)
#ifdef HAVE_MENU
if (menu_is_alive)
draw = false;
#endif
}
if (draw)

View File

@ -466,7 +466,12 @@ static bool gcm_frame(void* data, const void* frame,
uint64_t frame_count,
unsigned pitch, const char* msg, video_frame_info_t *video_info)
{
gcm_video_t *gcm = (gcm_video_t*)data;
gcm_video_t *gcm = (gcm_video_t*)data;
#ifdef HAVE_MENU
bool statistics_show = video_info->statistics_show;
struct font_params *osd_params = (struct font_params*)
&video_info->osd_stat_params;
#endif
if(frame && width && height)
{
@ -484,17 +489,11 @@ static bool gcm_frame(void* data, const void* frame,
return true;
#ifdef HAVE_MENU
if (video_info->statistics_show)
{
struct font_params *osd_params = (struct font_params*)
&video_info->osd_stat_params;
if (statistics_show)
if (osd_params)
{
font_driver_render_msg(gcm, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params, NULL);
}
}
font_driver_render_msg(gcm,
video_info->stat_text,
osd_params, NULL);
#endif
if (msg)

View File

@ -297,16 +297,18 @@ static bool gdi_gfx_frame(void *data, const void *frame,
unsigned pitch, const char *msg, video_frame_info_t *video_info)
{
BITMAPINFO info;
unsigned mode_width = 0;
unsigned mode_height = 0;
const void *frame_to_copy = frame;
unsigned width = 0;
unsigned height = 0;
bool draw = true;
gdi_t *gdi = (gdi_t*)data;
unsigned bits = gdi->video_bits;
HWND hwnd = win32_get_window();
bool menu_is_alive = video_info->menu_is_alive;
unsigned mode_width = 0;
unsigned mode_height = 0;
const void *frame_to_copy = frame;
unsigned width = 0;
unsigned height = 0;
bool draw = true;
gdi_t *gdi = (gdi_t*)data;
unsigned bits = gdi->video_bits;
HWND hwnd = win32_get_window();
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
/* FIXME: Force these settings off as they interfere with the rendering */
video_info->xmb_shadows_enable = false;
@ -332,7 +334,8 @@ static bool gdi_gfx_frame(void *data, const void *frame,
}
}
if (gdi->menu_frame && video_info->menu_is_alive)
#ifdef HAVE_MENU
if (gdi->menu_frame && menu_is_alive)
{
frame_to_copy = gdi->menu_frame;
width = gdi->menu_width;
@ -341,6 +344,7 @@ static bool gdi_gfx_frame(void *data, const void *frame,
bits = gdi->menu_bits;
}
else
#endif
{
width = gdi->video_width;
height = gdi->video_height;
@ -352,8 +356,10 @@ static bool gdi_gfx_frame(void *data, const void *frame,
)
draw = false;
if (video_info->menu_is_alive)
#ifdef HAVE_MENU
if (menu_is_alive)
draw = false;
#endif
}
if (hwnd && !gdi->winDC)

View File

@ -2821,7 +2821,17 @@ static bool gl2_frame(void *data, const void *frame,
struct font_params *osd_params = (struct font_params*)
&video_info->osd_stat_params;
const char *stat_text = video_info->stat_text;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
#ifdef HAVE_GFX_WIDGETS
bool widgets_active = video_info->widgets_active;
#endif
#ifndef EMSCRIPTEN
bool runloop_is_slowmotion = video_info->runloop_is_slowmotion;
bool runloop_is_paused = video_info->runloop_is_paused;
bool black_frame_insertion = video_info->black_frame_insertion;
#endif
if (!gl)
return false;
@ -3049,7 +3059,7 @@ static bool gl2_frame(void *data, const void *frame,
#endif
#ifdef HAVE_GFX_WIDGETS
if (video_info->widgets_active)
if (widgets_active)
gfx_widgets_frame(video_info);
#endif
@ -3085,31 +3095,27 @@ static bool gl2_frame(void *data, const void *frame,
#endif
gl2_pbo_async_readback(gl);
/* emscripten has to do black frame insertion in its main loop */
/* Emscripten has to do black frame insertion in its main loop */
#ifndef EMSCRIPTEN
/* Disable BFI during fast forward, slow-motion,
* and pause to prevent flicker. */
if (
black_frame_insertion
&& !input_driver_nonblock_state
&& !runloop_is_slowmotion
&& !runloop_is_paused)
{
bool runloop_is_slowmotion = video_info->runloop_is_slowmotion;
bool runloop_is_paused = video_info->runloop_is_paused;
bool black_frame_insertion = video_info->black_frame_insertion;
/* Disable BFI during fast forward, slow-motion,
* and pause to prevent flicker. */
if (
black_frame_insertion
&& !input_driver_nonblock_state
&& !runloop_is_slowmotion
&& !runloop_is_paused)
{
if (gl->ctx_driver->swap_buffers)
gl->ctx_driver->swap_buffers(gl->ctx_data);
glClear(GL_COLOR_BUFFER_BIT);
}
if (gl->ctx_driver->swap_buffers)
gl->ctx_driver->swap_buffers(gl->ctx_data);
glClear(GL_COLOR_BUFFER_BIT);
}
#endif
if (gl->ctx_driver->swap_buffers)
gl->ctx_driver->swap_buffers(gl->ctx_data);
/* check if we are fast forwarding or in menu, if we are ignore hard sync */
/* check if we are fast forwarding or in menu,
* if we are ignore hard sync */
if ( gl->have_sync
&& hard_sync
&& !input_driver_nonblock_state

View File

@ -692,26 +692,34 @@ static bool gl1_gfx_frame(void *data, const void *frame,
unsigned frame_width, unsigned frame_height, uint64_t frame_count,
unsigned pitch, const char *msg, video_frame_info_t *video_info)
{
const void *frame_to_copy = NULL;
unsigned mode_width = 0;
unsigned mode_height = 0;
unsigned width = 0;
unsigned height = 0;
bool draw = true;
gl1_t *gl1 = (gl1_t*)data;
unsigned bits = gl1->video_bits;
unsigned pot_width = 0;
unsigned pot_height = 0;
unsigned video_width = video_info->width;
unsigned video_height = video_info->height;
bool menu_is_alive = video_info->menu_is_alive;
const void *frame_to_copy = NULL;
unsigned mode_width = 0;
unsigned mode_height = 0;
unsigned width = 0;
unsigned height = 0;
bool draw = true;
gl1_t *gl1 = (gl1_t*)data;
unsigned bits = gl1->video_bits;
unsigned pot_width = 0;
unsigned pot_height = 0;
unsigned video_width = video_info->width;
unsigned video_height = video_info->height;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
#ifdef HAVE_GFX_WIDGETS
bool widgets_active = video_info->widgets_active;
#endif
bool hard_sync = video_info->hard_sync;
struct font_params *osd_params = (struct font_params*)
&video_info->osd_stat_params;
gl1_context_bind_hw_render(gl1, false);
/* FIXME: Force these settings off as they interfere with the rendering */
video_info->xmb_shadows_enable = false;
video_info->menu_shader_pipeline = 0;
gl1_context_bind_hw_render(gl1, false);
if (gl1->should_resize)
{
gfx_ctx_mode_t mode;
@ -803,7 +811,7 @@ static bool gl1_gfx_frame(void *data, const void *frame,
width, height, gl1->tex, frame_to_copy);
}
if (gl1->menu_frame && video_info->menu_is_alive)
if (gl1->menu_frame && menu_is_alive)
{
frame_to_copy = NULL;
width = gl1->menu_width;
@ -824,22 +832,27 @@ static bool gl1_gfx_frame(void *data, const void *frame,
}
if (!gl1->menu_video_buf)
gl1->menu_video_buf = (unsigned char*)malloc(pot_width * pot_height * 4);
gl1->menu_video_buf = (unsigned char*)
malloc(pot_width * pot_height * 4);
if (bits == 16 && gl1->menu_video_buf)
{
conv_rgba4444_argb8888(gl1->menu_video_buf, gl1->menu_frame, width, height, pot_width * sizeof(unsigned), pitch);
conv_rgba4444_argb8888(gl1->menu_video_buf,
gl1->menu_frame, width, height,
pot_width * sizeof(unsigned), pitch);
frame_to_copy = gl1->menu_video_buf;
if (gl1->menu_texture_full_screen)
{
glViewport(0, 0, video_width, video_height);
draw_tex(gl1, pot_width, pot_height, width, height, gl1->menu_tex, frame_to_copy);
draw_tex(gl1, pot_width, pot_height,
width, height, gl1->menu_tex, frame_to_copy);
glViewport(gl1->vp.x, gl1->vp.y, gl1->vp.width, gl1->vp.height);
}
else
draw_tex(gl1, pot_width, pot_height, width, height, gl1->menu_tex, frame_to_copy);
draw_tex(gl1, pot_width, pot_height,
width, height, gl1->menu_tex, frame_to_copy);
}
}
@ -850,13 +863,10 @@ static bool gl1_gfx_frame(void *data, const void *frame,
#endif
if (video_info->statistics_show)
{
struct font_params *osd_params = (struct font_params*)
&video_info->osd_stat_params;
if (osd_params)
{
font_driver_render_msg(gl1, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params, NULL);
osd_params, NULL);
#if 0
osd_params->y = 0.350f;
osd_params->scale = 0.75f;
@ -867,7 +877,7 @@ static bool gl1_gfx_frame(void *data, const void *frame,
}
#ifdef HAVE_GFX_WIDGETS
if (video_info->widgets_active)
if (widgets_active)
gfx_widgets_frame(video_info);
#endif
@ -889,7 +899,7 @@ static bool gl1_gfx_frame(void *data, const void *frame,
4, GL_RGBA, GL_UNSIGNED_BYTE,
gl1->readback_buffer_screenshot);
/* emscripten has to do black frame insertion in its main loop */
/* Emscripten has to do black frame insertion in its main loop */
#ifndef EMSCRIPTEN
/* Disable BFI during fast forward, slow-motion,
* and pause to prevent flicker. */
@ -909,7 +919,7 @@ static bool gl1_gfx_frame(void *data, const void *frame,
gl1->ctx_driver->swap_buffers(gl1->ctx_data);
/* check if we are fast forwarding or in menu, if we are ignore hard sync */
if (video_info->hard_sync
if (hard_sync
&& !video_info->input_driver_nonblock_state
&& !gl1->menu_texture_enable)
{

View File

@ -1856,7 +1856,13 @@ static bool gl_core_frame(void *data, const void *frame,
bool runloop_is_paused = video_info->runloop_is_paused;
bool runloop_is_slowmotion = video_info->runloop_is_slowmotion;
bool input_driver_nonblock_state = video_info->input_driver_nonblock_state;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
#ifdef HAVE_GFX_WIDGETS
bool widgets_active = video_info->widgets_active;
#endif
bool hard_sync = video_info->hard_sync;
if (!gl)
return false;
@ -1951,7 +1957,7 @@ static bool gl_core_frame(void *data, const void *frame,
#endif
#ifdef HAVE_GFX_WIDGETS
if (video_info->widgets_active)
if (widgets_active)
gfx_widgets_frame(video_info);
#endif
@ -1997,7 +2003,7 @@ static bool gl_core_frame(void *data, const void *frame,
if (gl->ctx_driver->swap_buffers)
gl->ctx_driver->swap_buffers(gl->ctx_data);
if (video_info->hard_sync &&
if (hard_sync &&
!input_driver_nonblock_state &&
!gl->menu_texture_enable)
{

View File

@ -1049,10 +1049,16 @@ static bool wiiu_gfx_frame(void *data, const void *frame,
unsigned pitch, const char *msg, video_frame_info_t *video_info)
{
uint32_t i;
wiiu_video_t *wiiu = (wiiu_video_t *) data;
bool menu_is_alive = video_info->menu_is_alive;
(void)msg;
wiiu_video_t *wiiu = (wiiu_video_t *) data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
#ifdef HAVE_GFX_WIDGETS
bool widgets_active = video_info->widgets_active;
#endif
struct font_params *osd_params = (struct font_params*)
&video_info->osd_stat_params;
bool statistics_show = video_info->statistics_show;
if (wiiu->vsync)
{
@ -1349,18 +1355,15 @@ static bool wiiu_gfx_frame(void *data, const void *frame,
menu_driver_frame(menu_is_alive, video_info);
else
#endif
if (video_info->statistics_show)
{
struct font_params *osd_params = (struct font_params*)
&video_info->osd_stat_params;
if (osd_params)
font_driver_render_msg(wiiu, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params, NULL);
}
if (statistics_show)
{
if (osd_params)
font_driver_render_msg(wiiu, video_info->stat_text,
osd_params, NULL);
}
#ifdef HAVE_GFX_WIDGETS
if (video_info->widgets_active)
if (widgets_active)
gfx_widgets_frame(video_info);
#endif
@ -1370,9 +1373,13 @@ static bool wiiu_gfx_frame(void *data, const void *frame,
wiiu->render_msg_enabled = false;
GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER,
wiiu->vertex_cache.v, wiiu->vertex_cache.current * sizeof(*wiiu->vertex_cache.v));
wiiu->vertex_cache.v,
wiiu->vertex_cache.current
* sizeof(*wiiu->vertex_cache.v));
GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER,
wiiu->vertex_cache_tex.v, wiiu->vertex_cache_tex.current * sizeof(*wiiu->vertex_cache_tex.v));
wiiu->vertex_cache_tex.v,
wiiu->vertex_cache_tex.current
* sizeof(*wiiu->vertex_cache_tex.v));
if (wiiu->menu.enable)
GX2DrawDone();

View File

@ -1574,7 +1574,10 @@ static bool gx_frame(void *data, const void *frame,
unsigned overscan_corr_bottom = settings->uints.video_overscan_correction_bottom;
bool video_smooth = settings->bools.video_smooth;
unsigned video_aspect_ratio_idx = settings->uints.video_aspect_ratio_idx;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
bool fps_show = video_info->fps_show;
fps_text_buf[0] = '\0';
@ -1683,7 +1686,7 @@ static bool gx_frame(void *data, const void *frame,
GX_DrawDone();
if (video_info->fps_show)
if (fps_show)
{
char mem1_txt[128];
char mem2_txt[128];

View File

@ -188,7 +188,8 @@ static void *metal_init(
static bool metal_frame(void *data, const void *frame,
unsigned frame_width, unsigned frame_height,
uint64_t frame_count,
unsigned pitch, const char *msg, video_frame_info_t *video_info)
unsigned pitch, const char *msg,
video_frame_info_t *video_info)
{
MetalDriver *md = (__bridge MetalDriver *)data;
return [md renderFrame:frame

View File

@ -174,7 +174,9 @@ static bool network_gfx_frame(void *data, const void *frame,
unsigned pixfmt = NETWORK_VIDEO_PIXELFORMAT_RGB565;
bool draw = true;
network_video_t *network = (network_video_t*)data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
if (!frame || !frame_width || !frame_height)
return true;
@ -198,7 +200,7 @@ static bool network_gfx_frame(void *data, const void *frame,
}
#ifdef HAVE_MENU
if (network_menu_frame && video_info->menu_is_alive)
if (network_menu_frame && menu_is_alive)
{
frame_to_copy = network_menu_frame;
width = network_menu_width;
@ -219,20 +221,25 @@ static bool network_gfx_frame(void *data, const void *frame,
draw = false;
#ifdef HAVE_MENU
if (video_info->menu_is_alive)
if (menu_is_alive)
draw = false;
#endif
}
if (network->video_width != width || network->video_height != height)
if ( network->video_width != width
|| network->video_height != height)
{
network->video_width = width;
network->video_width = width;
network->video_height = height;
if (network_video_temp_buf)
free(network_video_temp_buf);
network_video_temp_buf = (unsigned*)malloc(network->screen_width * network->screen_height * sizeof(unsigned));
network_video_temp_buf = (unsigned*)
malloc(
network->screen_width
* network->screen_height
* sizeof(unsigned));
}
if (bits == 16)
@ -254,15 +261,19 @@ static bool network_gfx_frame(void *data, const void *frame,
unsigned short pixel = ((unsigned short*)frame_to_copy)[width * scaled_y + scaled_x];
/* convert RGBX4444 to RGBX8888 */
unsigned r = ((pixel & 0xF000) << 8) | ((pixel & 0xF000) << 4);
unsigned g = ((pixel & 0x0F00) << 4) | ((pixel & 0x0F00) << 0);
unsigned b = ((pixel & 0x00F0) << 0) | ((pixel & 0x00F0) >> 4);
unsigned r = ((pixel & 0xF000) << 8)
| ((pixel & 0xF000) << 4);
unsigned g = ((pixel & 0x0F00) << 4)
| ((pixel & 0x0F00) << 0);
unsigned b = ((pixel & 0x00F0) << 0)
| ((pixel & 0x00F0) >> 4);
network_video_temp_buf[network->screen_width * y + x] = 0xFF000000 | b | g | r;
network_video_temp_buf[network->screen_width * y + x]
= 0xFF000000 | b | g | r;
}
}
pixfmt = NETWORK_VIDEO_PIXELFORMAT_RGBA8888;
pixfmt = NETWORK_VIDEO_PIXELFORMAT_RGBA8888;
frame_to_copy = network_video_temp_buf;
}
else

View File

@ -249,12 +249,15 @@ static bool oga_gfx_frame(void *data, const void *frame, unsigned width,
uint8_t *src = (uint8_t*)frame;
int bpp = go2_drm_format_get_bpp(
go2_surface_format_get(dst_surface)) / 8;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
bool input_driver_nonblock_state = video_info->input_driver_nonblock_state;
if (unlikely(!frame || width == 0 || height == 0))
return true;
if (unlikely(video_info->input_driver_nonblock_state) && !vid->threaded)
if (unlikely(input_driver_nonblock_state) && !vid->threaded)
{
if (frame_count % 4 != 0)
return true;
@ -318,13 +321,8 @@ static bool oga_gfx_frame(void *data, const void *frame, unsigned width,
static void oga_set_texture_frame(void *data, const void *frame, bool rgb32,
unsigned width, unsigned height, float alpha)
{
oga_video_t *vid = (oga_video_t*)data;
vid->menu_width = width;
vid->menu_height = height;
vid->menu_pitch = width * 4;
unsigned i, j;
oga_video_t *vid = (oga_video_t*)data;
/* Borrowed from drm_gfx
*
* We have to go on a pixel format conversion adventure
@ -336,27 +334,32 @@ static void oga_set_texture_frame(void *data, const void *frame, bool rgb32,
uint32_t line[dst_width];
/* The output pixel array with the converted pixels. */
char *frame_output = vid->menu_buf;
char *frame_output = vid->menu_buf;
/* Remember, memcpy() works with 8bits pointers for increments. */
char *dst_base_addr = frame_output;
for (int i = 0; i < height; i++)
vid->menu_width = width;
vid->menu_height = height;
vid->menu_pitch = width * 4;
for (i = 0; i < height; i++)
{
for (int j = 0; j < src_pitch / 2; j++)
for (j = 0; j < src_pitch / 2; j++)
{
uint16_t src_pix = *((uint16_t*)frame + (src_pitch / 2 * i) + j);
/* The hex AND is for keeping only the part we need for each component. */
uint32_t R = (src_pix << 8) & 0x00FF0000;
uint32_t G = (src_pix << 4) & 0x0000FF00;
uint32_t B = (src_pix << 0) & 0x000000FF;
line[j] = (0 | R | G | B);
/* The hex AND is for keeping only the part
* we need for each component. */
uint32_t R = (src_pix << 8) & 0x00FF0000;
uint32_t G = (src_pix << 4) & 0x0000FF00;
uint32_t B = (src_pix << 0) & 0x000000FF;
line[j] = (0 | R | G | B);
}
memcpy(dst_base_addr + (dst_pitch * i), (char*)line, dst_pitch);
}
if (unlikely(!vid->menu_frame))
vid->menu_frame = frame_output;
if (unlikely(!vid->menu_frame))
vid->menu_frame = frame_output;
}
static void oga_gfx_set_nonblock_state(void *a, bool b, bool c, unsigned d) { }

View File

@ -990,12 +990,16 @@ static bool omap_gfx_frame(void *data, const void *frame, unsigned width,
video_frame_info_t *video_info)
{
omap_video_t *vid = (omap_video_t*)data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
if (!frame)
return true;
if (width > 4 && height > 4 && (width != vid->width || height != vid->height))
if ( (width > 4)
&& (height > 4)
&& (width != vid->width || height != vid->height))
{
RARCH_LOG("[video_omap]: mode set (resolution changed by core)\n");
@ -1005,7 +1009,7 @@ static bool omap_gfx_frame(void *data, const void *frame, unsigned width,
return false;
}
vid->width = width;
vid->width = width;
vid->height = height;
}

View File

@ -264,13 +264,16 @@ static bool ps2_gfx_frame(void *data, const void *frame,
unsigned width, unsigned height, uint64_t frame_count,
unsigned pitch, const char *msg, video_frame_info_t *video_info)
{
ps2_video_t *ps2 = (ps2_video_t*)data;
ps2_video_t *ps2 = (ps2_video_t*)data;
struct font_params *osd_params = (struct font_params*)
&video_info->osd_stat_params;
bool statistics_show = video_info->statistics_show;
if (!width || !height)
return false;
#if defined(DEBUG)
if (frame_count%180==0)
if (frame_count % 180 == 0)
printf("ps2_gfx_frame %lu\n", frame_count);
#endif
@ -305,14 +308,11 @@ static bool ps2_gfx_frame(void *data, const void *frame,
prim_texture(ps2->gsGlobal, ps2->menuTexture, 2, ps2->fullscreen, empty_ps2_insets);
}
}
else if (video_info->statistics_show)
else if (statistics_show)
{
struct font_params *osd_params = (struct font_params*)
&video_info->osd_stat_params;
if (osd_params)
font_driver_render_msg(ps2, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params, NULL);
osd_params, NULL);
}
if(!string_is_empty(msg))

View File

@ -249,7 +249,87 @@ static INLINE void psp_set_tex_coords (psp1_sprite_t* framecoords,
}
static void psp_update_viewport(psp1_video_t* psp,
video_frame_info_t *video_info);
video_frame_info_t *video_info)
{
int x = 0;
int y = 0;
float device_aspect = ((float)SCEGU_SCR_WIDTH) / SCEGU_SCR_HEIGHT;
float width = SCEGU_SCR_WIDTH;
float height = SCEGU_SCR_HEIGHT;
settings_t *settings = config_get_ptr();
bool video_scale_integer = settings->bools.video_scale_integer;
unsigned aspect_ratio_idx = settings->uints.video_aspect_ratio_idx;
if (video_scale_integer)
{
video_viewport_get_scaled_integer(&psp->vp, SCEGU_SCR_WIDTH,
SCEGU_SCR_HEIGHT, video_driver_get_aspect_ratio(), psp->keep_aspect);
width = psp->vp.width;
height = psp->vp.height;
}
else if (psp->keep_aspect)
{
#if defined(HAVE_MENU)
if (aspect_ratio_idx == ASPECT_RATIO_CUSTOM)
{
x = video_info->custom_vp_x;
y = video_info->custom_vp_y;
width = video_info->custom_vp_width;
height = video_info->custom_vp_height;
}
else
#endif
{
float delta;
float desired_aspect = video_driver_get_aspect_ratio();
if ((fabsf(device_aspect - desired_aspect) < 0.0001f)
|| (fabsf((16.0/9.0) - desired_aspect) < 0.02f))
{
/* If the aspect ratios of screen and desired aspect
* ratio are sufficiently equal (floating point stuff),
* assume they are actually equal.
*/
}
else if (device_aspect > desired_aspect)
{
delta = (desired_aspect / device_aspect - 1.0f)
/ 2.0f + 0.5f;
x = (int)roundf(width * (0.5f - delta));
width = (unsigned)roundf(2.0f * width * delta);
}
else
{
delta = (device_aspect / desired_aspect - 1.0f)
/ 2.0f + 0.5f;
y = (int)roundf(height * (0.5f - delta));
height = (unsigned)roundf(2.0f * height * delta);
}
}
psp->vp.x = x;
psp->vp.y = y;
psp->vp.width = width;
psp->vp.height = height;
}
else
{
psp->vp.x = 0;
psp->vp.y = 0;
psp->vp.width = width;
psp->vp.height = height;
}
psp->vp.width += psp->vp.width & 0x1;
psp->vp.height += psp->vp.height & 0x1;
psp_set_screen_coords(psp->frame_coords, psp->vp.x,
psp->vp.y, psp->vp.width, psp->vp.height, psp->rotation);
psp->should_resize = false;
}
static void psp_on_vblank(u32 sub, psp1_video_t *psp)
{
@ -476,7 +556,9 @@ static bool psp_frame(void *data, const void *frame,
unsigned pitch, const char *msg, video_frame_info_t *video_info)
{
psp1_video_t *psp = (psp1_video_t*)data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
if (!width || !height)
return false;
@ -495,9 +577,8 @@ static bool psp_frame(void *data, const void *frame,
pspDebugScreenSetXY(0,0);
pspDebugScreenPuts(msg);
}
if ((psp->vsync)&&(psp->vblank_not_reached))
if ((psp->vsync) && (psp->vblank_not_reached))
sceDisplayWaitVblankStart();
psp->vblank_not_reached = true;
@ -646,88 +727,6 @@ static void psp_set_texture_enable(void *data, bool state, bool full_screen)
psp->menu.active = state;
}
static void psp_update_viewport(psp1_video_t* psp,
video_frame_info_t *video_info)
{
int x = 0;
int y = 0;
float device_aspect = ((float)SCEGU_SCR_WIDTH) / SCEGU_SCR_HEIGHT;
float width = SCEGU_SCR_WIDTH;
float height = SCEGU_SCR_HEIGHT;
settings_t *settings = config_get_ptr();
bool video_scale_integer = settings->bools.video_scale_integer;
unsigned aspect_ratio_idx = settings->uints.video_aspect_ratio_idx;
if (video_scale_integer)
{
video_viewport_get_scaled_integer(&psp->vp, SCEGU_SCR_WIDTH,
SCEGU_SCR_HEIGHT, video_driver_get_aspect_ratio(), psp->keep_aspect);
width = psp->vp.width;
height = psp->vp.height;
}
else if (psp->keep_aspect)
{
#if defined(HAVE_MENU)
if (aspect_ratio_idx == ASPECT_RATIO_CUSTOM)
{
x = video_info->custom_vp_x;
y = video_info->custom_vp_y;
width = video_info->custom_vp_width;
height = video_info->custom_vp_height;
}
else
#endif
{
float delta;
float desired_aspect = video_driver_get_aspect_ratio();
if ((fabsf(device_aspect - desired_aspect) < 0.0001f)
|| (fabsf((16.0/9.0) - desired_aspect) < 0.02f))
{
/* If the aspect ratios of screen and desired aspect
* ratio are sufficiently equal (floating point stuff),
* assume they are actually equal.
*/
}
else if (device_aspect > desired_aspect)
{
delta = (desired_aspect / device_aspect - 1.0f)
/ 2.0f + 0.5f;
x = (int)roundf(width * (0.5f - delta));
width = (unsigned)roundf(2.0f * width * delta);
}
else
{
delta = (device_aspect / desired_aspect - 1.0f)
/ 2.0f + 0.5f;
y = (int)roundf(height * (0.5f - delta));
height = (unsigned)roundf(2.0f * height * delta);
}
}
psp->vp.x = x;
psp->vp.y = y;
psp->vp.width = width;
psp->vp.height = height;
}
else
{
psp->vp.x = 0;
psp->vp.y = 0;
psp->vp.width = width;
psp->vp.height = height;
}
psp->vp.width += psp->vp.width & 0x1;
psp->vp.height += psp->vp.height & 0x1;
psp_set_screen_coords(psp->frame_coords, psp->vp.x,
psp->vp.y, psp->vp.width, psp->vp.height, psp->rotation);
psp->should_resize = false;
}
static void psp_set_rotation(void *data, unsigned rotation)
{
psp1_video_t *psp = (psp1_video_t*)data;

View File

@ -489,7 +489,9 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width,
{
char title[128];
sdl2_video_t *vid = (sdl2_video_t*)data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
if (vid->should_resize)
sdl_refresh_viewport(vid);

View File

@ -172,7 +172,9 @@ static bool sdl_dingux_gfx_frame(void *data, const void *frame, unsigned width,
unsigned pitch, const char *msg, video_frame_info_t *video_info)
{
sdl_dingux_video_t* vid = (sdl_dingux_video_t*)data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
if (unlikely(!frame))
return true;
@ -186,7 +188,9 @@ static bool sdl_dingux_gfx_frame(void *data, const void *frame, unsigned width,
if (likely(!vid->menu_active))
{
blit((uint32_t*)vid->screen->pixels, (uint32_t*)frame, vid->rgb ? width : width/2, height, pitch);
blit((uint32_t*)vid->screen->pixels,
(uint32_t*)frame,
vid->rgb ? width : width/2, height, pitch);
if (unlikely(vid->was_in_menu))
vid->was_in_menu = false;
}

View File

@ -365,7 +365,9 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width,
{
char title[128];
sdl_video_t *vid = (sdl_video_t*)data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
if (!frame)
return true;

View File

@ -254,7 +254,9 @@ static bool sixel_gfx_frame(void *data, const void *frame,
unsigned pixfmt = SIXEL_PIXELFORMAT_RGB565;
bool draw = true;
sixel_t *sixel = (sixel_t*)data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
if (!frame || !frame_width || !frame_height)
return true;
@ -275,7 +277,8 @@ static bool sixel_gfx_frame(void *data, const void *frame,
}
}
if (sixel_menu_frame && video_info->menu_is_alive)
#ifdef HAVE_MENU
if (sixel_menu_frame && menu_is_alive)
{
frame_to_copy = sixel_menu_frame;
width = sixel_menu_width;
@ -284,6 +287,7 @@ static bool sixel_gfx_frame(void *data, const void *frame,
bits = sixel_menu_bits;
}
else
#endif
{
width = sixel_video_width;
height = sixel_video_height;
@ -292,8 +296,10 @@ static bool sixel_gfx_frame(void *data, const void *frame,
if (frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height))
draw = false;
if (video_info->menu_is_alive)
#ifdef HAVE_MENU
if (menu_is_alive)
draw = false;
#endif
}
if (sixel->video_width != width || sixel->video_height != height)

View File

@ -776,7 +776,9 @@ static bool sunxi_gfx_frame(void *data, const void *frame, unsigned width,
video_frame_info_t *video_info)
{
struct sunxi_video *_dispvars = (struct sunxi_video*)data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
if (_dispvars->src_width != width || _dispvars->src_height != height)
{
@ -784,9 +786,6 @@ static bool sunxi_gfx_frame(void *data, const void *frame, unsigned width,
if (width == 0 || height == 0)
return true;
RARCH_LOG("video_sunxi: internal resolution changed by core: %ux%u -> %ux%u\n",
_dispvars->src_width, _dispvars->src_height, width, height);
sunxi_setup_scale(_dispvars, width, height, pitch);
}

View File

@ -152,7 +152,14 @@ static bool switch_frame(void *data, const void *frame,
int xsf = 1280 / width;
int ysf = 720 / height;
int sf = xsf;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
bool statistics_show = video_info->statistics_show;
struct font_params
*osd_params = (struct font_params*)
&video_info->osd_stat_params;
if (ysf < sf)
sf = ysf;
@ -223,14 +230,11 @@ static bool switch_frame(void *data, const void *frame,
#endif
}
}
else if (video_info->statistics_show)
else if (statistics_show)
{
struct font_params *osd_params = (struct font_params*)
&video_info->osd_stat_params;
if (osd_params)
font_driver_render_msg(sw, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params, NULL);
osd_params, NULL);
}
#endif
@ -242,9 +246,6 @@ static bool switch_frame(void *data, const void *frame,
}
#endif
if (msg && strlen(msg) > 0)
RARCH_LOG("message: %s\n", msg);
r = surface_dequeue_buffer(&sw->surface, &out_buffer);
if(r != RESULT_OK)
return true; /* just skip the frame */

View File

@ -186,7 +186,9 @@ static void *switch_init(const video_info_t *video,
sw->vp.height = sw->o_height = video->height;
sw->overlay_enabled = false;
sw->overlay = NULL;
#ifdef HAVE_MENU
sw->in_menu = false;
#endif
sw->vp.full_width = 1280;
sw->vp.full_height = 720;
@ -348,7 +350,12 @@ static bool switch_frame(void *data, const void *frame,
switch_video_t *sw = data;
uint32_t *out_buffer = NULL;
bool ffwd_mode = video_info->input_driver_nonblock_state;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
struct font_params
*osd_params = (struct font_params *)&video_info->osd_stat_params;
bool statistics_show = video_info->statistics_show;
if (!frame)
return true;
@ -397,7 +404,9 @@ static bool switch_frame(void *data, const void *frame,
sw->hw_scale.width = ceil(screen_ratio / tgt_ratio * sw->scaler.out_width);
sw->hw_scale.height = sw->scaler.out_height;
sw->hw_scale.x_offset = ceil((sw->hw_scale.width - sw->scaler.out_width) / 2.0);
if (!video_info->menu_is_alive)
#ifdef HAVE_MENU
if (!menu_is_alive)
#endif
{
clear_screen(sw);
nwindowSetDimensions(sw->win, sw->hw_scale.width, sw->hw_scale.height);
@ -420,14 +429,15 @@ static bool switch_frame(void *data, const void *frame,
sw->out_buffer = out_buffer;
sw->stride = stride;
if (sw->in_menu && !video_info->menu_is_alive && sw->smooth)
#ifdef HAVE_MENU
if (sw->in_menu && !menu_is_alive && sw->smooth)
{
memset(out_buffer, 0, stride * sw->vp.full_height);
nwindowSetDimensions(sw->win, sw->hw_scale.width, sw->hw_scale.height);
}
sw->in_menu = video_info->menu_is_alive;
#ifdef HAVE_MENU
sw->in_menu = menu_is_alive;
if (sw->menu_texture.enable)
{
menu_driver_frame(menu_is_alive, video_info);
@ -461,13 +471,11 @@ static bool switch_frame(void *data, const void *frame,
gfx_cpy_dsp_buf(out_buffer, sw->image, sw->vp.full_width, sw->vp.full_height, stride, false);
}
if (video_info->statistics_show && !sw->smooth)
if (statistics_show && !sw->smooth)
{
struct font_params *osd_params = (struct font_params *)&video_info->osd_stat_params;
if (osd_params)
font_driver_render_msg(sw, video_info->stat_text,
(const struct font_params *)&video_info->osd_stat_params, NULL);
osd_params, NULL);
}
if (msg)

View File

@ -415,7 +415,9 @@ static bool vg_frame(void *data, const void *frame,
vg_t *vg = (vg_t*)data;
unsigned width = video_info->width;
unsigned height = video_info->height;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
if ( frame_width != vg->mRenderWidth
|| frame_height != vg->mRenderHeight

View File

@ -144,7 +144,9 @@ static bool vga_gfx_frame(void *data, const void *frame,
const void *frame_to_copy = frame;
bool draw = true;
vga_t *vga = (vga_t*)data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
if (!frame || !frame_width || !frame_height)
return true;
@ -165,7 +167,8 @@ static bool vga_gfx_frame(void *data, const void *frame,
}
}
if (vga->vga_menu_frame && video_info->menu_is_alive)
#ifdef HAVE_MENU
if (vga->vga_menu_frame && menu_is_alive)
{
frame_to_copy = vga->vga_menu_frame;
width = vga->vga_menu_width;
@ -174,6 +177,7 @@ static bool vga_gfx_frame(void *data, const void *frame,
bits = vga->vga_menu_bits;
}
else
#endif
{
width = vga->vga_video_width;
height = vga->vga_video_height;
@ -183,8 +187,10 @@ static bool vga_gfx_frame(void *data, const void *frame,
if (frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height))
draw = false;
if (video_info->menu_is_alive)
#ifdef HAVE_MENU
if (menu_is_alive)
draw = false;
#endif
}
if (draw)

View File

@ -144,8 +144,18 @@ static bool vita2d_gfx_frame(void *data, const void *frame,
unsigned pitch, const char *msg, video_frame_info_t *video_info)
{
void *tex_p;
vita_video_t *vita = (vita_video_t *)data;
bool menu_is_alive = video_info->menu_is_alive;
vita_video_t *vita = (vita_video_t *)data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
#ifdef HAVE_GFX_WIDGETS
bool widgets_active = video_info->widgets_active;
#endif
bool statistics_show = video_info->statistics_show;
struct font_params
*osd_params = (struct font_params*)
&video_info->osd_stat_params;
if (frame)
{
@ -253,14 +263,11 @@ static bool vita2d_gfx_frame(void *data, const void *frame,
}
}
}
else if (video_info->statistics_show)
else if (statistics_show)
{
struct font_params *osd_params = (struct font_params*)
&video_info->osd_stat_params;
if (osd_params)
font_driver_render_msg(vita, video_info->stat_text,
(const struct font_params*)&video_info->osd_stat_params, NULL);
osd_params, NULL);
}
#ifdef HAVE_OVERLAY
@ -269,7 +276,7 @@ static bool vita2d_gfx_frame(void *data, const void *frame,
#endif
#ifdef HAVE_GFX_WIDGETS
if (video_info->widgets_active)
if (widgets_active)
gfx_widgets_frame(video_info);
#endif

View File

@ -1730,8 +1730,12 @@ static bool vulkan_frame(void *data, const void *frame,
unsigned video_height = video_info->height;
struct font_params *osd_params = (struct font_params*)
&video_info->osd_stat_params;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
#ifdef HAVE_GFX_WIDGETS
bool widgets_active = video_info->widgets_active;
#endif
unsigned frame_index =
vk->context->current_frame_index;
unsigned swapchain_index =
@ -2066,7 +2070,7 @@ static bool vulkan_frame(void *data, const void *frame,
font_driver_render_msg(vk, msg, NULL, NULL);
#ifdef HAVE_GFX_WIDGETS
if (video_info->widgets_active)
if (widgets_active)
gfx_widgets_frame(video_info);
#endif
@ -2079,7 +2083,8 @@ static bool vulkan_frame(void *data, const void *frame,
*/
vulkan_filter_chain_end_frame((vulkan_filter_chain_t*)vk->filter_chain, vk->cmd);
if (backbuffer->image != VK_NULL_HANDLE &&
if (
backbuffer->image != VK_NULL_HANDLE &&
vk->context->has_acquired_swapchain &&
(vk->readback.pending || vk->readback.streamed))
{

View File

@ -198,19 +198,24 @@ static bool xenon360_gfx_frame(void *data,
uint64_t frame_count, unsigned pitch, const char *msg,
video_frame_info_t *video_info)
{
unsigned y;
xenos_t *xenos = (xenos_t*)data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
DrawVerticeFormats
*Rect = NULL;
ScreenUv[UV_TOP] = ((float) (width) / (float) XE_W)*2;
ScreenUv[UV_LEFT] = ((float) (height) / (float) XE_H)*2;
ScreenUv[UV_TOP] = ((float) (width) / (float) XE_W)*2;
ScreenUv[UV_LEFT] = ((float) (height) / (float) XE_H)*2;
DrawVerticeFormats * Rect = Xe_VB_Lock(
Rect = Xe_VB_Lock(
xenos->device,
xenos->vb, 0, 3 * sizeof(DrawVerticeFormats), XE_LOCK_WRITE);
/* bottom left */
Rect[1].v = ScreenUv[UV_LEFT];
Rect[2].u = ScreenUv[UV_TOP];
Rect[1].v = ScreenUv[UV_LEFT];
Rect[2].u = ScreenUv[UV_TOP];
Xe_VB_Unlock(xenos->device, xenos->vb);
@ -221,7 +226,7 @@ static bool xenon360_gfx_frame(void *data,
unsigned stride_out = xenos->g_pTexture->wpitch >> 1;
unsigned copy_size = width << 1;
for (unsigned y = 0; y < height; y++, dst += stride_out, src += stride_in)
for (y = 0; y < height; y++, dst += stride_out, src += stride_in)
memcpy(dst, src, copy_size);
Xe_Surface_Unlock(xenos->device, xenos->g_pTexture);
@ -232,11 +237,14 @@ static bool xenon360_gfx_frame(void *data,
/* Select stream */
Xe_SetTexture(xenos->device, 0, xenos->g_pTexture);
Xe_SetCullMode(xenos->device, XE_CULL_NONE);
Xe_SetStreamSource(xenos->device, 0, xenos->vb, 0, sizeof(DrawVerticeFormats));
Xe_SetStreamSource(xenos->device, 0, xenos->vb, 0,
sizeof(DrawVerticeFormats));
/* Select shaders */
Xe_SetShader(xenos->device, SHADER_TYPE_PIXEL, xenos->g_pPixelTexturedShader, 0);
Xe_SetShader(xenos->device, SHADER_TYPE_VERTEX, xenos->g_pVertexShader, 0);
Xe_SetShader(xenos->device, SHADER_TYPE_PIXEL,
xenos->g_pPixelTexturedShader, 0);
Xe_SetShader(xenos->device, SHADER_TYPE_VERTEX,
xenos->g_pVertexShader, 0);
#ifdef HAVE_MENU
menu_driver_frame(menu_is_alive, video_info);

View File

@ -138,7 +138,9 @@ static bool xshm_gfx_frame(void *data, const void *frame, unsigned width,
{
unsigned y;
xshm_t *xshm = (xshm_t*)data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
for (y = 0; y < height; y++)
memcpy(xshm->fbptr + sizeof(uint32_t)*xshm->width*y,

View File

@ -1010,7 +1010,9 @@ static bool xv_frame(void *data, const void *frame, unsigned width,
{
XWindowAttributes target;
xv_t *xv = (xv_t*)data;
#ifdef HAVE_MENU
bool menu_is_alive = video_info->menu_is_alive;
#endif
if (!frame)
return true;