Index: comconfig.doc ================================================================== --- comconfig.doc +++ comconfig.doc @@ -13,10 +13,14 @@ CONFIG_DEFAULT_RESOURCES If defined, read resource configuration from the specified file if it cannot find the configuration file in the home directory. +CONFIG_EXTRA_SCREEN_INIT + Can be a C code to be executed after the video mode is set, but before + any other screen initialization is done. + CONFIG_GLOBAL_HASH_SIZE Size of global hash table when reading class definition file. This must be less than 65535. CONFIG_LOCAL_HASH_SIZE @@ -62,18 +66,16 @@ CONFIG_ERROR_CHECKING Define error checking level, where 9 is maximum. Lower numbers might improve speed but may make the program crash in some cases and may also cause security vulnerabilities. -CONFIG_EXTRA_SCREEN_INIT - Can be a C code to be executed after the video mode is set, but before - any other screen initialization is done. - CONFIG_LAUNCHER_PATH If defined, then it is the full path to a file to execute if Free Hero Mesh has been invoked with no command-line arguments, or if it is given - the flag to run the launcher program instead. + the flag to run the launcher program instead. (Maybe this should not be + implemented; you can run the separate launcher program directly instead. + Maybe it will be the other way around, if compiled to use AppImage.) CONFIG_MULTIUSER_SCORES (Meant for storing scores on a multiuser system, somehow) CONFIG_OMIT_EDITOR Index: picture.c ================================================================== --- picture.c +++ picture.c @@ -911,10 +911,13 @@ optionquery[1]=Q_screenHeight; h=strtol(xrm_get_resource(resourcedb,optionquery,optionquery,2)?:"600",0,10); optionquery[1]=Q_screenFlags; v=xrm_get_resource(resourcedb,optionquery,optionquery,2)?:""; if(SDL_Init(SDL_INIT_VIDEO|(strchr(v,'z')?SDL_INIT_NOPARACHUTE:0)|SDL_INIT_TIMER)) fatal("Error initializing SDL: %s\n",SDL_GetError()); +#ifdef CONFIG_EXTRA_SCREEN_INIT + do{ CONFIG_EXTRA_SCREEN_INIT }while(0); +#endif atexit(SDL_Quit); i=0; while(*v) switch(*v++) { case 'd': i|=SDL_DOUBLEBUF; break; case 'f': i|=SDL_FULLSCREEN; break;