diff --git a/gfx/video_driver.c b/gfx/video_driver.c index c9a08c01fa..bad147f8db 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -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) diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 08e0515e0a..a49893f92d 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -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); diff --git a/screenshot.c b/screenshot.c index 4927baacbe..1933ed81f9 100644 --- a/screenshot.c +++ b/screenshot.c @@ -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(