Ejemplo n.º 1
0
static int Sys_Main(int argc, char **argv)
{
    // fix current directory to point to the basedir
    if (!fix_current_directory()) {
        return 1;
    }

#if (_MSC_VER >= 1400)
    // work around strftime given invalid format string
    // killing the whole f*****g process :((
    _set_invalid_parameter_handler(msvcrt_sucks);
#endif

    Qcommon_Init(argc, argv);

    // main program loop
    while (1) {
        Qcommon_Frame();
        if (shouldExit) {
#if USE_WINSVC
            if (shouldExit == SE_FULL)
#endif
                Com_Quit(NULL, ERR_DISCONNECT);
            break;
        }
    }

    // may get here when our service stops
    return 0;
}
Ejemplo n.º 2
0
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    if (!fix_current_directory())
        return -1;

    scripts_initialize();

    Window window;
    window.show();
    return app.exec();
}