mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Cleanup video_driver_frame
This commit is contained in:
parent
6e52a25b86
commit
326e1e3fac
@ -2051,13 +2051,12 @@ void video_driver_frame(const void *data, unsigned width,
|
|||||||
unsigned height, size_t pitch)
|
unsigned height, size_t pitch)
|
||||||
{
|
{
|
||||||
static char video_driver_msg[256];
|
static char video_driver_msg[256];
|
||||||
static struct retro_perf_counter video_frame_conv = {0};
|
|
||||||
video_frame_info_t video_info;
|
video_frame_info_t video_info;
|
||||||
unsigned output_width = 0;
|
static struct retro_perf_counter video_frame_conv = {0};
|
||||||
unsigned output_height = 0;
|
unsigned output_width = 0;
|
||||||
unsigned output_pitch = 0;
|
unsigned output_height = 0;
|
||||||
const char *msg = NULL;
|
unsigned output_pitch = 0;
|
||||||
settings_t *settings = config_get_ptr();
|
const char *msg = NULL;
|
||||||
|
|
||||||
if (!video_driver_active)
|
if (!video_driver_active)
|
||||||
return;
|
return;
|
||||||
@ -2081,17 +2080,7 @@ void video_driver_frame(const void *data, unsigned width,
|
|||||||
|
|
||||||
video_driver_cached_frame_set(data, width, height, pitch);
|
video_driver_cached_frame_set(data, width, height, pitch);
|
||||||
|
|
||||||
video_info.refresh_rate = settings->video.refresh_rate;
|
video_driver_build_info(&video_info);
|
||||||
video_info.black_frame_insertion =
|
|
||||||
settings->video.black_frame_insertion;
|
|
||||||
video_info.hard_sync = settings->video.hard_sync;
|
|
||||||
video_info.hard_sync_frames = settings->video.hard_sync_frames;
|
|
||||||
video_info.fps_show = settings->fps_show;
|
|
||||||
video_info.scale_integer = settings->video.scale_integer;
|
|
||||||
video_info.aspect_ratio_idx = settings->video.aspect_ratio_idx;
|
|
||||||
video_info.post_filter_record = settings->video.post_filter_record;
|
|
||||||
video_info.max_swapchain_images = settings->video.max_swapchain_images;
|
|
||||||
video_info.shared_context = settings->video.shared_context;
|
|
||||||
|
|
||||||
/* Slightly messy code,
|
/* Slightly messy code,
|
||||||
* but we really need to do processing before blocking on VSync
|
* but we really need to do processing before blocking on VSync
|
||||||
@ -2120,10 +2109,9 @@ void video_driver_frame(const void *data, unsigned width,
|
|||||||
video_driver_msg[0] = '\0';
|
video_driver_msg[0] = '\0';
|
||||||
|
|
||||||
if (runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &msg)
|
if (runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &msg)
|
||||||
&& settings->video.font_enable && msg)
|
&& video_info.font_enable && msg)
|
||||||
strlcpy(video_driver_msg, msg, sizeof(video_driver_msg));
|
strlcpy(video_driver_msg, msg, sizeof(video_driver_msg));
|
||||||
|
|
||||||
|
|
||||||
if (!current_video || !current_video->frame(
|
if (!current_video || !current_video->frame(
|
||||||
video_driver_data, data, width, height,
|
video_driver_data, data, width, height,
|
||||||
video_driver_frame_count,
|
video_driver_frame_count,
|
||||||
@ -2207,6 +2195,7 @@ void video_driver_build_info(video_frame_info_t *video_info)
|
|||||||
video_info->windowed_fullscreen = settings->video.windowed_fullscreen;
|
video_info->windowed_fullscreen = settings->video.windowed_fullscreen;
|
||||||
video_info->monitor_index = settings->video.monitor_index;
|
video_info->monitor_index = settings->video.monitor_index;
|
||||||
video_info->shared_context = settings->video.shared_context;
|
video_info->shared_context = settings->video.shared_context;
|
||||||
|
video_info->font_enable = settings->video.font_enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -99,6 +99,7 @@ typedef struct video_frame_info
|
|||||||
unsigned max_swapchain_images;
|
unsigned max_swapchain_images;
|
||||||
bool windowed_fullscreen;
|
bool windowed_fullscreen;
|
||||||
unsigned monitor_index;
|
unsigned monitor_index;
|
||||||
|
bool font_enable;
|
||||||
} video_frame_info_t;
|
} video_frame_info_t;
|
||||||
|
|
||||||
/* Optionally implemented interface to poke more
|
/* Optionally implemented interface to poke more
|
||||||
|
Loading…
x
Reference in New Issue
Block a user