mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 15:32:59 +00:00
Merge pull request #1810 from heuripedes/screenshot-fix
Fix raw screenshots
This commit is contained in:
commit
3435a61518
@ -926,11 +926,11 @@ void video_driver_cached_frame_set(const void *data, unsigned width,
|
||||
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)
|
||||
{
|
||||
if (data)
|
||||
data = video_state.frame_cache.data;
|
||||
*data = video_state.frame_cache.data;
|
||||
if (width)
|
||||
*width = video_state.frame_cache.width;
|
||||
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_get(const void *data, unsigned *width,
|
||||
void video_driver_cached_frame_get(const void **data, unsigned *width,
|
||||
unsigned *height, size_t *pitch);
|
||||
|
||||
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();
|
||||
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;
|
||||
|
||||
@ -292,7 +292,7 @@ bool take_screenshot(void)
|
||||
size_t old_pitch;
|
||||
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);
|
||||
|
||||
void* frame_data = video_driver_read_frame_raw(
|
||||
|
Loading…
x
Reference in New Issue
Block a user