remove unnecessary realloc routine for the display surface.
modified to create the SDL surface before send a event to emuld.
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
INFO( "do_rotation_event rotation_type:%d\n", rotation_type);
+ set_emul_rotation( rotation_type );
+}
+
+void send_rotation_event(int rotation_type)
+{
+
+ INFO( "send_rotation_event rotation_type:%d\n", rotation_type);
+
char send_buf[32] = { 0 };
switch ( rotation_type ) {
}
send_to_emuld( "sensor\n\n\n\n", 10, send_buf, 32 );
-
- set_emul_rotation( rotation_type );
-
}
QemuSurfaceInfo* get_screenshot_info(void)
void do_hardkey_event(int event_type, int keycode);
void do_scale_event(double scale_factor);
void do_rotation_event(int rotation_type);
+void send_rotation_event(int rotation_type);
QemuSurfaceInfo *get_screenshot_info(void);
DetailInfo *get_detail_info(int qemu_argc, char **qemu_argv);
int scale = 0;
double scale_ratio = 0.0;
short rotation_type = 0;
+ int is_rotate = 0;
char* p = recvbuf;
memcpy( &scale, p, sizeof( scale ) );
if ( is_sensord_initialized == 1 && get_emul_rotation() != rotation_type ) {
do_rotation_event( rotation_type );
+ is_rotate = 1;
}
#ifndef CONFIG_USE_SHM
maruskin_sdl_resize(); // send sdl event
#endif
+ if (is_rotate) {
+ send_rotation_event( rotation_type );
+ }
+
break;
}
case RECV_SCREEN_SHOT: {