Skip to content

Commit

Permalink
Disabled menu buildfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sonninnos committed Nov 13, 2024
1 parent 2a56a82 commit f9ecd68
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
4 changes: 4 additions & 0 deletions gfx/drivers/d3d10.c
Original file line number Diff line number Diff line change
Expand Up @@ -2173,7 +2173,11 @@ static bool d3d10_gfx_frame(
*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_st_flags & MENU_ST_FLAG_ALIVE) ? true : false;
#else
bool menu_is_alive = false;
#endif
bool overlay_behind_menu = video_info->overlay_behind_menu;
unsigned black_frame_insertion = video_info->black_frame_insertion;
int bfi_light_frames;
Expand Down
4 changes: 4 additions & 0 deletions gfx/drivers/d3d9cg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2043,7 +2043,11 @@ static bool d3d9_cg_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_st_flags & MENU_ST_FLAG_ALIVE) ? true : false;
#else
bool menu_is_alive = false;
#endif
bool overlay_behind_menu = video_info->overlay_behind_menu;
#ifdef HAVE_GFX_WIDGETS
bool widgets_active = video_info->widgets_active;
Expand Down
4 changes: 4 additions & 0 deletions gfx/drivers/d3d9hlsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,11 @@ static bool d3d9_hlsl_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_st_flags & MENU_ST_FLAG_ALIVE) ? true : false;
#else
bool menu_is_alive = false;
#endif
bool overlay_behind_menu = video_info->overlay_behind_menu;
#ifdef HAVE_GFX_WIDGETS
bool widgets_active = video_info->widgets_active;
Expand Down
27 changes: 12 additions & 15 deletions gfx/video_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -3626,6 +3626,7 @@ void video_driver_frame(const void *data, unsigned width,
video_driver_pix_fmt = video_st->pix_fmt;
bool runloop_idle = (runloop_st->flags & RUNLOOP_FLAG_IDLE) ? true : false;
bool video_driver_active = (video_st->flags & VIDEO_FLAG_ACTIVE) ? true : false;
bool menu_is_alive = false;
#if defined(HAVE_GFX_WIDGETS)
dispgfx_widget_t *p_dispwidget = dispwidget_get_ptr();
bool widgets_active = p_dispwidget->active;
Expand Down Expand Up @@ -3668,6 +3669,10 @@ void video_driver_frame(const void *data, unsigned width,

video_driver_build_info(&video_info);

#ifdef HAVE_MENU
menu_is_alive = (video_info.menu_st_flags & MENU_ST_FLAG_ALIVE) ? true : false;
#endif

/* Take target refresh rate as initial FPS value instead of 0.00 */
if (!last_fps)
last_fps = video_info.refresh_rate;
Expand All @@ -3682,15 +3687,11 @@ void video_driver_frame(const void *data, unsigned width,
* current frame is not (i.e. if core was
* previously sending duped frames, ensure
* that the next frame update is captured) */
#if HAVE_MENU
if ( video_info.input_driver_nonblock_state
&& video_info.fastforward_frameskip
&& !((video_info.menu_st_flags & MENU_ST_FLAG_ALIVE)
|| (last_frame_duped && !!data)))
#else
if ( video_info.input_driver_nonblock_state
&& video_info.fastforward_frameskip)
#endif
if ( video_info.input_driver_nonblock_state
&& video_info.fastforward_frameskip
&& !( menu_is_alive
|| (last_frame_duped && !!data))
)
{
uint16_t frame_time_accumulator_prev = frame_time_accumulator;
uint16_t frame_time_delta = new_time - last_time;
Expand Down Expand Up @@ -3762,7 +3763,7 @@ void video_driver_frame(const void *data, unsigned width,

/* Consider frame dropped when frame time exceeds 1.75x target */
if ( video_st->frame_count > 4
&& !(video_info.menu_st_flags & MENU_ST_FLAG_ALIVE)
&& !menu_is_alive
&& frame_time > 1000000.0f / video_info.refresh_rate * 1.75f)
video_st->frame_drop_count++;

Expand Down Expand Up @@ -4008,11 +4009,7 @@ void video_driver_frame(const void *data, unsigned width,
msg_entry.category,
msg_entry.prio,
false,
#if HAVE_MENU
(video_info.menu_st_flags & MENU_ST_FLAG_ALIVE) ? true : false
#else
false
#endif
menu_is_alive
);
}
/* ...otherwise, just output message via
Expand Down

0 comments on commit f9ecd68

Please sign in to comment.