Beispiel #1
0
int main(int argc, char *argv[])
{
	int r;
    
#if MEGAWANG
    if ((r = Sys_Init(argc, argv)) != 0) {
        return r;
    }
    if (!CSTEAM_Init()) {
		wm_msgbox("Error", "Could not initialize Steam. Please check that your Steam client is up and running.");
		return -1;
	}
#endif
	
	buildkeytranslationtable();
	
#ifdef HAVE_GTK2
	gtkbuild_init(&argc, &argv);
#endif
	startwin_open();

	_buildargc = argc;
	_buildargv = (const char **)argv;

	baselayer_init();
	r = app_main(argc, argv);

	startwin_close();
#ifdef HAVE_GTK2
	gtkbuild_exit(r);
#endif
	return r;
}
Beispiel #2
0
int main(int argc, char *argv[])
{
	int r;
	
	buildkeytranslationtable();
	
#ifdef HAVE_GTK2
	gtkbuild_init(&argc, &argv);
#endif
	startwin_open();

#ifdef __APPLE__
    // consume Xcode's "-NSDocumentRevisionsDebugMode xx" parameter
    _buildargv = calloc(argc+1, sizeof(char *));
    for (r = _buildargc = 0; r < argc; r++) {
        if (strcmp(argv[r], "-NSDocumentRevisionsDebugMode") == 0) {
            r++;
        } else {
            _buildargv[_buildargc++] = argv[r];
        }
    }
    _buildargv[_buildargc] = 0;
#else
    _buildargc = argc;
    _buildargv = (const char **)argv;
#endif

	baselayer_init();
	r = app_main(_buildargc, (char const * const*)_buildargv);

#ifdef __APPLE__
    free(_buildargv);
#endif

	startwin_close();
#ifdef HAVE_GTK2
	gtkbuild_exit(r);
#endif
	return r;
}