+#ifdef __ANDROID__
+ Sys_AllowProfiling(true);
+#endif
+
+ sys.selffd = -1;
+ sys.argc = argc;
+ sys.argv = (const char **)argv;
+
+ // Sys_Error this early in startup might screw with automated
+ // workflows or something if we show the dialog by default.
+ nocrashdialog = true;
+
+ Sys_ProvideSelfFD();
+
+ // COMMANDLINEOPTION: -nocrashdialog disables "Engine Error" crash dialog boxes
+ if(!Sys_CheckParm("-nocrashdialog"))
+ nocrashdialog = false;
+ // COMMANDLINEOPTION: sdl: -noterminal disables console output on stdout
+ if(Sys_CheckParm("-noterminal"))
+ sys.outfd = -1;
+ // COMMANDLINEOPTION: sdl: -stderr moves console output to stderr
+ else if(Sys_CheckParm("-stderr"))
+ sys.outfd = 2;
+ else
+ sys.outfd = 1;