mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Fix raw screenshots
This commit is contained in:
parent
75b8f3405c
commit
96742263d1
@ -926,11 +926,11 @@ void video_driver_cached_frame_set(const void *data, unsigned width,
|
|||||||
video_state.frame_cache.pitch = pitch;
|
video_state.frame_cache.pitch = pitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
void video_driver_cached_frame_get(const void *data, unsigned *width,
|
void video_driver_cached_frame_get(const void **data, unsigned *width,
|
||||||
unsigned *height, size_t *pitch)
|
unsigned *height, size_t *pitch)
|
||||||
{
|
{
|
||||||
if (data)
|
if (data)
|
||||||
data = video_state.frame_cache.data;
|
*data = video_state.frame_cache.data;
|
||||||
if (width)
|
if (width)
|
||||||
*width = video_state.frame_cache.width;
|
*width = video_state.frame_cache.width;
|
||||||
if (height)
|
if (height)
|
||||||
|
@ -386,7 +386,7 @@ void video_driver_cached_frame_set(const void *data, unsigned width,
|
|||||||
|
|
||||||
void video_driver_cached_frame_set_ptr(const void *data);
|
void video_driver_cached_frame_set_ptr(const void *data);
|
||||||
|
|
||||||
void video_driver_cached_frame_get(const void *data, unsigned *width,
|
void video_driver_cached_frame_get(const void **data, unsigned *width,
|
||||||
unsigned *height, size_t *pitch);
|
unsigned *height, size_t *pitch);
|
||||||
|
|
||||||
bool video_driver_cached_frame_has_valid_fb(void);
|
bool video_driver_cached_frame_has_valid_fb(void);
|
||||||
|
@ -228,7 +228,7 @@ static bool take_screenshot_raw(void)
|
|||||||
global_t *global = global_get_ptr();
|
global_t *global = global_get_ptr();
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
video_driver_cached_frame_get(data, &width, &height, &pitch);
|
video_driver_cached_frame_get(&data, &width, &height, &pitch);
|
||||||
|
|
||||||
screenshot_dir = settings->screenshot_directory;
|
screenshot_dir = settings->screenshot_directory;
|
||||||
|
|
||||||
@ -292,7 +292,7 @@ bool take_screenshot(void)
|
|||||||
size_t old_pitch;
|
size_t old_pitch;
|
||||||
const void* old_data = NULL;
|
const void* old_data = NULL;
|
||||||
|
|
||||||
video_driver_cached_frame_get(old_data, &old_width, &old_height,
|
video_driver_cached_frame_get(&old_data, &old_width, &old_height,
|
||||||
&old_pitch);
|
&old_pitch);
|
||||||
|
|
||||||
void* frame_data = video_driver_read_frame_raw(
|
void* frame_data = video_driver_read_frame_raw(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user