Merge pull request #1810 from heuripedes/screenshot-fix

Fix raw screenshots
This commit is contained in:
Twinaphex 2015-06-17 16:20:26 +02:00
commit 3435a61518
3 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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);

View File

@ -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(