2 #include "osregistry.h"
4 int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int nCmdShow);
7 int main(int argc, char **argv)
9 /* set some sane defaults since we don't have a laucher... */
10 if (os_config_read_string(NULL, NOX("Videocard"), NULL) == NULL)
11 os_config_write_string(NULL, NOX("Videocard"), NOX("OpenGL (640x480)"));
13 if (os_config_read_string(NULL, NOX("NetworkConnection"), NULL) == NULL)
14 os_config_write_string(NULL, NOX("NetworkConnection"), NOX("lan"));
16 if (os_config_read_string(NULL, NOX("ConnectionSpeed"), NULL) == NULL)
17 os_config_write_string(NULL, NOX("ConnectionSpeed"), NOX("Slow"));
23 argptr = (char *)malloc(1);
26 for (i = 1; i < argc; i++) {
29 len += strlen(argv[i])+1;
31 argptr = (char *)realloc(argptr, len);
33 fprintf(stderr, "ERROR: out of memory in main!\n");
37 strcpy(argptr+oldlen, argv[i]);
41 int retr = WinMain(1, 0, argptr, 0);