int lcd_size_width, int lcd_size_height,
double scale_factor, short rotation_type)
{
- INFO("start_display handle_id:%ld, lcd size:%dx%d, scale_factor:%f, rotation_type:%d\n",
- (long)handle_id, lcd_size_width, lcd_size_height, scale_factor, rotation_type);
+ INFO("start_display handle_id:%ld, lcd size:%dx%d, \
+ scale_factor:%f, rotation_type:%d\n",
+ (long) handle_id, lcd_size_width, lcd_size_height,
+ scale_factor, rotation_type);
set_emul_win_scale(scale_factor);
maruskin_init(handle_id, lcd_size_width, lcd_size_height, false);
#endif
do_hardkey_event(KEY_RELEASED, HARD_KEY_POWER);
-
}
void shutdown_qemu_gracefully(void)
{
- requested_shutdown_qemu_gracefully = 1;
+ if (is_requested_shutdown_qemu_gracefully() != 1) {
+ requested_shutdown_qemu_gracefully = 1;
+
+ INFO("shutdown_qemu_gracefully was called\n");
- pthread_t thread_id;
- if (0 > pthread_create(
- &thread_id, NULL, run_timed_shutdown_thread, NULL)) {
+ pthread_t thread_id;
+ if (0 > pthread_create(
+ &thread_id, NULL, run_timed_shutdown_thread, NULL)) {
- ERR("!!! Fail to create run_timed_shutdown_thread. shutdown qemu right now !!!\n");
+ ERR("!!! Fail to create run_timed_shutdown_thread. \
+ shutdown qemu right now !!!\n");
+ qemu_system_shutdown_request();
+ }
+ } else {
+ INFO("shutdown_qemu_gracefully was called twice\n");
qemu_system_shutdown_request();
}
-
}
int is_requested_shutdown_qemu_gracefully(void)
qemu_system_shutdown_request();
return NULL;
-
}
static void send_to_emuld(const char* request_type,