mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Create RARCH_DISPLAY_CTL_CACHED_FRAME_SET_PTR
This commit is contained in:
parent
f0e11659c7
commit
7bdc1da676
@ -872,14 +872,6 @@ void video_driver_set_filtering(unsigned index, bool smooth)
|
||||
video_driver_poke->set_filtering(video_driver_data, index, smooth);
|
||||
}
|
||||
|
||||
void video_driver_cached_frame_set_ptr(const void *data)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
video_driver_state.frame_cache.data = data;
|
||||
}
|
||||
|
||||
void video_driver_cached_frame_set(const void *data, unsigned width,
|
||||
unsigned height, size_t pitch)
|
||||
{
|
||||
@ -1403,6 +1395,11 @@ bool video_driver_ctl(enum rarch_display_ctl_state state, void *data)
|
||||
video_driver_record_gpu_buffer = NULL;
|
||||
current_video = NULL;
|
||||
break;
|
||||
case RARCH_DISPLAY_CTL_CACHED_FRAME_SET_PTR:
|
||||
if (!data)
|
||||
return false;
|
||||
video_driver_state.frame_cache.data = (const void*)data;
|
||||
return true;
|
||||
case RARCH_DISPLAY_CTL_SET_STUB_FRAME:
|
||||
frame_bak = current_video->frame;
|
||||
current_video->frame = video_null.frame;
|
||||
|
@ -134,6 +134,7 @@ enum rarch_display_ctl_state
|
||||
/* Renders the current video frame. */
|
||||
RARCH_DISPLAY_CTL_CACHED_FRAME_RENDER,
|
||||
RARCH_DISPLAY_CTL_CACHED_FRAME_HAS_VALID_FB,
|
||||
RARCH_DISPLAY_CTL_CACHED_FRAME_SET_PTR,
|
||||
RARCH_DISPLAY_CTL_SHOW_MOUSE,
|
||||
RARCH_DISPLAY_CTL_GET_FRAME_COUNT,
|
||||
RARCH_DISPLAY_CTL_SET_OWN_DRIVER,
|
||||
@ -428,8 +429,6 @@ void video_driver_set_pixel_format(enum retro_pixel_format fmt);
|
||||
void video_driver_cached_frame_set(const void *data, unsigned width,
|
||||
unsigned height, size_t pitch);
|
||||
|
||||
void video_driver_cached_frame_set_ptr(const void *data);
|
||||
|
||||
void video_driver_cached_frame_get(const void **data, unsigned *width,
|
||||
unsigned *height, size_t *pitch);
|
||||
|
||||
|
@ -243,7 +243,7 @@ bool take_screenshot(void)
|
||||
|
||||
if (frame_data)
|
||||
{
|
||||
video_driver_cached_frame_set_ptr(frame_data);
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_CACHED_FRAME_SET_PTR, (void*)frame_data);
|
||||
ret = take_screenshot_raw();
|
||||
free(frame_data);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user