int load_module(void)
{
	if (pipe(clipipe)) {
		ast_log(LOG_WARNING, "Unable to create CLI pipe\n");
		return -1;
	}
	g_thread_init(NULL);
	if (gtk_init_check(NULL, NULL))  {
		if (!show_console()) {
			inuse++;
			ast_update_use_count();
			if (option_verbose > 1)
				ast_verbose( VERBOSE_PREFIX_2 "Launched GTK Console monitor\n");		
		} else
			ast_log(LOG_WARNING, "Unable to start GTK console\n");
	} else {
		if (option_debug)
			ast_log(LOG_DEBUG, "Unable to start GTK console monitor -- ignoring\n");
		else if (option_verbose > 1)
			ast_verbose( VERBOSE_PREFIX_2 "GTK is not available -- skipping monitor\n");
	}
	return 0;
}
Exemplo n.º 2
0
int main(int argc, char *argv[]) {
	s32 res;

#if defined(USE_WII_DI) && !defined(GAMECUBE)
	DI_Init();
#endif

	VIDEO_Init();
	PAD_Init();
	DSP_Init();
	AUDIO_Init(NULL);

	gfx_video_init(NULL);
	gfx_init();
	gfx_con_init(NULL);

#ifdef DEBUG_WII_GDB
	DEBUG_Init(GDBSTUB_DEVICE_USB, 1);
#endif

	printf("startup as ");
	if (argc > 0)
		printf("'%s'\n", argv[0]);
	else
		printf("<unknown>\n");

	SYS_RegisterResetFunc(&resetinfo);

	SYS_SetResetCallback(reset_cb);
#ifndef GAMECUBE
	SYS_SetPowerCallback(power_cb);
#endif

	if (!fatInitDefault()) {
		printf("fatInitDefault failed\n");
	} else {
		// set the default path if libfat couldnt set it
		// this allows loading over tcp/usbgecko
		char cwd[MAXPATHLEN];

		if (getcwd(cwd, MAXPATHLEN)) {
			size_t len = strlen(cwd);

			if (len > 2 && (cwd[len - 1] == ':' || cwd[len - 2] == ':')) {
				printf("chdir to default\n");
				chdir("/apps/scummvm");
			}
		}
	}

	g_system = new OSystem_Wii();
	assert(g_system);

#ifdef DYNAMIC_MODULES
	PluginManager::instance().addPluginProvider(new WiiPluginProvider());
#endif

	res = scummvm_main(argc, argv);
	g_system->quit();

	printf("shutdown\n");

	SYS_UnregisterResetFunc(&resetinfo);
	fatUnmountDefault();

	if (res)
		show_console(res);

	if (power_btn_pressed) {
		printf("shutting down\n");
		SYS_ResetSystem(SYS_POWEROFF, 0, 0);
	}

	printf("reloading\n");

	gfx_con_deinit();
	gfx_deinit();
	gfx_video_deinit();

	return res;
}
Exemplo n.º 3
0
void show_uploadfile() {
    wattron(room.win, COLOR_PAIR(CYAN));
    show_comment();
    wattroff(room.win, COLOR_PAIR(CYAN));
    show_console();
}