From 939781384a38c4a66b4957c42789743942daae7c Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 23 Jun 2020 18:45:28 -0700 Subject: get_frame: demacroify MARK_BUFFER_AREA Convert macro to function and format retained macro portion --- recordmydesktop/src/rmd_get_frame.c | 91 ++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 48 deletions(-) (limited to 'recordmydesktop/src') diff --git a/recordmydesktop/src/rmd_get_frame.c b/recordmydesktop/src/rmd_get_frame.c index 1666193..3074ef3 100644 --- a/recordmydesktop/src/rmd_get_frame.c +++ b/recordmydesktop/src/rmd_get_frame.c @@ -83,53 +83,49 @@ (xrect)->height=(brwin)->rrect.height;\ } -#define MARK_BUFFER_AREA_C( data,\ - x_tm,\ - y_tm,\ - width_tm,\ - height_tm,\ - buffer_width,\ - __bit_depth__) {\ - int k,i;\ - register u_int##__bit_depth__##_t\ - *datapi=\ - ((u_int##__bit_depth__##_t *)data)+y_tm*buffer_width+x_tm;\ - for(k=0;kdata): ((unsigned char*)image_back->data); - /* FIXME TODO: why is this a macro? */ - MARK_BUFFER_AREA( + mark_buffer_area( back_buff, mouse_pos_temp.x - temp_brwin.rrect.x + pdata->enc_data->x_offset, mouse_pos_temp.y - temp_brwin.rrect.y + pdata->enc_data->y_offset, @@ -569,7 +564,7 @@ void *rmdGetFrame(ProgData *pdata) { unsigned char *front_buff = (!img_sel)?((unsigned char*)image->data): ((unsigned char*)image_back->data); - MARK_BUFFER_AREA( + mark_buffer_area( front_buff, mouse_pos_temp.x - temp_brwin.rrect.x + pdata->enc_data->x_offset, mouse_pos_temp.y - temp_brwin.rrect.y + pdata->enc_data->y_offset, -- cgit v1.2.3