From f89e2baf81f64193a3dad31fe3db340a3542cc52 Mon Sep 17 00:00:00 2001 From: Hyoyoung Chang Date: Tue, 9 Nov 2010 04:43:31 +0000 Subject: [PATCH] replace magic numbers --- src/clipdrawer.c | 4 ++-- src/scrcapture.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/clipdrawer.c b/src/clipdrawer.c index 849ee52..78b771f 100644 --- a/src/clipdrawer.c +++ b/src/clipdrawer.c @@ -399,8 +399,8 @@ int clipdrawer_init(void *data) // for elm_check, elm_list elm_theme_extension_add(NULL, APP_EDJ_FILE); - cdy = (1.0*CLIPDRAWER_HEIGHT/800)*ad->root_h; - cdw = (1.0*CLIPDRAWER_POS_Y/800*1.0)*ad->root_h; + cdy = (1.0*CLIPDRAWER_HEIGHT/SCREEN_HEIGHT)*ad->root_h; + cdw = (1.0*CLIPDRAWER_POS_Y/SCREEN_HEIGHT)*ad->root_h; evas_object_resize(ad->win_main, ad->root_w, (int)cdy); evas_object_move(ad->win_main, CLIPDRAWER_POS_X, (int)cdw); diff --git a/src/scrcapture.c b/src/scrcapture.c index 299fa26..ea4d7aa 100644 --- a/src/scrcapture.c +++ b/src/scrcapture.c @@ -76,7 +76,8 @@ static Eina_Bool capture_current_screen(void *data) DTRACE("capture current screen\n"); int width, height; - width = 480; height = 800; + width = ad->root_w; + height = ad->root_h; capimginfo->imgdata = malloc(sizeof(char) * width*height*4); capimginfo->eo = evas_object_image_add(ad->evas); -- 2.7.4