From: Jinhyung Choi Date: Mon, 30 Jun 2014 06:25:14 +0000 (+0900) Subject: skin: removed unused rotation code & fixed error case X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~308 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e246d9e04bdfc58adeba2591cad3c6a5a342d3df;p=sdk%2Femulator%2Fqemu.git skin: removed unused rotation code & fixed error case Change-Id: I9a7917d6b10512edbd66550895a0dbfff15e18f4 Signed-off-by: Jinhyung Choi --- diff --git a/tizen/src/skin/maruskin_operation.c b/tizen/src/skin/maruskin_operation.c index 50d9851400..ace9f84d79 100644 --- a/tizen/src/skin/maruskin_operation.c +++ b/tizen/src/skin/maruskin_operation.c @@ -318,34 +318,36 @@ void do_rotation_event(int rotation_type) { INFO("do_rotation_event rotation_type : %d\n", rotation_type); #if 1 - char *rotation; + char *rotation = NULL; - static char rot_0 [] = {'2','3','6','2',',','-','1','4','0',',','-','8','4','7','0',',','9','9','9','9','6','1',',','4', 0}; - static char rot_90 [] = {'-','9','9','4',',','-','4','2','0','8',',','-','7','0','3','2','1','1',',','9','1','8','2','7','9',',','4', 0}; - static char rot_180 [] = {'1','6','2','2',',','5','6','5','8',',','9','9','9','9','4','5',',','8','6','2','6',',','4', 0}; - static char rot_270 [] = {'1','4','1','6','8',',','1','6','0','4','6',',','7','0','9','8','6','0',',','7','0','4','0','1','6',',','4', 0}; + static char rot_0 [] = {'2','3','6','2',',','-','1','4','0',',','-','8','4','7','0',',','9','9','9','9','6','1',',','4', 0}; + static char rot_90 [] = {'-','9','9','4',',','-','4','2','0','8',',','-','7','0','3','2','1','1',',','9','1','8','2','7','9',',','4', 0}; + static char rot_180 [] = {'1','6','2','2',',','5','6','5','8',',','9','9','9','9','4','5',',','8','6','2','6',',','4', 0}; + static char rot_270 [] = {'1','4','1','6','8',',','1','6','0','4','6',',','7','0','9','8','6','0',',','7','0','4','0','1','6',',','4', 0}; switch (rotation_type) { case ROTATION_PORTRAIT: - rotation = rot_0; + rotation = rot_0; break; case ROTATION_LANDSCAPE: - rotation = rot_90; + rotation = rot_90; break; case ROTATION_REVERSE_PORTRAIT: - rotation = rot_180; + rotation = rot_180; break; case ROTATION_REVERSE_LANDSCAPE: - rotation = rot_270; + rotation = rot_270; break; default: - return; + ERR("Unknown rotation type: %d \n", rotation_type); + break; } - set_sensor_rotation_vector(rotation, strlen(rotation)); + if (rotation != NULL) { + set_sensor_rotation_vector(rotation, strlen(rotation)); + } #endif -#if 1 int x = 0, y = 0, z = 0; switch (rotation_type) { @@ -374,29 +376,6 @@ void do_rotation_event(int rotation_type) } req_set_sensor_accel(x, y, z); -#else - char send_buf[32] = { 0 }; - - switch ( rotation_type ) { - case ROTATION_PORTRAIT: - sprintf( send_buf, "1\n3\n0\n9.80665\n0\n" ); - break; - case ROTATION_LANDSCAPE: - sprintf( send_buf, "1\n3\n9.80665\n0\n0\n" ); - break; - case ROTATION_REVERSE_PORTRAIT: - sprintf( send_buf, "1\n3\n0\n-9.80665\n0\n" ); - break; - case ROTATION_REVERSE_LANDSCAPE: - sprintf(send_buf, "1\n3\n-9.80665\n0\n0\n"); - break; - - default: - break; - } - - send_to_emuld( "sensor\n\n\n\n", 10, send_buf, 32 ); -#endif } void save_screenshot(DisplaySurface *surface)