mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-08 21:01:08 +00:00
Create video_driver_frame
This commit is contained in:
parent
9b41061143
commit
2e3c3d25b5
@ -1759,3 +1759,25 @@ bool video_pixel_frame_scale(const void *data,
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void video_driver_frame(const void *data,
|
||||||
|
unsigned width, unsigned height,
|
||||||
|
size_t pitch, const char *msg)
|
||||||
|
{
|
||||||
|
uint64_t *frame_count = NULL;
|
||||||
|
driver_t *driver = driver_get_ptr();
|
||||||
|
|
||||||
|
*driver->current_msg = 0;
|
||||||
|
|
||||||
|
if (msg)
|
||||||
|
strlcpy(driver->current_msg, msg, sizeof(driver->current_msg));
|
||||||
|
|
||||||
|
video_driver_ctl(RARCH_DISPLAY_CTL_GET_FRAME_COUNT, &frame_count);
|
||||||
|
|
||||||
|
if (!driver->current_video->frame(
|
||||||
|
driver->video_data, data, width, height, *frame_count,
|
||||||
|
pitch, driver->current_msg))
|
||||||
|
driver->video_active = false;
|
||||||
|
|
||||||
|
*frame_count = *frame_count + 1;
|
||||||
|
}
|
||||||
|
@ -443,6 +443,10 @@ void video_driver_cached_frame_get(const void **data, unsigned *width,
|
|||||||
void video_driver_menu_settings(void **list_data, void *list_info_data,
|
void video_driver_menu_settings(void **list_data, void *list_info_data,
|
||||||
void *group_data, void *subgroup_data, const char *parent_group);
|
void *group_data, void *subgroup_data, const char *parent_group);
|
||||||
|
|
||||||
|
void video_driver_frame(const void *data,
|
||||||
|
unsigned width, unsigned height,
|
||||||
|
size_t pitch, const char *msg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* video_viewport_get_scaled_integer:
|
* video_viewport_get_scaled_integer:
|
||||||
* @vp : Viewport handle
|
* @vp : Viewport handle
|
||||||
|
@ -51,7 +51,6 @@
|
|||||||
static void video_frame(const void *data, unsigned width,
|
static void video_frame(const void *data, unsigned width,
|
||||||
unsigned height, size_t pitch)
|
unsigned height, size_t pitch)
|
||||||
{
|
{
|
||||||
uint64_t *frame_count = NULL;
|
|
||||||
unsigned output_width = 0;
|
unsigned output_width = 0;
|
||||||
unsigned output_height = 0;
|
unsigned output_height = 0;
|
||||||
unsigned output_pitch = 0;
|
unsigned output_pitch = 0;
|
||||||
@ -59,8 +58,6 @@ static void video_frame(const void *data, unsigned width,
|
|||||||
driver_t *driver = driver_get_ptr();
|
driver_t *driver = driver_get_ptr();
|
||||||
global_t *global = global_get_ptr();
|
global_t *global = global_get_ptr();
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
const video_driver_t *video =
|
|
||||||
driver ? (const video_driver_t*)driver->current_video : NULL;
|
|
||||||
|
|
||||||
if (!driver->video_active)
|
if (!driver->video_active)
|
||||||
return;
|
return;
|
||||||
@ -85,13 +82,6 @@ static void video_frame(const void *data, unsigned width,
|
|||||||
)
|
)
|
||||||
recording_dump_frame(data, width, height, pitch);
|
recording_dump_frame(data, width, height, pitch);
|
||||||
|
|
||||||
msg = rarch_main_msg_queue_pull();
|
|
||||||
|
|
||||||
*driver->current_msg = 0;
|
|
||||||
|
|
||||||
if (msg)
|
|
||||||
strlcpy(driver->current_msg, msg, sizeof(driver->current_msg));
|
|
||||||
|
|
||||||
if (video_driver_frame_filter(data, width, height, pitch,
|
if (video_driver_frame_filter(data, width, height, pitch,
|
||||||
&output_width, &output_height, &output_pitch))
|
&output_width, &output_height, &output_pitch))
|
||||||
{
|
{
|
||||||
@ -101,13 +91,9 @@ static void video_frame(const void *data, unsigned width,
|
|||||||
pitch = output_pitch;
|
pitch = output_pitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
video_driver_ctl(RARCH_DISPLAY_CTL_GET_FRAME_COUNT, &frame_count);
|
msg = rarch_main_msg_queue_pull();
|
||||||
|
|
||||||
if (!video->frame(driver->video_data, data, width, height, *frame_count,
|
video_driver_frame(data, width, height, pitch, msg);
|
||||||
pitch, driver->current_msg))
|
|
||||||
driver->video_active = false;
|
|
||||||
|
|
||||||
*frame_count = *frame_count + 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user