void rarch_main_data_iterate(void) { data_runloop_t *runloop = rarch_main_data_get_ptr(); settings_t *settings = config_get_ptr(); (void)settings; #ifdef HAVE_THREADS if (settings->menu.threaded_data_runloop_enable) { switch (runloop->thread_code) { case THREAD_CODE_INIT: rarch_main_data_thread_init(); break; case THREAD_CODE_DEINIT: case THREAD_CODE_ALIVE: break; } } #endif #ifdef HAVE_OVERLAY rarch_main_data_overlay_image_upload_iterate(false); #endif #ifdef HAVE_RPNG rarch_main_data_nbio_image_upload_iterate(false); #endif #ifdef HAVE_OVERLAY rarch_main_data_overlay_iterate (false); #endif #ifdef HAVE_MENU #ifdef HAVE_LIBRETRODB if (rarch_main_data_db_pending_scan_finished()) menu_environment_cb(MENU_ENVIRON_RESET_HORIZONTAL_LIST, NULL); #endif #endif if (data_runloop_msg[0] != '\0') { rarch_main_msg_queue_push(data_runloop_msg, 1, 10, true); data_runloop_msg[0] = '\0'; } #ifdef HAVE_MENU menu_entries_refresh(MENU_ACTION_REFRESH); #endif #ifdef HAVE_THREADS if (settings->menu.threaded_data_runloop_enable && runloop->alive) return; #endif data_runloop_iterate(false); }
void rarch_main_data_iterate(void) { settings_t *settings = config_get_ptr(); (void)settings; #ifdef HAVE_THREADS if (settings->threaded_data_runloop_enable) { switch (g_data_runloop.thread_code) { case THREAD_CODE_INIT: rarch_main_data_thread_init(); break; case THREAD_CODE_DEINIT: case THREAD_CODE_ALIVE: break; } } #endif #ifdef HAVE_OVERLAY rarch_main_data_overlay_image_upload_iterate(false); #endif #ifdef HAVE_RPNG #ifdef HAVE_MENU rarch_main_data_nbio_image_upload_iterate(false); #endif #endif #ifdef HAVE_OVERLAY rarch_main_data_overlay_iterate (false); #endif #ifdef HAVE_MENU rarch_main_data_menu_iterate(); #endif if (data_runloop_msg[0] != '\0') { rarch_main_msg_queue_push(data_runloop_msg, 1, 10, true); data_runloop_msg[0] = '\0'; } #ifdef HAVE_THREADS if (settings->threaded_data_runloop_enable && g_data_runloop.alive) return; #endif data_runloop_iterate(false); }
void rarch_main_data_iterate(void) { data_runloop_t *runloop = rarch_main_data_get_ptr(); settings_t *settings = config_get_ptr(); (void)settings; #ifdef HAVE_THREADS if (settings->menu.threaded_data_runloop_enable) { switch (runloop->thread_code) { case THREAD_CODE_INIT: rarch_main_data_thread_init(); break; case THREAD_CODE_DEINIT: case THREAD_CODE_ALIVE: break; } } #endif #ifdef HAVE_OVERLAY rarch_main_data_overlay_image_upload_iterate(false, runloop); #endif #ifdef HAVE_RPNG rarch_main_data_nbio_image_upload_iterate(false, runloop); #endif if (data_runloop_msg[0] != '\0') { rarch_main_msg_queue_push(data_runloop_msg, 1, 10, true); data_runloop_msg[0] = '\0'; } #ifdef HAVE_MENU menu_do_refresh(MENU_ACTION_REFRESH); #endif #ifdef HAVE_THREADS if (settings->menu.threaded_data_runloop_enable && runloop->alive) return; #endif data_runloop_iterate(false, runloop); }
void rarch_main_data_msg_queue_push(unsigned type, const char *msg, const char *msg2, unsigned prio, unsigned duration, bool flush) { char new_msg[PATH_MAX_LENGTH]; msg_queue_t *queue = NULL; settings_t *settings = config_get_ptr(); (void)settings; switch(type) { case DATA_TYPE_NONE: break; case DATA_TYPE_FILE: queue = rarch_main_data_nbio_get_msg_queue_ptr(); fill_pathname_join_delim(new_msg, msg, msg2, '|', sizeof(new_msg)); break; case DATA_TYPE_IMAGE: queue = rarch_main_data_nbio_image_get_msg_queue_ptr(); fill_pathname_join_delim(new_msg, msg, msg2, '|', sizeof(new_msg)); break; #ifdef HAVE_NETWORKING case DATA_TYPE_HTTP: queue = rarch_main_data_http_get_msg_queue_ptr(); fill_pathname_join_delim(new_msg, msg, msg2, '|', sizeof(new_msg)); break; #endif #ifdef HAVE_OVERLAY case DATA_TYPE_OVERLAY: fill_pathname_join_delim(new_msg, msg, msg2, '|', sizeof(new_msg)); break; #endif #ifdef HAVE_LIBRETRODB case DATA_TYPE_DB: queue = rarch_main_data_db_get_msg_queue_ptr(); fill_pathname_join_delim(new_msg, msg, msg2, '|', sizeof(new_msg)); break; #endif } if (!queue) return; if (flush) msg_queue_clear(queue); msg_queue_push(queue, new_msg, prio, duration); #ifdef HAVE_THREADS if (settings->threaded_data_runloop_enable) { if (!g_data_runloop.thread_inited) rarch_main_data_thread_init(); else { slock_lock(g_data_runloop.cond_lock); scond_signal(g_data_runloop.cond); slock_unlock(g_data_runloop.cond_lock); } } #endif }